use of minechem.tileentity.prefab.TileEntityProxy in project Minechem by iopleke.
the class BlueprintProjectorTileEntity method setBlock.
private void setBlock(int x, int y, int z, LocalPosition position, int structureId, HashMap<Integer, BlueprintBlock> blockLookup, TileEntity managerTileEntity) {
Pos3 worldPos = position.getLocalPos(x, y, z);
if (structureId == MinechemBlueprint.wildcard) {
return;
}
if (structureId == air) {
worldObj.setBlockToAir(worldPos.x, worldPos.y, worldPos.z);
} else {
BlueprintBlock blueprintBlock = blockLookup.get(structureId);
if (blueprintBlock.type == Type.MANAGER) {
return;
}
worldObj.setBlock(worldPos.x, worldPos.y, worldPos.z, blueprintBlock.block, blueprintBlock.metadata, 3);
if (blueprintBlock.type == Type.PROXY) {
TileEntity te = worldObj.getTileEntity(worldPos.x, worldPos.y, worldPos.z);
if (te instanceof TileEntityProxy) {
TileEntityProxy proxy = (TileEntityProxy) te;
}
}
}
}
use of minechem.tileentity.prefab.TileEntityProxy in project Minechem by iopleke.
the class MultiBlockTileEntity method linkProxy.
private void linkProxy(int x, int y, int z) {
int worldX = xCoord + offsetX + x;
int worldY = yCoord + offsetY + y;
int worldZ = zCoord + offsetZ + z;
HashMap<Integer, BlueprintBlock> lut = blueprint.getBlockLookup();
TileEntity tileEntity = worldObj.getTileEntity(worldX, worldY, worldZ);
if (tileEntity != null && tileEntity instanceof TileEntityProxy) {
((TileEntityProxy) tileEntity).setManager(this);
}
}
use of minechem.tileentity.prefab.TileEntityProxy in project Minechem by iopleke.
the class MultiBlockTileEntity method unlinkProxy.
private void unlinkProxy(int x, int y, int z) {
int worldX = xCoord + offsetX + x;
int worldY = yCoord + offsetY + y;
int worldZ = zCoord + offsetZ + z;
TileEntity tileEntity = worldObj.getTileEntity(worldX, worldY, worldZ);
if (tileEntity != null && tileEntity instanceof TileEntityProxy) {
((TileEntityProxy) tileEntity).setManager(null);
}
}
Aggregations