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

项目:Backmemed    文件:ServerWorldEventHandler.java   
public void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress)
{
    for (EntityPlayerMP entityplayermp : this.mcServer.getPlayerList().getPlayerList())
    {
        if (entityplayermp != null && entityplayermp.world == this.theWorldServer && entityplayermp.getEntityId() != breakerId)
        {
            double d0 = (double)pos.getX() - entityplayermp.posX;
            double d1 = (double)pos.getY() - entityplayermp.posY;
            double d2 = (double)pos.getZ() - entityplayermp.posZ;

            if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D)
            {
                entityplayermp.connection.sendPacket(new SPacketBlockBreakAnim(breakerId, pos, progress));
            }
        }
    }
}
项目:CustomWorldGen    文件:ServerWorldEventHandler.java   
public void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress)
{
    for (EntityPlayerMP entityplayermp : this.mcServer.getPlayerList().getPlayerList())
    {
        if (entityplayermp != null && entityplayermp.worldObj == this.theWorldServer && entityplayermp.getEntityId() != breakerId)
        {
            double d0 = (double)pos.getX() - entityplayermp.posX;
            double d1 = (double)pos.getY() - entityplayermp.posY;
            double d2 = (double)pos.getZ() - entityplayermp.posZ;

            if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D)
            {
                entityplayermp.connection.sendPacket(new SPacketBlockBreakAnim(breakerId, pos, progress));
            }
        }
    }
}
项目:Zombe-Modpack    文件:NetHandlerPlayClient.java   
/**
 * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially
 */
public void handleBlockBreakAnim(SPacketBlockBreakAnim packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.world.sendBlockBreakProgress(packetIn.getBreakerId(), packetIn.getPosition(), packetIn.getProgress());
}
项目:Backmemed    文件:NetHandlerPlayClient.java   
/**
 * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially
 */
public void handleBlockBreakAnim(SPacketBlockBreakAnim packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.world.sendBlockBreakProgress(packetIn.getBreakerId(), packetIn.getPosition(), packetIn.getProgress());
}
项目:CustomWorldGen    文件:NetHandlerPlayClient.java   
/**
 * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially
 */
public void handleBlockBreakAnim(SPacketBlockBreakAnim packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.theWorld.sendBlockBreakProgress(packetIn.getBreakerId(), packetIn.getPosition(), packetIn.getProgress());
}
项目:ExpandedRailsMod    文件:NetHandlerPlayClient.java   
/**
 * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially
 */
public void handleBlockBreakAnim(SPacketBlockBreakAnim packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    this.gameController.theWorld.sendBlockBreakProgress(packetIn.getBreakerId(), packetIn.getPosition(), packetIn.getProgress());
}
项目:Backmemed    文件:INetHandlerPlayClient.java   
/**
 * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially
 */
void handleBlockBreakAnim(SPacketBlockBreakAnim packetIn);
项目:CustomWorldGen    文件:INetHandlerPlayClient.java   
/**
 * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially
 */
void handleBlockBreakAnim(SPacketBlockBreakAnim packetIn);