コード例 #1
0
 @Override
 public void handleServerSide(EntityPlayer player) {
   World world = DimensionManager.getWorld(this.dim);
   if (world == null) return;
   TileEntity tileEntity = world.getTileEntity(this.x, this.y, this.z);
   if (tileEntity != null && tileEntity instanceof TileEntityCustomizeableDecoration) {
     TileEntityCustomizeableDecoration tile = (TileEntityCustomizeableDecoration) tileEntity;
     tile.setOrientation(rotation);
     tile.setScale(scale);
   }
 }
コード例 #2
0
  public PacketTileRotationScale(
      World world, int xCoord, int yCoord, int zCoord, double rot, double sc) {
    dim = world.provider.dimensionId;
    x = xCoord;
    y = yCoord;
    z = zCoord;
    rotation = rot;
    scale = sc;

    TileEntity tileEntity = world.getTileEntity(this.x, this.y, this.z);
    if (tileEntity != null && tileEntity instanceof TileEntityCustomizeableDecoration) {
      TileEntityCustomizeableDecoration tile = (TileEntityCustomizeableDecoration) tileEntity;
      tile.setOrientation(rotation);
      tile.setScale(scale);
    }
  }