mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
This commit is contained in:
1 parent
69ddf58600
commit
8bd517ca91
1 file changed
+1
-31
@@ -537,7 +537,7 @@ public class ForgeHooks
|
||||
// Tell client the block is gone immediately then process events
|
||||
if (world.getBlockEntity(pos) == null)
|
||||
{
|
||||
entityPlayer.connection.send(new ClientboundBlockUpdatePacket(DUMMY_WORLD, pos));
|
||||
entityPlayer.connection.send(new ClientboundBlockUpdatePacket(pos, world.getFluidState(pos).createLegacyBlock()));
|
||||
}
|
||||
|
||||
// Post the block break event
|
||||
@@ -1062,36 +1062,6 @@ public class ForgeHooks
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private static final DummyBlockReader DUMMY_WORLD = new DummyBlockReader();
|
||||
private static class DummyBlockReader implements BlockGetter {
|
||||
|
||||
@Override
|
||||
public BlockEntity getBlockEntity(BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidState getFluidState(BlockPos pos) {
|
||||
return Fluids.EMPTY.defaultFluidState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinBuildHeight() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static int onNoteChange(Level world, BlockPos pos, BlockState state, int old, int _new) {
|
||||
NoteBlockEvent.Change event = new NoteBlockEvent.Change(world, pos, state, old, _new);
|
||||
if (MinecraftForge.EVENT_BUS.post(event))
|
||||
|
||||
Reference in new issue
Block a user