private void sendQueuedBlockEvents() { while (!this.blockEventQueue[this.blockEventCacheIndex].isEmpty()) { int i = this.blockEventCacheIndex; this.blockEventCacheIndex ^= 1; for (BlockEventData blockeventdata : this.blockEventQueue[i]) { if (this.fireBlockEvent(blockeventdata)) { this.mcServer.getPlayerList().sendToAllNearExcept((EntityPlayer)null, (double)blockeventdata.getPosition().getX(), (double)blockeventdata.getPosition().getY(), (double)blockeventdata.getPosition().getZ(), 64.0D, this.provider.getDimensionType().getId(), new SPacketBlockAction(blockeventdata.getPosition(), blockeventdata.getBlock(), blockeventdata.getEventID(), blockeventdata.getEventParameter())); } } this.blockEventQueue[i].clear(); } }
private void sendQueuedBlockEvents() { while (!this.blockEventQueue[this.blockEventCacheIndex].isEmpty()) { int i = this.blockEventCacheIndex; this.blockEventCacheIndex ^= 1; for (BlockEventData blockeventdata : this.blockEventQueue[i]) { if (this.fireBlockEvent(blockeventdata)) { this.mcServer.getPlayerList().sendToAllNearExcept((EntityPlayer)null, (double)blockeventdata.getPosition().getX(), (double)blockeventdata.getPosition().getY(), (double)blockeventdata.getPosition().getZ(), 64.0D, this.provider.getDimension(), new SPacketBlockAction(blockeventdata.getPosition(), blockeventdata.getBlock(), blockeventdata.getEventID(), blockeventdata.getEventParameter())); } } this.blockEventQueue[i].clear(); } }
/** * Triggers Block.onBlockEventReceived, which is implemented in BlockPistonBase for extension/retraction, BlockNote * for setting the instrument (including audiovisual feedback) and in BlockContainer to set the number of players * accessing a (Ender)Chest */ public void handleBlockAction(SPacketBlockAction packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); this.gameController.world.addBlockEvent(packetIn.getBlockPosition(), packetIn.getBlockType(), packetIn.getData1(), packetIn.getData2()); }
/** * Triggers Block.onBlockEventReceived, which is implemented in BlockPistonBase for extension/retraction, BlockNote * for setting the instrument (including audiovisual feedback) and in BlockContainer to set the number of players * accessing a (Ender)Chest */ public void handleBlockAction(SPacketBlockAction packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); this.gameController.theWorld.addBlockEvent(packetIn.getBlockPosition(), packetIn.getBlockType(), packetIn.getData1(), packetIn.getData2()); }
/** * Triggers Block.onBlockEventReceived, which is implemented in BlockPistonBase for extension/retraction, BlockNote * for setting the instrument (including audiovisual feedback) and in BlockContainer to set the number of players * accessing a (Ender)Chest */ void handleBlockAction(SPacketBlockAction packetIn);