2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/EntitySnowman.java
|
|
|
|
+++ b/net/minecraft/server/EntitySnowman.java
|
2016-05-10 13:47:39 +02:00
|
|
|
@@ -1,6 +1,11 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
package net.minecraft.server;
|
|
|
|
|
2016-05-10 13:47:39 +02:00
|
|
|
import javax.annotation.Nullable;
|
2014-11-25 22:32:16 +01:00
|
|
|
+// CraftBukkit start
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
|
|
|
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
|
|
|
+import org.bukkit.event.block.EntityBlockFormEvent;
|
|
|
|
+// CraftBukkit end
|
2016-05-10 13:47:39 +02:00
|
|
|
|
2014-11-25 22:32:16 +01:00
|
|
|
public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
|
|
|
|
2016-11-17 02:41:03 +01:00
|
|
|
@@ -59,7 +64,7 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (this.world.getBiome(new BlockPosition(i, 0, k)).a(new BlockPosition(i, j, k)) > 1.0F) {
|
|
|
|
- this.damageEntity(DamageSource.BURN, 1.0F);
|
|
|
|
+ this.damageEntity(CraftEventFactory.MELTING, 1.0F); // CraftBukkit - DamageSource.BURN -> CraftEventFactory.MELTING
|
|
|
|
}
|
|
|
|
|
2016-02-29 22:32:46 +01:00
|
|
|
if (!this.world.getGameRules().getBoolean("mobGriefing")) {
|
2016-12-09 02:45:21 +01:00
|
|
|
@@ -73,7 +78,7 @@
|
2015-02-26 23:41:06 +01:00
|
|
|
BlockPosition blockposition = new BlockPosition(i, j, k);
|
|
|
|
|
2016-11-17 02:41:03 +01:00
|
|
|
if (this.world.getType(blockposition).getMaterial() == Material.AIR && this.world.getBiome(blockposition).a(blockposition) < 0.8F && Blocks.SNOW_LAYER.canPlace(this.world, blockposition)) {
|
2015-02-26 23:41:06 +01:00
|
|
|
- this.world.setTypeUpdate(blockposition, Blocks.SNOW_LAYER.getBlockData());
|
2017-06-03 09:39:03 +02:00
|
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.world, blockposition, Blocks.SNOW_LAYER.getBlockData(), this); // CraftBukkit
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|