use of minechem.tileentity.multiblock.fusion.FusionTileEntity in project Minechem by iopleke.
the class BlueprintProjectorTileEntity method buildManagerBlock.
private TileEntity buildManagerBlock(LocalPosition position) {
BlueprintBlock managerBlock = blueprint.getManagerBlock();
if (managerBlock != null) {
Pos3 worldPos = position.getLocalPos(blueprint.getManagerPosX(), blueprint.getManagerPosY(), blueprint.getManagerPosZ());
worldObj.setBlock(worldPos.x, worldPos.y, worldPos.z, managerBlock.block, managerBlock.metadata, 3);
if (this.blueprint == MinechemBlueprint.fusion && worldObj.getTileEntity(worldPos.x, worldPos.y, worldPos.z) == null) {
FusionTileEntity fusion = new FusionTileEntity();
fusion.setWorldObj(this.worldObj);
fusion.xCoord = worldPos.x;
fusion.yCoord = worldPos.y;
fusion.zCoord = worldPos.z;
fusion.blockType = MinechemBlocksGeneration.fusion;
worldObj.addTileEntity(fusion);
}
return worldObj.getTileEntity(worldPos.x, worldPos.y, worldPos.z);
} else {
return null;
}
}
use of minechem.tileentity.multiblock.fusion.FusionTileEntity in project Minechem by iopleke.
the class TileEntityProxy method buildManagerBlock.
private TileEntity buildManagerBlock() {
if (this.worldObj.getBlockMetadata(xCoord + managerXOffset, yCoord + managerYOffset, zCoord + managerZOffset) == 2) {
FusionTileEntity fusion = new FusionTileEntity();
fusion.setWorldObj(this.worldObj);
fusion.zCoord = this.managerZOffset + zCoord;
fusion.yCoord = this.managerYOffset + yCoord;
fusion.xCoord = this.managerXOffset + xCoord;
fusion.blockType = MinechemBlocksGeneration.fusion;
worldObj.setTileEntity(xCoord + managerXOffset, yCoord + managerYOffset, zCoord + managerZOffset, fusion);
}
if (this.worldObj.getBlockMetadata(xCoord + managerXOffset, yCoord + managerYOffset, zCoord + managerZOffset) == 3) {
FissionTileEntity fission = new FissionTileEntity();
fission.setWorldObj(this.worldObj);
fission.zCoord = this.managerZOffset + zCoord;
fission.yCoord = this.managerYOffset + yCoord;
fission.xCoord = this.managerXOffset + xCoord;
fission.blockType = MinechemBlocksGeneration.fusion;
worldObj.setTileEntity(xCoord + managerXOffset, yCoord + managerYOffset, zCoord + managerZOffset, fission);
}
return worldObj.getTileEntity(xCoord + managerXOffset, yCoord + managerYOffset, zCoord + managerZOffset);
}
Aggregations