Java 类net.minecraft.network.packet.Packet55BlockDestroy 实例源码

项目:RuneCraftery    文件:WorldManager.java   
public void func_72705_a(int p_72705_1_, int p_72705_2_, int p_72705_3_, int p_72705_4_, int p_72705_5_) {
   Iterator var6 = this.field_72783_a.func_71203_ab().field_72404_b.iterator();

   while(var6.hasNext()) {
      EntityPlayerMP var7 = (EntityPlayerMP)var6.next();
      if(var7 != null && var7.field_70170_p == this.field_72782_b && var7.field_70157_k != p_72705_1_) {
         double var8 = (double)p_72705_2_ - var7.field_70165_t;
         double var10 = (double)p_72705_3_ - var7.field_70163_u;
         double var12 = (double)p_72705_4_ - var7.field_70161_v;
         if(var8 * var8 + var10 * var10 + var12 * var12 < 1024.0D) {
            var7.field_71135_a.func_72567_b(new Packet55BlockDestroy(p_72705_1_, p_72705_2_, p_72705_3_, p_72705_4_, p_72705_5_));
         }
      }
   }

}
项目:RuneCraftery    文件:WorldManager.java   
/**
 * Starts (or continues) destroying a block with given ID at the given coordinates for the given partially destroyed
 * value
 */
public void destroyBlockPartially(int par1, int par2, int par3, int par4, int par5)
{
    Iterator iterator = this.mcServer.getConfigurationManager().playerEntityList.iterator();

    while (iterator.hasNext())
    {
        EntityPlayerMP entityplayermp = (EntityPlayerMP)iterator.next();

        if (entityplayermp != null && entityplayermp.worldObj == this.theWorldServer && entityplayermp.entityId != par1)
        {
            double d0 = (double)par2 - entityplayermp.posX;
            double d1 = (double)par3 - entityplayermp.posY;
            double d2 = (double)par4 - entityplayermp.posZ;

            if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D)
            {
                entityplayermp.playerNetServerHandler.sendPacketToPlayer(new Packet55BlockDestroy(par1, par2, par3, par4, par5));
            }
        }
    }
}
项目:BetterNutritionMod    文件:WorldManager.java   
/**
 * Starts (or continues) destroying a block with given ID at the given coordinates for the given partially destroyed
 * value
 */
public void destroyBlockPartially(int par1, int par2, int par3, int par4, int par5)
{
    Iterator iterator = this.mcServer.getConfigurationManager().playerEntityList.iterator();

    while (iterator.hasNext())
    {
        EntityPlayerMP entityplayermp = (EntityPlayerMP)iterator.next();

        if (entityplayermp != null && entityplayermp.worldObj == this.theWorldServer && entityplayermp.entityId != par1)
        {
            double d0 = (double)par2 - entityplayermp.posX;
            double d1 = (double)par3 - entityplayermp.posY;
            double d2 = (double)par4 - entityplayermp.posZ;

            if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D)
            {
                entityplayermp.playerNetServerHandler.sendPacketToPlayer(new Packet55BlockDestroy(par1, par2, par3, par4, par5));
            }
        }
    }
}
项目:forge_world_downloader    文件:WDLNetClientHandler.java   
@Override
public void handleBlockDestroy(Packet55BlockDestroy par1Packet55BlockDestroy)
{
    nch.handleBlockDestroy(par1Packet55BlockDestroy);       
}
项目:RuneCraftery    文件:NetHandler.java   
public void func_72465_a(Packet55BlockDestroy p_72465_1_) {
   this.func_72509_a(p_72465_1_);
}
项目:RuneCraftery    文件:NetClientHandler.java   
public void func_72465_a(Packet55BlockDestroy p_72465_1_) {
   this.field_72563_h.field_71441_e.func_72888_f(p_72465_1_.func_73322_d(), p_72465_1_.func_73321_f(), p_72465_1_.func_73324_g(), p_72465_1_.func_73320_h(), p_72465_1_.func_73323_i());
}
项目:RuneCraftery    文件:NetClientHandler.java   
public void handleBlockDestroy(Packet55BlockDestroy par1Packet55BlockDestroy)
{
    this.mc.theWorld.destroyBlockInWorldPartially(par1Packet55BlockDestroy.getEntityId(), par1Packet55BlockDestroy.getPosX(), par1Packet55BlockDestroy.getPosY(), par1Packet55BlockDestroy.getPosZ(), par1Packet55BlockDestroy.getDestroyedStage());
}
项目:BetterNutritionMod    文件:NetClientHandler.java   
public void handleBlockDestroy(Packet55BlockDestroy par1Packet55BlockDestroy)
{
    this.mc.theWorld.destroyBlockInWorldPartially(par1Packet55BlockDestroy.getEntityId(), par1Packet55BlockDestroy.getPosX(), par1Packet55BlockDestroy.getPosY(), par1Packet55BlockDestroy.getPosZ(), par1Packet55BlockDestroy.getDestroyedStage());
}