Example #1
0
 public virtual void handleBlockDig(Packet14BlockDig packet14blockdig)
 {
     registerPacket(packet14blockdig);
 }
Example #2
0
 public virtual void HandleBlockDig(Packet14BlockDig par1Packet14BlockDig)
 {
     RegisterPacket(par1Packet14BlockDig);
 }
Example #3
0
 public override void handleBlockDig(Packet14BlockDig packet14blockdig)
 {
     if (packet14blockdig.status == 4)
     {
         playerEntity.func_161_a();
         return;
     }
     bool flag = mcServer.worldMngr.field_819_z = mcServer.configManager.isOp(playerEntity.username);
     bool flag1 = false;
     if (packet14blockdig.status == 0)
     {
         flag1 = true;
     }
     if (packet14blockdig.status == 2)
     {
         flag1 = true;
     }
     int i = packet14blockdig.xPosition;
     int j = packet14blockdig.yPosition;
     int k = packet14blockdig.zPosition;
     if (flag1)
     {
         double d = playerEntity.posX - (i + 0.5D);
         double d1 = playerEntity.posY - (j + 0.5D);
         double d3 = playerEntity.posZ - (k + 0.5D);
         double d5 = d*d + d1*d1 + d3*d3;
         if (d5 > 36D)
         {
             return;
         }
     }
     ChunkCoordinates chunkcoordinates = mcServer.worldMngr.func_22078_l();
     var l = (int) MathHelper.abs(i - chunkcoordinates.posX);
     var i1 = (int) MathHelper.abs(k - chunkcoordinates.posZ);
     if (l > i1)
     {
         i1 = l;
     }
     if (packet14blockdig.status == 0)
     {
         if (i1 > 16 || flag)
         {
             playerEntity.itemInWorldManager.func_324_a(i, j, k);
         }
     }
     else if (packet14blockdig.status == 2)
     {
         playerEntity.itemInWorldManager.func_22045_b(i, j, k);
     }
     else if (packet14blockdig.status == 3)
     {
         double d2 = playerEntity.posX - (i + 0.5D);
         double d4 = playerEntity.posY - (j + 0.5D);
         double d6 = playerEntity.posZ - (k + 0.5D);
         double d7 = d2*d2 + d4*d4 + d6*d6;
         if (d7 < 256D)
         {
             playerEntity.playerNetServerHandler.sendPacket(new Packet53BlockChange(i, j, k, mcServer.worldMngr));
         }
     }
     mcServer.worldMngr.field_819_z = false;
 }
Example #4
0
 public virtual void handleBlockDig(Packet14BlockDig packet14blockdig)
 {
     registerPacket(packet14blockdig);
 }