Java 类net.minecraft.network.play.server.SPacketBlockAction 实例源码

项目:Backmemed    文件:WorldServer.java   
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();
    }
}
项目:CustomWorldGen    文件:WorldServer.java   
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();
    }
}
项目:Zombe-Modpack    文件:NetHandlerPlayClient.java   
/**
 * 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());
}
项目:Backmemed    文件:NetHandlerPlayClient.java   
/**
 * 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());
}
项目:CustomWorldGen    文件:NetHandlerPlayClient.java   
/**
 * 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());
}
项目:ExpandedRailsMod    文件:NetHandlerPlayClient.java   
/**
 * 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());
}
项目:Backmemed    文件:INetHandlerPlayClient.java   
/**
 * 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);
项目:CustomWorldGen    文件:INetHandlerPlayClient.java   
/**
 * 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);