コード例 #1
0
 /**
  * Will initiate the wireframe rendering. When invoked on the server, it sends a packet to every
  * client to render the box.
  */
 @Override
 public void showRangeLines() {
   if (worldObj.isRemote) {
     rangeLineRenderer.resetRendering(getRange());
   } else {
     NetworkHandler.sendToAllAround(
         new PacketRenderRangeLines(this),
         worldObj,
         TileEntityConstants.PACKET_UPDATE_DISTANCE + getRange());
   }
 }
コード例 #2
0
 @Override
 public void overload() {
   for (int i = 0; i < 10; i++) {
     NetworkHandler.sendToAllAround(
         new PacketSpawnParticle(
             "largesmoke",
             xCoord + worldObj.rand.nextDouble(),
             yCoord + 1,
             zCoord + worldObj.rand.nextDouble(),
             0,
             0,
             0),
         worldObj);
   }
 }