SPIGOT-2387: Magma does not provide a block for EntityDamageEvent.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-06-11 16:11:51 +10:00
parent 1a8b83514c
commit a9e1194e19
3 changed files with 15 additions and 5 deletions

View File

@@ -0,0 +1,10 @@
--- a/net/minecraft/server/BlockMagma.java
+++ b/net/minecraft/server/BlockMagma.java
@@ -17,6 +17,7 @@
public void stepOn(World world, BlockPosition blockposition, Entity entity) {
if (!entity.isFireProof() && entity instanceof EntityLiving && !EnchantmentManager.j((EntityLiving) entity)) {
+ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); // CraftBukkit
entity.damageEntity(DamageSource.HOT_FLOOR, 1.0F);
}