mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 20:22:28 +00:00
Fix NPE on specific tile entities when the block break event is canceled. Closes #863
This commit is contained in:
1 parent
28abe2cc3c
commit
77c5caffd5
1 file changed
+6
-1
@@ -22,6 +22,7 @@ import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.network.NetServerHandler;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.packet.Packet53BlockChange;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -487,7 +488,11 @@ public class ForgeHooks
|
||||
TileEntity tileentity = world.getBlockTileEntity(x, y, z);
|
||||
if (tileentity != null)
|
||||
{
|
||||
entityPlayer.playerNetServerHandler.sendPacketToPlayer(tileentity.getDescriptionPacket());
|
||||
Packet pkt = tileentity.getDescriptionPacket();
|
||||
if (pkt != null)
|
||||
{
|
||||
entityPlayer.playerNetServerHandler.sendPacketToPlayer(pkt);
|
||||
}
|
||||
}
|
||||
}
|
||||
return event;
|
||||
|
||||
Reference in new issue
Block a user