Package net.minecraft.tileentity

Examples of net.minecraft.tileentity.TileEntity.invalidate()


              }
              //If AE is installed, use its handler
            } else if (api != null) {
              if (api.registries().moveable().askToMove(passenger)) {
                worldObj.setBlock(targetX, yCoord + 1, targetZ, worldObj.getBlock(xCoord, yCoord + 1, zCoord), worldObj.getBlockMetadata(xCoord, yCoord + 1, zCoord), 3);
                passenger.invalidate();
                worldObj.setBlockToAir(xCoord, yCoord + 1, zCoord);
                api.registries().moveable().getHandler(passenger).moveTile(passenger, worldObj, targetX, yCoord + 1, targetZ);
                api.registries().moveable().doneMoving(passenger);
                passenger.validate();
              }
View Full Code Here


            } else if (passenger instanceof IMovableTile || passenger.getClass().getName().startsWith("net.minecraft.tileentity")) {
              boolean imovable = passenger instanceof IMovableTile;
              if (imovable)
                ((IMovableTile) passenger).prepareToMove();
              worldObj.setBlock(targetX, yCoord + 1, targetZ, worldObj.getBlock(xCoord, yCoord + 1, zCoord), worldObj.getBlockMetadata(xCoord, yCoord + 1, zCoord), 3);
              passenger.invalidate();
              worldObj.setBlockToAir(xCoord, yCoord + 1, zCoord);

              //IMovableHandler default code
              Chunk c = worldObj.getChunkFromBlockCoords(targetX, targetZ);
View Full Code Here

      }
      catch (ClassCastException e)
      {
        FMLLog.getLogger().warning(Info.TITLE_LOG + "Attempted to destroy APM block with non-APM tile entity at: " + i + ", " + j + ", " + k);
      }
      tile.invalidate();
    }
  }
}
View Full Code Here

 
          if (attachedLaunchPads.size() == 9)
          {
              for (final TileEntity tile : attachedLaunchPads)
              {
                  tile.invalidate();
                  tile.getWorldObj().setBlock(tile.xCoord, tile.yCoord, tile.zCoord, Blocks.air, 0, 3);
              }
 
              this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, GCBlocks.landingPadFull, 1, 3);
              final TileEntityBuggyFueler tile = (TileEntityBuggyFueler) this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord);
View Full Code Here

 
          if (attachedLaunchPads.size() == 9)
          {
              for (final TileEntity tile : attachedLaunchPads)
              {
                  tile.invalidate();
                  tile.getWorldObj().setBlock(tile.xCoord, tile.yCoord, tile.zCoord, Blocks.air, 0, 3);
                  // ((GCCoreBlockLandingPadFull)GCCoreBlocks.landingPadFull).onBlockAdded(worldObj,
                  // tile.xCoord, tile.yCoord, tile.zCoord);
              }
 
View Full Code Here

            if (block1.hasTileEntity(k1)) {
                TileEntity te = chunk.getTileEntityUnsafe(x & 0x0F, y, z & 0x0F);
                if (te != null) {
                    ChunkPosition chunkposition = new ChunkPosition(x & 0x0F, y, z & 0x0F);
                    te = (TileEntity) chunk.chunkTileEntityMap.remove(chunkposition);
                    te.invalidate(); //urk hopefully this doesn't explode anything
                }
            }

            return extendedblockstorage.getBlockByExtId(x, y & 15, z) == dense_ore_blocks;
        }
View Full Code Here

    }
    toInvalidate.clear();
    for (Map.Entry<ChunkPosition, TileEntity> entry : tileMap.entrySet()) {
      TileEntity tileEntity = entry.getValue();
      if ((!tileEntity.canUpdate() && tileEntity.isInvalid()) || tileEntity.getClass() == TileEntity.class) {
        tileEntity.invalidate();
        ChunkPosition position = entry.getKey();
        tileMap.remove(position);
        worldObj.loadedTileEntityList.remove(tileEntity);
        int x = position.x, y = position.y, z = position.z;
        int id = getBlockID(x, y, z);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.