Send dig packets to synchronize states after breaking blocks. (Should reduce ghost-block problems with AOE tools)

This commit is contained in:
Bernhard Bonigl committed 2014-08-23 22:04:49 +02:00
1 parent 699b0f5796
commit 46d84095cc
2 files changed
+15

No files matched your search

@@ -237,7 +237,14 @@ public class Scythe extends Weapon
// Workaround for dropping experience
if (!butter)
localBlock.dropXpOnBlockBreak(world, xPos, yPos, zPos, exp);
}
if(world.isRemote) {
INetHandler handler = FMLClientHandler.instance().getClientPlayHandler();
if(handler != null && handler instanceof NetHandlerPlayClient) {
NetHandlerPlayClient handlerClient = (NetHandlerPlayClient) handler;
handlerClient.addToSendQueue(new C07PacketPlayerDigging(0, x, y, z, Minecraft.getMinecraft().objectMouseOver.sideHit));
handlerClient.addToSendQueue(new C07PacketPlayerDigging(2, x, y, z, Minecraft.getMinecraft().objectMouseOver.sideHit));
}
}