Correct location of fire from lightning strikes. Fixes BUKKIT-4707

Previously fires spawned by lightning strikes were in the wrong locations.
This introduced the possibility of having blocks replaced when they should
not be.

EntityLightning now uses the correct locations as defined to spawn the
fires when needed.
This commit is contained in:
Brokkonaut 2013-08-19 15:03:58 +02:00 committed by Travis Ralston
parent 8ae8957d15
commit 5f43109c0e

View File

@ -53,7 +53,7 @@ public class EntityLightning extends EntityWeather {
if (world.getTypeId(j, k, l) == 0 && Block.FIRE.canPlace(world, j, k, l)) {
// CraftBukkit start
if (!CraftEventFactory.callBlockIgniteEvent(world, j, k, l, this).isCancelled()) {
world.setTypeIdUpdate(i, j, k, Block.FIRE.id);
world.setTypeIdUpdate(j, k, l, Block.FIRE.id);
}
// CraftBukkit end
}