mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-26 20:55:30 +01:00
39 lines
2.2 KiB
Diff
39 lines
2.2 KiB
Diff
From 9ac06b092c7559d0c3cbbba44db9d7a4bceb7422 Mon Sep 17 00:00:00 2001
|
|
From: chickeneer <emcchickeneer@gmail.com>
|
|
Date: Thu, 28 Nov 2019 20:37:44 -0600
|
|
Subject: [PATCH] EMC Add PotionExtinguishFireEvent
|
|
|
|
---
|
|
.../java/net/minecraft/server/EntityPotion.java | 13 +++++++++----
|
|
1 file changed, 9 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityPotion.java b/src/main/java/net/minecraft/server/EntityPotion.java
|
|
index 2f9a73ea..4b82e4c3 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPotion.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPotion.java
|
|
@@ -228,12 +228,17 @@ public class EntityPotion extends EntityProjectile {
|
|
private void a(BlockPosition blockposition, EnumDirection enumdirection) {
|
|
IBlockData iblockdata = this.world.getType(blockposition);
|
|
Block block = iblockdata.getBlock();
|
|
-
|
|
if (block == Blocks.FIRE) {
|
|
- this.world.douseFire((EntityHuman) null, blockposition.shift(enumdirection), enumdirection.opposite());
|
|
+ // Paper start
|
|
+ if (new com.destroystokyo.paper.event.entity.PotionExtinguishFireEvent((org.bukkit.entity.ThrownPotion) this.getBukkitEntity(), world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ())).callEvent()) {
|
|
+ this.world.douseFire((EntityHuman) null, blockposition.shift(enumdirection), enumdirection.opposite());
|
|
+ }
|
|
} else if (block == Blocks.CAMPFIRE && (Boolean) iblockdata.get(BlockCampfire.b)) {
|
|
- this.world.a((EntityHuman) null, 1009, blockposition, 0);
|
|
- this.world.setTypeUpdate(blockposition, (IBlockData) iblockdata.set(BlockCampfire.b, false));
|
|
+ if (new com.destroystokyo.paper.event.entity.PotionExtinguishFireEvent((org.bukkit.entity.ThrownPotion) this.getBukkitEntity(), world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ())).callEvent()) {
|
|
+ this.world.a((EntityHuman) null, 1009, blockposition, 0);
|
|
+ this.world.setTypeUpdate(blockposition, (IBlockData) iblockdata.set(BlockCampfire.b, false));
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
|
|
}
|
|
--
|
|
2.25.1.windows.1
|
|
|