Search in sources :

Example 1 with FusionTileEntity

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;
    }
}
Also used : BlueprintBlock(minechem.item.blueprint.BlueprintBlock) FusionTileEntity(minechem.tileentity.multiblock.fusion.FusionTileEntity) Pos3(minechem.utils.LocalPosition.Pos3)

Example 2 with FusionTileEntity

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);
}
Also used : FusionTileEntity(minechem.tileentity.multiblock.fusion.FusionTileEntity) FissionTileEntity(minechem.tileentity.multiblock.fission.FissionTileEntity)

Aggregations

FusionTileEntity (minechem.tileentity.multiblock.fusion.FusionTileEntity)2 BlueprintBlock (minechem.item.blueprint.BlueprintBlock)1 FissionTileEntity (minechem.tileentity.multiblock.fission.FissionTileEntity)1 Pos3 (minechem.utils.LocalPosition.Pos3)1