Set proper position of snow block. Fixes BUKKIT-5004

Missed diffs when updating to 1.7.

Pulled from PR #1278
This commit is contained in:
Kodekpl 2013-12-04 21:10:54 +01:00 committed by feildmaster
parent ff0da6bad5
commit 431e5ea442

View file

@ -49,7 +49,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
k = MathHelper.floor(this.locZ + (double) ((float) (l / 2 % 2 * 2 - 1) * 0.25F));
if (this.world.getType(i, j, k).getMaterial() == Material.AIR && this.world.getBiome(i, k).a(i, j, k) < 0.8F && Blocks.SNOW.canPlace(this.world, i, j, k)) {
// CraftBukkit start
org.bukkit.block.BlockState blockState = this.world.getWorld().getBlockAt(j, k, l).getState();
org.bukkit.block.BlockState blockState = this.world.getWorld().getBlockAt(i, j, k).getState();
blockState.setType(CraftMagicNumbers.getMaterial(Blocks.SNOW));
EntityBlockFormEvent event = new EntityBlockFormEvent(this.getBukkitEntity(), blockState.getBlock(), blockState);