mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Play the particles on the client when breaking the block directly with a drill
This commit is contained in:
parent
02a58c5397
commit
91b398c121
1 changed files with 3 additions and 2 deletions
|
@ -357,7 +357,7 @@ public final class WorldUtil{
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
world.playEvent(2001, pos, Block.getStateId(state));
|
world.playEvent(player, 2001, pos, Block.getStateId(state));
|
||||||
|
|
||||||
if(player instanceof EntityPlayerMP){
|
if(player instanceof EntityPlayerMP){
|
||||||
((EntityPlayerMP)player).connection.sendPacket(new SPacketBlockChange(world, pos));
|
((EntityPlayerMP)player).connection.sendPacket(new SPacketBlockChange(world, pos));
|
||||||
|
@ -385,7 +385,7 @@ public final class WorldUtil{
|
||||||
block.dropXpOnBlockBreak(world, pos, xp);
|
block.dropXpOnBlockBreak(world, pos, xp);
|
||||||
}
|
}
|
||||||
|
|
||||||
world.playEvent(2001, pos, Block.getStateId(state));
|
world.playEvent(player, 2001, pos, Block.getStateId(state));
|
||||||
playerMp.connection.sendPacket(new SPacketBlockChange(world, pos));
|
playerMp.connection.sendPacket(new SPacketBlockChange(world, pos));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -396,6 +396,7 @@ public final class WorldUtil{
|
||||||
}
|
}
|
||||||
|
|
||||||
stack.onBlockDestroyed(world, state, pos, player);
|
stack.onBlockDestroyed(world, state, pos, player);
|
||||||
|
world.playEvent(2001, pos, Block.getStateId(state));
|
||||||
|
|
||||||
if(stack.stackSize <= 0 && stack == player.getHeldItemMainhand()){
|
if(stack.stackSize <= 0 && stack == player.getHeldItemMainhand()){
|
||||||
ForgeEventFactory.onPlayerDestroyItem(player, stack, EnumHand.MAIN_HAND);
|
ForgeEventFactory.onPlayerDestroyItem(player, stack, EnumHand.MAIN_HAND);
|
||||||
|
|
Loading…
Reference in a new issue