Almost finished assembler (todo: upgrades, more recipes)

This commit is contained in:
HbmMods 2017-07-09 18:55:46 +02:00
parent e6b9851e52
commit a4293ed222
7 changed files with 728 additions and 36 deletions

View File

@ -226,7 +226,7 @@ tile.fwatz_plasma.name=Destabilized Antischrabidium Plasma
container.fusionaryWatzPlant=Fusionary Watz Plant
tile.machine_rtg_grey.name=RT Generator
container.rtg=Radioisotope Thermoelectric Generator
container.rtg=RT Generator
tile.machine_rtg_red.name=Fulmination Generator
tile.machine_rtg_orange.name=Strong RT Generator
tile.machine_rtg_yellow.name=Australium Superfuel Reactor

View File

@ -60,26 +60,42 @@ public class MachineAssembler extends BlockContainer implements IMultiblock {
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.assemblerDimensionEast)) {
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.assemblerDimensionEast, ModBlocks.dummy_block_assembler);
//
/*DummyBlockIGenerator.safeBreak = true;
world.setBlock(x + 2, y, z, ModBlocks.dummy_port_igenerator);
TileEntity te = world.getTileEntity(x + 2, y, z);
DummyBlockAssembler.safeBreak = true;
world.setBlock(x - 1, y, z, ModBlocks.dummy_port_assembler);
TileEntity te = world.getTileEntity(x - 1, y, z);
if(te instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
world.setBlock(x - 3, y, z, ModBlocks.dummy_port_igenerator);
TileEntity te2 = world.getTileEntity(x - 3, y, z);
if(te instanceof TileEntityDummy) {
world.setBlock(x - 1, y, z + 1, ModBlocks.dummy_port_assembler);
TileEntity te2 = world.getTileEntity(x - 1, y, z + 1);
if(te2 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te2;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
DummyBlockIGenerator.safeBreak = false;*/
world.setBlock(x + 2, y, z, ModBlocks.dummy_port_assembler);
TileEntity te3 = world.getTileEntity(x + 2, y, z);
if(te3 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te3;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
world.setBlock(x + 2, y, z + 1, ModBlocks.dummy_port_assembler);
TileEntity te4 = world.getTileEntity(x + 2, y, z + 1);
if(te4 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te4;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
DummyBlockAssembler.safeBreak = false;
//
} else
@ -89,26 +105,42 @@ public class MachineAssembler extends BlockContainer implements IMultiblock {
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.assemblerDimensionSouth)) {
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.assemblerDimensionSouth, ModBlocks.dummy_block_assembler);
//
/*DummyBlockIGenerator.safeBreak = true;
world.setBlock(x, y, z + 2, ModBlocks.dummy_port_igenerator);
TileEntity te = world.getTileEntity(x, y, z + 2);
DummyBlockAssembler.safeBreak = true;
world.setBlock(x, y, z - 1, ModBlocks.dummy_port_assembler);
TileEntity te = world.getTileEntity(x, y, z - 1);
if(te instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
world.setBlock(x, y, z - 3, ModBlocks.dummy_port_igenerator);
TileEntity te2 = world.getTileEntity(x, y, z - 3);
if(te instanceof TileEntityDummy) {
world.setBlock(x - 1, y, z - 1, ModBlocks.dummy_port_assembler);
TileEntity te2 = world.getTileEntity(x - 1, y, z - 1);
if(te2 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te2;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
DummyBlockIGenerator.safeBreak = false;*/
world.setBlock(x, y, z + 2, ModBlocks.dummy_port_assembler);
TileEntity te3 = world.getTileEntity(x, y, z + 2);
if(te3 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te3;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
world.setBlock(x - 1, y, z + 2, ModBlocks.dummy_port_assembler);
TileEntity te4 = world.getTileEntity(x - 1, y, z + 2);
if(te4 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te4;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
DummyBlockAssembler.safeBreak = false;
//
} else
@ -118,26 +150,42 @@ public class MachineAssembler extends BlockContainer implements IMultiblock {
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.assemblerDimensionWest)) {
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.assemblerDimensionWest, ModBlocks.dummy_block_assembler);
//
/*DummyBlockIGenerator.safeBreak = true;
world.setBlock(x + 3, y, z, ModBlocks.dummy_port_igenerator);
TileEntity te = world.getTileEntity(x + 3, y, z);
DummyBlockAssembler.safeBreak = true;
world.setBlock(x + 1, y, z, ModBlocks.dummy_port_assembler);
TileEntity te = world.getTileEntity(x + 1, y, z);
if(te instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
world.setBlock(x - 2, y, z, ModBlocks.dummy_port_igenerator);
TileEntity te2 = world.getTileEntity(x - 2, y, z);
if(te instanceof TileEntityDummy) {
world.setBlock(x + 1, y, z - 1, ModBlocks.dummy_port_assembler);
TileEntity te2 = world.getTileEntity(x + 1, y, z - 1);
if(te2 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te2;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
DummyBlockIGenerator.safeBreak = false;*/
world.setBlock(x - 2, y, z, ModBlocks.dummy_port_assembler);
TileEntity te3 = world.getTileEntity(x - 2, y, z);
if(te3 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te3;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
world.setBlock(x - 2, y, z - 1, ModBlocks.dummy_port_assembler);
TileEntity te4 = world.getTileEntity(x - 2, y, z - 1);
if(te4 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te4;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
DummyBlockAssembler.safeBreak = false;
//
} else
@ -147,26 +195,42 @@ public class MachineAssembler extends BlockContainer implements IMultiblock {
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.assemblerDimensionNorth)) {
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.assemblerDimensionNorth, ModBlocks.dummy_block_assembler);
//
/*DummyBlockIGenerator.safeBreak = true;
world.setBlock(x, y, z + 3, ModBlocks.dummy_port_igenerator);
TileEntity te = world.getTileEntity(x, y, z + 3);
DummyBlockAssembler.safeBreak = true;
world.setBlock(x, y, z + 1, ModBlocks.dummy_port_assembler);
TileEntity te = world.getTileEntity(x, y, z + 1);
if(te instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
world.setBlock(x, y, z - 2, ModBlocks.dummy_port_igenerator);
TileEntity te2 = world.getTileEntity(x, y, z - 2);
if(te instanceof TileEntityDummy) {
world.setBlock(x + 1, y, z + 1, ModBlocks.dummy_port_assembler);
TileEntity te2 = world.getTileEntity(x + 1, y, z + 1);
if(te2 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te2;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
DummyBlockIGenerator.safeBreak = false;*/
world.setBlock(x, y, z - 2, ModBlocks.dummy_port_assembler);
TileEntity te3 = world.getTileEntity(x, y, z - 2);
if(te3 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te3;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
world.setBlock(x + 1, y, z - 2, ModBlocks.dummy_port_assembler);
TileEntity te4 = world.getTileEntity(x + 1, y, z - 2);
if(te4 instanceof TileEntityDummy) {
TileEntityDummy dummy = (TileEntityDummy)te4;
dummy.targetX = x;
dummy.targetY = y;
dummy.targetZ = z;
}
DummyBlockAssembler.safeBreak = false;
//
} else

View File

@ -1793,6 +1793,330 @@ public class MachineRecipes {
case GUN_PELLETS:
list.add(new ItemStack(ModItems.nugget_lead, 6));
break;
case AUSTRALIUM_MACHINE:
list.add(new ItemStack(ModItems.rod_australium, 1));
list.add(new ItemStack(ModItems.ingot_steel, 1));
list.add(new ItemStack(ModItems.plate_steel, 6));
list.add(new ItemStack(ModItems.plate_copper, 2));
list.add(new ItemStack(ModItems.wire_copper, 6));
break;
case MAGNETRON:
list.add(new ItemStack(ModItems.ingot_advanced_alloy, 1));
list.add(new ItemStack(ModItems.plate_advanced_alloy, 2));
list.add(new ItemStack(ModItems.wire_tungsten, 1));
list.add(new ItemStack(ModItems.coil_tungsten, 1));
break;
case W_SP:
list.add(new ItemStack(ModItems.ingot_schrabidium, 5));
list.add(new ItemStack(ModItems.plate_iron, 2));
break;
case W_SHE:
list.add(new ItemStack(ModItems.ingot_hes, 5));
list.add(new ItemStack(ModItems.plate_iron, 2));
break;
case W_SME:
list.add(new ItemStack(ModItems.ingot_schrabidium_fuel, 5));
list.add(new ItemStack(ModItems.plate_iron, 2));
break;
case W_SLE:
list.add(new ItemStack(ModItems.ingot_les, 5));
list.add(new ItemStack(ModItems.plate_iron, 2));
break;
case W_B:
list.add(new ItemStack(ModItems.ingot_beryllium, 5));
list.add(new ItemStack(ModItems.plate_iron, 2));
break;
case W_N:
list.add(new ItemStack(ModItems.ingot_neptunium, 5));
list.add(new ItemStack(ModItems.plate_iron, 2));
break;
case W_L:
list.add(new ItemStack(ModItems.ingot_lead, 5));
list.add(new ItemStack(ModItems.plate_iron, 2));
break;
case W_A:
list.add(new ItemStack(ModItems.ingot_advanced_alloy, 5));
list.add(new ItemStack(ModItems.plate_iron, 2));
break;
case UPGRADE_TEMPLATE:
list.add(new ItemStack(ModItems.plate_steel, 1));
list.add(new ItemStack(ModItems.plate_iron, 4));
list.add(new ItemStack(ModItems.plate_copper, 2));
list.add(new ItemStack(ModItems.wire_copper, 6));
break;
case UPGRADE_RED_I:
list.add(new ItemStack(ModItems.upgrade_template, 1));
list.add(new ItemStack(ModItems.powder_red_copper, 4));
list.add(new ItemStack(Items.redstone, 6));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case UPGRADE_RED_II:
list.add(new ItemStack(ModItems.upgrade_speed_1, 1));
list.add(new ItemStack(ModItems.powder_red_copper, 2));
list.add(new ItemStack(Items.redstone, 4));
list.add(new ItemStack(ModItems.circuit_red_copper, 4));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case UPGRADE_RED_III:
list.add(new ItemStack(ModItems.upgrade_speed_2, 1));
list.add(new ItemStack(ModItems.powder_red_copper, 2));
list.add(new ItemStack(Items.redstone, 6));
list.add(new ItemStack(ModItems.ingot_desh, 4));
break;
case UPGRADE_GREEN_I:
list.add(new ItemStack(ModItems.upgrade_template, 1));
list.add(new ItemStack(ModItems.powder_dura_steel, 4));
list.add(new ItemStack(ModItems.powder_steel, 6));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case UPGRADE_GREEN_II:
list.add(new ItemStack(ModItems.upgrade_effect_1, 1));
list.add(new ItemStack(ModItems.powder_dura_steel, 2));
list.add(new ItemStack(ModItems.powder_steel, 4));
list.add(new ItemStack(ModItems.circuit_red_copper, 4));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case UPGRADE_GREEN_III:
list.add(new ItemStack(ModItems.upgrade_effect_2, 1));
list.add(new ItemStack(ModItems.powder_dura_steel, 2));
list.add(new ItemStack(ModItems.powder_steel, 6));
list.add(new ItemStack(ModItems.ingot_desh, 4));
break;
case UPGRADE_BLUE_I:
list.add(new ItemStack(ModItems.upgrade_template, 1));
list.add(new ItemStack(ModItems.powder_lapis, 4));
list.add(new ItemStack(Items.glowstone_dust, 6));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case UPGRADE_BLUE_II:
list.add(new ItemStack(ModItems.upgrade_power_1, 1));
list.add(new ItemStack(ModItems.powder_lapis, 2));
list.add(new ItemStack(Items.glowstone_dust, 4));
list.add(new ItemStack(ModItems.circuit_red_copper, 4));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case UPGRADE_BLUE_III:
list.add(new ItemStack(ModItems.upgrade_power_2, 1));
list.add(new ItemStack(ModItems.powder_lapis, 2));
list.add(new ItemStack(Items.glowstone_dust, 6));
list.add(new ItemStack(ModItems.ingot_desh, 4));
break;
case UPGRADE_PURPLE_I:
list.add(new ItemStack(ModItems.upgrade_template, 1));
list.add(new ItemStack(ModItems.powder_diamond, 4));
list.add(new ItemStack(ModItems.powder_iron, 6));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case UPGRADE_PURPLE_II:
list.add(new ItemStack(ModItems.upgrade_fortune_1, 1));
list.add(new ItemStack(ModItems.powder_diamond, 2));
list.add(new ItemStack(ModItems.powder_iron, 4));
list.add(new ItemStack(ModItems.circuit_red_copper, 4));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case UPGRADE_PURPLE_III:
list.add(new ItemStack(ModItems.upgrade_fortune_2, 1));
list.add(new ItemStack(ModItems.powder_diamond, 2));
list.add(new ItemStack(ModItems.powder_iron, 6));
list.add(new ItemStack(ModItems.ingot_desh, 4));
break;
case FUSE:
list.add(new ItemStack(ModItems.plate_steel, 2));
list.add(new ItemStack(Blocks.glass_pane, 1));
list.add(new ItemStack(ModItems.wire_aluminium, 1));
break;
case REDCOIL_CAPACITOR:
list.add(new ItemStack(ModItems.plate_gold, 3));
list.add(new ItemStack(ModItems.fuse, 1));
list.add(new ItemStack(ModItems.wire_advanced_alloy, 4));
list.add(new ItemStack(ModItems.coil_advanced_alloy, 6));
list.add(new ItemStack(Blocks.redstone_block, 2));
break;
case TITANIUM_FILTER:
list.add(new ItemStack(ModItems.plate_lead, 3));
list.add(new ItemStack(ModItems.fuse, 1));
list.add(new ItemStack(ModItems.wire_tungsten, 4));
list.add(new ItemStack(ModItems.plate_titanium, 6));
list.add(new ItemStack(ModItems.ingot_u238, 2));
break;
case LITHIUM_BOX:
list.add(new ItemStack(ModItems.plate_steel, 2));
list.add(new ItemStack(ModItems.powder_lithium, 2));
break;
case BERYLLIUM_BOX:
list.add(new ItemStack(ModItems.plate_steel, 2));
list.add(new ItemStack(ModItems.powder_beryllium, 2));
break;
case COAL_BOX:
list.add(new ItemStack(ModItems.plate_steel, 2));
list.add(new ItemStack(ModItems.powder_coal, 2));
break;
case COPPER_BOX:
list.add(new ItemStack(ModItems.plate_steel, 2));
list.add(new ItemStack(ModItems.powder_copper, 2));
break;
case PLUTONIUM_BOX:
list.add(new ItemStack(ModItems.plate_steel, 2));
list.add(new ItemStack(ModItems.powder_plutonium, 2));
break;
case THERMO_ELEMENT:
list.add(new ItemStack(ModItems.plate_steel, 3));
list.add(new ItemStack(ModItems.plate_iron, 1));
list.add(new ItemStack(ModItems.plate_copper, 2));
list.add(new ItemStack(ModItems.wire_red_copper, 2));
list.add(new ItemStack(ModItems.wire_aluminium, 2));
list.add(new ItemStack(ModItems.powder_quartz, 4));
break;
case LIMITER:
list.add(new ItemStack(ModItems.plate_steel, 3));
list.add(new ItemStack(ModItems.plate_iron, 1));
list.add(new ItemStack(ModItems.circuit_copper, 2));
list.add(new ItemStack(ModItems.wire_copper, 4));
break;
case ANGRY_METAL:
list.add(new ItemStack(ModBlocks.block_meteor, 1));
break;
case CMB_TILE:
list.add(new ItemStack(ModItems.ingot_combine_steel, 1));
list.add(new ItemStack(ModItems.plate_combine_steel, 8));
break;
case CMB_BRICKS:
list.add(new ItemStack(ModBlocks.block_magnetized_tungsten, 4));
list.add(new ItemStack(ModBlocks.brick_concrete, 4));
list.add(new ItemStack(ModBlocks.cmb_brick, 1));
list.add(new ItemStack(ModItems.plate_steel, 4));
break;
case HATCH_FRAME:
list.add(new ItemStack(ModItems.ingot_steel, 3));
list.add(new ItemStack(ModItems.wire_aluminium, 4));
list.add(new ItemStack(Items.redstone, 2));
list.add(new ItemStack(ModBlocks.steel_roof, 5));
break;
case HATCH_CONTROLLER:
list.add(new ItemStack(ModItems.ingot_steel, 3));
list.add(new ItemStack(ModItems.ingot_red_copper, 1));
list.add(new ItemStack(Items.redstone, 4));
list.add(new ItemStack(ModBlocks.steel_roof, 5));
break;
case CENTRIFUGE:
list.add(new ItemStack(ModItems.centrifuge_tower, 1));
list.add(new ItemStack(ModItems.ingot_steel, 4));
list.add(new ItemStack(ModItems.plate_steel, 6));
list.add(new ItemStack(ModItems.plate_copper, 2));
list.add(new ItemStack(ModItems.wire_red_copper, 8));
break;
case BREEDING_REACTOR:
list.add(new ItemStack(ModItems.reactor_core, 1));
list.add(new ItemStack(ModItems.ingot_lead, 4));
list.add(new ItemStack(ModItems.ingot_steel, 2));
list.add(new ItemStack(ModItems.plate_steel, 4));
break;
case RTG_FURNACE:
list.add(new ItemStack(Blocks.furnace, 1));
list.add(new ItemStack(ModItems.rtg_unit, 3));
list.add(new ItemStack(ModItems.plate_lead, 6));
list.add(new ItemStack(ModItems.neutron_reflector, 4));
list.add(new ItemStack(ModItems.plate_copper, 2));
break;
case DIESEL_GENERATOR:
list.add(new ItemStack(ModItems.hull_small_steel, 4));
list.add(new ItemStack(Blocks.piston, 4));
list.add(new ItemStack(ModItems.ingot_steel, 6));
list.add(new ItemStack(ModItems.ingot_red_copper, 2));
list.add(new ItemStack(ModItems.plate_copper, 4));
list.add(new ItemStack(ModItems.wire_red_copper, 6));
break;
case NUCLEAR_GENERATOR:
list.add(new ItemStack(ModItems.ingot_steel, 6));
list.add(new ItemStack(ModItems.plate_lead, 8));
list.add(new ItemStack(ModItems.plate_copper, 4));
list.add(new ItemStack(ModItems.rod_lead, 12));
list.add(new ItemStack(ModItems.ingot_red_copper, 6));
list.add(new ItemStack(ModItems.circuit_red_copper, 4));
break;
case INDUSTRIAL_GENERATOR:
list.add(new ItemStack(ModItems.generator_front, 1));
list.add(new ItemStack(ModItems.generator_steel, 3));
list.add(new ItemStack(ModItems.rotor_steel, 3));
list.add(new ItemStack(ModItems.ingot_steel, 6));
list.add(new ItemStack(ModItems.board_copper, 4));
list.add(new ItemStack(ModItems.wire_gold, 8));
list.add(new ItemStack(ModBlocks.red_wire_coated, 2));
list.add(new ItemStack(ModItems.pedestal_steel, 2));
break;
case CYCLOTRON:
list.add(new ItemStack(ModItems.cyclotron_tower, 1));
list.add(new ItemStack(ModItems.board_copper, 4));
list.add(new ItemStack(ModItems.ingot_steel, 16));
list.add(new ItemStack(ModItems.plate_steel, 6));
list.add(new ItemStack(ModBlocks.machine_battery, 4));
list.add(new ItemStack(ModItems.wire_red_copper, 20));
list.add(new ItemStack(ModItems.circuit_red_copper, 12));
list.add(new ItemStack(ModItems.circuit_gold, 3));
break;
case RT_GENERATOR:
list.add(new ItemStack(ModItems.rtg_unit, 6));
list.add(new ItemStack(ModItems.plate_steel, 8));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case BATTERY:
list.add(new ItemStack(ModItems.ingot_steel, 4));
list.add(new ItemStack(ModItems.sulfur, 12));
list.add(new ItemStack(ModItems.powder_lead, 12));
list.add(new ItemStack(ModItems.ingot_red_copper, 2));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
break;
case HE_TO_RF:
list.add(new ItemStack(ModItems.ingot_steel, 4));
list.add(new ItemStack(ModItems.plate_steel, 4));
list.add(new ItemStack(ModItems.coil_copper, 2));
list.add(new ItemStack(ModItems.coil_copper_torus, 1));
break;
case RF_TO_HE:
list.add(new ItemStack(ModItems.ingot_beryllium, 4));
list.add(new ItemStack(ModItems.plate_steel, 4));
list.add(new ItemStack(ModItems.coil_copper, 2));
list.add(new ItemStack(ModItems.coil_copper_torus, 1));
break;
case SHREDDER:
list.add(new ItemStack(ModItems.ingot_steel, 2));
list.add(new ItemStack(ModItems.plate_steel, 4));
list.add(new ItemStack(ModItems.motor, 2));
list.add(new ItemStack(ModItems.wire_red_copper, 2));
list.add(new ItemStack(ModBlocks.steel_poles, 2));
list.add(new ItemStack(Blocks.iron_bars, 2));
list.add(new ItemStack(ModBlocks.red_wire_coated, 1));
break;
case DEUTERIUM_EXTRACTOR:
list.add(new ItemStack(ModItems.ingot_titanium, 4));
list.add(new ItemStack(ModItems.plate_titanium, 6));
list.add(new ItemStack(ModItems.wire_red_copper, 4));
list.add(new ItemStack(ModItems.tank_steel, 2));
list.add(new ItemStack(ModItems.coil_tungsten, 4));
break;
case DERRICK:
list.add(new ItemStack(ModBlocks.steel_scaffold, 20));
list.add(new ItemStack(ModBlocks.steel_poles, 8));
list.add(new ItemStack(ModItems.tank_steel, 2));
list.add(new ItemStack(ModItems.motor, 1));
list.add(new ItemStack(ModItems.pipes_steel, 3));
list.add(new ItemStack(ModItems.drill_titanium, 1));
list.add(new ItemStack(ModItems.wire_red_copper, 6));
break;
case FLARE_STACK:
list.add(new ItemStack(ModBlocks.steel_scaffold, 28));
list.add(new ItemStack(ModItems.tank_steel, 2));
list.add(new ItemStack(ModItems.pipes_steel, 2));
list.add(new ItemStack(ModItems.hull_small_steel, 1));
list.add(new ItemStack(ModItems.thermo_element, 3));
break;
case REFINERY:
list.add(new ItemStack(ModItems.ingot_titanium, 6));
list.add(new ItemStack(ModItems.plate_copper, 4));
list.add(new ItemStack(ModItems.tank_steel, 6));
list.add(new ItemStack(ModItems.coil_tungsten, 6));
list.add(new ItemStack(ModItems.wire_red_copper, 6));
break;
default:
break;
}
@ -1976,6 +2300,168 @@ public class MachineRecipes {
case GUN_PELLETS:
output = new ItemStack(ModItems.pellet_buckshot, 1);
break;
case AUSTRALIUM_MACHINE:
output = new ItemStack(ModItems.australium_iii, 1);
break;
case MAGNETRON:
output = new ItemStack(ModItems.magnetron, 1);
break;
case W_SP:
output = new ItemStack(ModItems.pellet_schrabidium, 1);
break;
case W_SHE:
output = new ItemStack(ModItems.pellet_hes, 1);
break;
case W_SME:
output = new ItemStack(ModItems.pellet_mes, 1);
break;
case W_SLE:
output = new ItemStack(ModItems.pellet_les, 1);
break;
case W_B:
output = new ItemStack(ModItems.pellet_beryllium, 1);
break;
case W_N:
output = new ItemStack(ModItems.pellet_neptunium, 1);
break;
case W_L:
output = new ItemStack(ModItems.pellet_lead, 1);
break;
case W_A:
output = new ItemStack(ModItems.pellet_advanced, 1);
break;
case UPGRADE_TEMPLATE:
output = new ItemStack(ModItems.upgrade_template, 1);
break;
case UPGRADE_RED_I:
output = new ItemStack(ModItems.upgrade_speed_1, 1);
break;
case UPGRADE_RED_II:
output = new ItemStack(ModItems.upgrade_speed_2, 1);
break;
case UPGRADE_RED_III:
output = new ItemStack(ModItems.upgrade_speed_3, 1);
break;
case UPGRADE_GREEN_I:
output = new ItemStack(ModItems.upgrade_effect_1, 1);
break;
case UPGRADE_GREEN_II:
output = new ItemStack(ModItems.upgrade_effect_2, 1);
break;
case UPGRADE_GREEN_III:
output = new ItemStack(ModItems.upgrade_effect_3, 1);
break;
case UPGRADE_BLUE_I:
output = new ItemStack(ModItems.upgrade_power_1, 1);
break;
case UPGRADE_BLUE_II:
output = new ItemStack(ModItems.upgrade_power_2, 1);
break;
case UPGRADE_BLUE_III:
output = new ItemStack(ModItems.upgrade_power_3, 1);
break;
case UPGRADE_PURPLE_I:
output = new ItemStack(ModItems.upgrade_fortune_1, 1);
break;
case UPGRADE_PURPLE_II:
output = new ItemStack(ModItems.upgrade_fortune_2, 1);
break;
case UPGRADE_PURPLE_III:
output = new ItemStack(ModItems.upgrade_fortune_3, 1);
break;
case FUSE:
output = new ItemStack(ModItems.fuse, 1);
break;
case REDCOIL_CAPACITOR:
output = new ItemStack(ModItems.redcoil_capacitor, 1);
break;
case TITANIUM_FILTER:
output = new ItemStack(ModItems.titanium_filter, 1);
break;
case LITHIUM_BOX:
output = new ItemStack(ModItems.part_lithium, 1);
break;
case BERYLLIUM_BOX:
output = new ItemStack(ModItems.part_beryllium, 1);
break;
case COAL_BOX:
output = new ItemStack(ModItems.part_carbon, 1);
break;
case COPPER_BOX:
output = new ItemStack(ModItems.part_copper, 1);
break;
case PLUTONIUM_BOX:
output = new ItemStack(ModItems.part_plutonium, 1);
break;
case THERMO_ELEMENT:
output = new ItemStack(ModItems.thermo_element, 1);
break;
case LIMITER:
output = new ItemStack(ModItems.limiter, 1);
break;
case ANGRY_METAL:
output = new ItemStack(ModItems.plate_dalekanium, 1);
break;
case CMB_TILE:
output = new ItemStack(ModBlocks.cmb_brick, 8);
break;
case CMB_BRICKS:
output = new ItemStack(ModBlocks.cmb_brick_reinforced, 8);
break;
case HATCH_FRAME:
output = new ItemStack(ModBlocks.seal_frame, 1);
break;
case HATCH_CONTROLLER:
output = new ItemStack(ModBlocks.seal_controller, 1);
break;
case CENTRIFUGE:
output = new ItemStack(ModBlocks.machine_centrifuge, 1);
break;
case BREEDING_REACTOR:
output = new ItemStack(ModBlocks.machine_reactor, 1);
break;
case RTG_FURNACE:
output = new ItemStack(ModBlocks.machine_rtg_furnace_off, 1);
break;
case DIESEL_GENERATOR:
output = new ItemStack(ModBlocks.machine_diesel, 1);
break;
case NUCLEAR_GENERATOR:
output = new ItemStack(ModBlocks.machine_generator, 1);
break;
case INDUSTRIAL_GENERATOR:
output = new ItemStack(ModBlocks.machine_industrial_generator, 1);
break;
case CYCLOTRON:
output = new ItemStack(ModBlocks.machine_cyclotron, 1);
break;
case RT_GENERATOR:
output = new ItemStack(ModBlocks.machine_rtg_grey, 1);
break;
case BATTERY:
output = new ItemStack(ModBlocks.machine_battery, 1);
break;
case HE_TO_RF:
output = new ItemStack(ModBlocks.machine_converter_he_rf, 1);
break;
case RF_TO_HE:
output = new ItemStack(ModBlocks.machine_converter_rf_he, 1);
break;
case SHREDDER:
output = new ItemStack(ModBlocks.machine_shredder, 1);
break;
case DEUTERIUM_EXTRACTOR:
output = new ItemStack(ModBlocks.machine_deuterium, 1);
break;
case DERRICK:
output = new ItemStack(ModBlocks.machine_well, 1);
break;
case FLARE_STACK:
output = new ItemStack(ModBlocks.machine_flare, 1);
break;
case REFINERY:
output = new ItemStack(ModBlocks.machine_refinery, 1);
break;
default:
break;
}

View File

@ -47,7 +47,7 @@ public class ItemAssemblyTemplate extends Item {
UPGRADE_BLUE_III, UPGRADE_PURPLE_I, UPGRADE_PURPLE_II, UPGRADE_PURPLE_III, FUSE, REDCOIL_CAPACITOR,
TITANIUM_FILTER, LITHIUM_BOX, BERYLLIUM_BOX, COAL_BOX, COPPER_BOX, PLUTONIUM_BOX, THERMO_ELEMENT,
LIMITER, ANGRY_METAL, CMB_TILE, CMB_BRICKS, HATCH_FRAME, HATCH_CONTROLLER, CENTRIFUGE,
BREEDING_REACTOR, RTG_FURNACE, DIESEL_GENERATOR, NUCLEAR_GENERATOR, INDUSTRIAL_GENERATOR, CACLOTRON,
BREEDING_REACTOR, RTG_FURNACE, DIESEL_GENERATOR, NUCLEAR_GENERATOR, INDUSTRIAL_GENERATOR, CYCLOTRON,
RT_GENERATOR, BATTERY, HE_TO_RF, RF_TO_HE, SHREDDER, DEUTERIUM_EXTRACTOR, DERRICK, FLARE_STACK,
REFINERY;

View File

@ -5,6 +5,7 @@ import java.util.List;
import java.util.UUID;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.DummyBlockAssembler;
import com.hbm.calc.UnionOfTileEntitiesAndBooleans;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForGas;
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil;
@ -25,6 +26,7 @@ import com.hbm.items.ModItems;
import com.hbm.items.special.ItemBattery;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.TileEntityCable;
import com.hbm.tileentity.TileEntityDummy;
import com.hbm.tileentity.TileEntityFluidDuct;
import com.hbm.tileentity.TileEntityGasDuct;
import com.hbm.tileentity.TileEntityGasDuctSolid;
@ -283,7 +285,8 @@ public class Library {
world.getBlock(x, y, z) == ModBlocks.dummy_port_cyclotron ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_well ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_flare ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_drill)
world.getBlock(x, y, z) == ModBlocks.dummy_port_drill ||
world.getBlock(x, y, z) == ModBlocks.dummy_port_assembler)
{
return true;
}
@ -775,6 +778,7 @@ public class Library {
Block block = worldObj.getBlock(x, y, z);
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
//Factories
if(block == ModBlocks.factory_titanium_conductor && worldObj.getBlock(x, y + 1, z) == ModBlocks.factory_titanium_core)
{
tileentity = worldObj.getTileEntity(x, y + 1, z);
@ -791,6 +795,7 @@ public class Library {
{
tileentity = worldObj.getTileEntity(x, y - 1, z);
}
//Derrick
if(block == ModBlocks.dummy_port_well && worldObj.getBlock(x + 1, y, z) == ModBlocks.machine_well)
{
tileentity = worldObj.getTileEntity(x + 1, y, z);
@ -807,6 +812,7 @@ public class Library {
{
tileentity = worldObj.getTileEntity(x, y, z - 1);
}
//Mining Drill
if(block == ModBlocks.dummy_port_drill && worldObj.getBlock(x + 1, y, z) == ModBlocks.machine_drill)
{
tileentity = worldObj.getTileEntity(x + 1, y, z);
@ -823,6 +829,11 @@ public class Library {
{
tileentity = worldObj.getTileEntity(x, y, z - 1);
}
//Assembler
if(block == ModBlocks.dummy_port_assembler)
{
tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ);
}
if(tileentity instanceof IConductor)
{

View File

@ -839,7 +839,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.alloy_pickaxe, 1), new Object[] { "III", " S ", " S ", 'I', ModItems.ingot_advanced_alloy, 'S', Items.stick });
GameRegistry.addRecipe(new ItemStack(ModItems.alloy_axe, 1), new Object[] { "II", "IS", " S", 'I', ModItems.ingot_advanced_alloy, 'S', Items.stick });
GameRegistry.addRecipe(new ItemStack(ModItems.alloy_shovel, 1), new Object[] { "I", "S", "S", 'I', ModItems.ingot_advanced_alloy, 'S', Items.stick });
GameRegistry.addRecipe(new ItemStack(ModItems.alloy_hoe, 1), new Object[] { "II", " S", " S", 'I', ModItems.ingot_combine_steel, 'S', Items.stick });
GameRegistry.addRecipe(new ItemStack(ModItems.alloy_hoe, 1), new Object[] { "II", " S", " S", 'I', ModItems.ingot_advanced_alloy, 'S', Items.stick });
GameRegistry.addRecipe(new ItemStack(ModItems.cmb_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_combine_steel });
GameRegistry.addRecipe(new ItemStack(ModItems.cmb_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_combine_steel });
GameRegistry.addRecipe(new ItemStack(ModItems.cmb_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_combine_steel });

View File

@ -242,6 +242,63 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve
} else
progress = 0;
int meta = worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
TileEntity te = null;
if(meta == 2) {
te = worldObj.getTileEntity(xCoord - 2, yCoord, zCoord);
}
if(meta == 3) {
te = worldObj.getTileEntity(xCoord + 2, yCoord, zCoord);
}
if(meta == 4) {
te = worldObj.getTileEntity(xCoord, yCoord, zCoord + 2);
}
if(meta == 5) {
te = worldObj.getTileEntity(xCoord, yCoord, zCoord - 2);
}
if(te != null && te instanceof TileEntityChest) {
TileEntityChest chest = (TileEntityChest)te;
tryFillContainer(chest, 5);
}
if(te != null && te instanceof TileEntityHopper) {
TileEntityHopper hopper = (TileEntityHopper)te;
tryFillContainer(hopper, 5);
}
te = null;
if(meta == 2) {
te = worldObj.getTileEntity(xCoord + 3, yCoord, zCoord - 1);
}
if(meta == 3) {
te = worldObj.getTileEntity(xCoord - 3, yCoord, zCoord + 1);
}
if(meta == 4) {
te = worldObj.getTileEntity(xCoord - 1, yCoord, zCoord - 3);
}
if(meta == 5) {
te = worldObj.getTileEntity(xCoord + 1, yCoord, zCoord + 3);
}
if(te != null && te instanceof TileEntityChest) {
TileEntityChest chest = (TileEntityChest)te;
for(int i = 0; i < chest.getSizeInventory(); i++)
if(tryFillAssembler(chest, i))
break;
}
if(te != null && te instanceof TileEntityHopper) {
TileEntityHopper hopper = (TileEntityHopper)te;
for(int i = 0; i < hopper.getSizeInventory(); i++)
if(tryFillAssembler(hopper, i))
break;
}
}
}
@ -259,6 +316,7 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve
return stack;
}
//Unloads output into chests
public boolean tryFillContainer(IInventory inventory, int slot) {
int size = inventory.getSizeInventory();
@ -312,6 +370,79 @@ public class TileEntityMachineAssembler extends TileEntity implements ISidedInve
return false;
}
//Loads assembler's input queue from chests
public boolean tryFillAssembler(IInventory inventory, int slot) {
if(MachineRecipes.getOutputFromTempate(slots[4]) == null || MachineRecipes.getRecipeFromTempate(slots[4]) == null)
return false;
else {
List<ItemStack> list = MachineRecipes.getRecipeFromTempate(slots[4]);
for(int i = 0; i < list.size(); i++)
list.get(i).stackSize = 1;
if(inventory.getStackInSlot(slot) == null)
return false;
ItemStack stack = inventory.getStackInSlot(slot).copy();
stack.stackSize = 1;
boolean flag = false;
for(int i = 0; i < list.size(); i++)
if(ItemStack.areItemStacksEqual(stack, list.get(i)) && ItemStack.areItemStackTagsEqual(stack, list.get(i)))
flag = true;
if(!flag)
return false;
}
for(int i = 6; i < 18; i++) {
if(slots[i] != null) {
ItemStack sta1 = inventory.getStackInSlot(slot).copy();
ItemStack sta2 = slots[i].copy();
if(sta1 != null && sta2 != null) {
sta1.stackSize = 1;
sta2.stackSize = 1;
if(ItemStack.areItemStacksEqual(sta1, sta2) && ItemStack.areItemStackTagsEqual(sta1, sta2) && slots[i].stackSize < slots[i].getMaxStackSize()) {
ItemStack sta3 = inventory.getStackInSlot(slot).copy();
sta3.stackSize--;
if(sta3.stackSize <= 0)
sta3 = null;
inventory.setInventorySlotContents(slot, sta3);
slots[i].stackSize++;
return true;
}
}
}
}
for(int i = 6; i < 18; i++) {
ItemStack sta2 = inventory.getStackInSlot(slot).copy();
if(slots[i] == null && sta2 != null) {
sta2.stackSize = 1;
slots[i] = sta2.copy();
ItemStack sta3 = inventory.getStackInSlot(slot).copy();
sta3.stackSize--;
if(sta3.stackSize <= 0)
sta3 = null;
inventory.setInventorySlotContents(slot, sta3);
return true;
}
}
return false;
}
public boolean hasSpace(ItemStack stack) {
ItemStack st = stack.copy();