Gun mechanism recipes, small reactor fix
@ -557,6 +557,13 @@ item.circuit_targeting_tier3.name=Militärische Schaltplatte (Stufe 3)
|
||||
item.circuit_targeting_tier4.name=Militärische Schaltplatte (Stufe 4)
|
||||
item.circuit_targeting_tier5.name=Militärische Schaltplatte (Stufe 5)
|
||||
item.circuit_targeting_tier6.name=Militärische Schaltplatte (Stufe 6)
|
||||
item.mechanism_revolver_1.name=Revolvermechanismus
|
||||
item.mechanism_revolver_2.name=Fortgeschrittener Revolvermechanismus
|
||||
item.mechanism_rifle_1.name=Gewehmechanismus
|
||||
item.mechanism_rifle_2.name=Fortgeschrittener Gewehmechanismus
|
||||
item.mechanism_launcher_1.name=Werfermechanismus
|
||||
item.mechanism_launcher_2.name=Fortgeschrittener Werfermechanismus
|
||||
item.mechanism_special.name=High-Tech Waffenmechanismus
|
||||
|
||||
item.piston_selenium.name=Sternmotorenkolben
|
||||
|
||||
|
||||
@ -557,6 +557,13 @@ item.circuit_targeting_tier3.name=Military Grade Circuit Board (Tier 3)
|
||||
item.circuit_targeting_tier4.name=Military Grade Circuit Board (Tier 4)
|
||||
item.circuit_targeting_tier5.name=Military Grade Circuit Board (Tier 5)
|
||||
item.circuit_targeting_tier6.name=Military Grade Circuit Board (Tier 6)
|
||||
item.mechanism_revolver_1.name=Revolver Mechanism
|
||||
item.mechanism_revolver_2.name=Advanced Revolver Mechanism
|
||||
item.mechanism_rifle_1.name=Rifle Mechanism
|
||||
item.mechanism_rifle_2.name=Advanced Rifle Mechanism
|
||||
item.mechanism_launcher_1.name=Launcher Mechanism
|
||||
item.mechanism_launcher_2.name=Advanced Launcher Mechanism
|
||||
item.mechanism_special.name=High-Tech Weapon Mechanism
|
||||
|
||||
item.piston_selenium.name=Radial Engine Piston
|
||||
|
||||
|
||||
BIN
assets/hbm/textures/items/mechanism_1.png
Normal file
|
After Width: | Height: | Size: 281 B |
BIN
assets/hbm/textures/items/mechanism_2.png
Normal file
|
After Width: | Height: | Size: 296 B |
BIN
assets/hbm/textures/items/mechanism_3.png
Normal file
|
After Width: | Height: | Size: 316 B |
BIN
assets/hbm/textures/items/mechanism_4.png
Normal file
|
After Width: | Height: | Size: 296 B |
BIN
assets/hbm/textures/items/mechanism_5.png
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
assets/hbm/textures/items/mechanism_6.png
Normal file
|
After Width: | Height: | Size: 290 B |
BIN
assets/hbm/textures/items/mechanism_7.png
Normal file
|
After Width: | Height: | Size: 401 B |
@ -3090,6 +3090,7 @@ public class MachineRecipes {
|
||||
list.add(new ItemStack(ModItems.ingot_steel, 2));
|
||||
list.add(new ItemStack(ModItems.ingot_polymer, 8));
|
||||
list.add(new ItemStack(ModItems.plate_iron, 5));
|
||||
list.add(new ItemStack(ModItems.mechanism_special, 3));
|
||||
list.add(new ItemStack(Items.diamond, 1));
|
||||
list.add(new ItemStack(ModItems.plate_dalekanium, 3));
|
||||
break;
|
||||
|
||||
@ -274,6 +274,14 @@ public class ModItems {
|
||||
public static Item circuit_gold;
|
||||
public static Item circuit_schrabidium;
|
||||
|
||||
public static Item mechanism_revolver_1;
|
||||
public static Item mechanism_revolver_2;
|
||||
public static Item mechanism_rifle_1;
|
||||
public static Item mechanism_rifle_2;
|
||||
public static Item mechanism_launcher_1;
|
||||
public static Item mechanism_launcher_2;
|
||||
public static Item mechanism_special;
|
||||
|
||||
public static Item circuit_targeting_tier1;
|
||||
public static Item circuit_targeting_tier2;
|
||||
public static Item circuit_targeting_tier3;
|
||||
@ -1563,6 +1571,13 @@ public class ModItems {
|
||||
circuit_targeting_tier4 = new Item().setUnlocalizedName("circuit_targeting_tier4").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":circuit_targeting_tier4");
|
||||
circuit_targeting_tier5 = new Item().setUnlocalizedName("circuit_targeting_tier5").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":circuit_targeting_tier5");
|
||||
circuit_targeting_tier6 = new Item().setUnlocalizedName("circuit_targeting_tier6").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":circuit_targeting_tier6");
|
||||
mechanism_revolver_1 = new Item().setUnlocalizedName("mechanism_revolver_1").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_1");
|
||||
mechanism_revolver_2 = new Item().setUnlocalizedName("mechanism_revolver_2").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_3");
|
||||
mechanism_rifle_1 = new Item().setUnlocalizedName("mechanism_rifle_1").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_2");
|
||||
mechanism_rifle_2 = new Item().setUnlocalizedName("mechanism_rifle_2").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_4");
|
||||
mechanism_launcher_1 = new Item().setUnlocalizedName("mechanism_launcher_1").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_5");
|
||||
mechanism_launcher_2 = new Item().setUnlocalizedName("mechanism_launcher_2").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_6");
|
||||
mechanism_special = new Item().setUnlocalizedName("mechanism_special").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_7");
|
||||
|
||||
wiring_red_copper = new ItemWiring().setUnlocalizedName("wiring_red_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wiring_red_copper");
|
||||
|
||||
@ -2784,6 +2799,15 @@ public class ModItems {
|
||||
GameRegistry.registerItem(circuit_targeting_tier5, circuit_targeting_tier5.getUnlocalizedName());
|
||||
GameRegistry.registerItem(circuit_targeting_tier6, circuit_targeting_tier6.getUnlocalizedName());
|
||||
|
||||
//Gun Mechanisms
|
||||
GameRegistry.registerItem(mechanism_revolver_1, mechanism_revolver_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mechanism_revolver_2, mechanism_revolver_2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mechanism_rifle_1, mechanism_rifle_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mechanism_rifle_2, mechanism_rifle_2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mechanism_launcher_1, mechanism_launcher_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mechanism_launcher_2, mechanism_launcher_2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mechanism_special, mechanism_special.getUnlocalizedName());
|
||||
|
||||
//Wiring
|
||||
GameRegistry.registerItem(wiring_red_copper, wiring_red_copper.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -603,6 +603,14 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_obsidian_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', "ingotBrick", 'S', Blocks.obsidian }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_schrabidium_flat, 1), new Object[] { " R ", "III", "SSS", 'R', "dustRedstone", 'I', "ingotBrick", 'S', "ingotSchrabidium" }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_revolver_1, 1), new Object[] { " II", "ICA", "IKW", 'I', "plateIron", 'C', "ingotCopper", 'A', "ingotAluminum", 'K', ModItems.wire_copper, 'W', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_revolver_2, 1), new Object[] { " II", "ICA", "IKW", 'I', "plateAdvanced", 'C', "ingotDuraSteel", 'A', "ingotTungsten", 'K', ModItems.bolt_dura_steel, 'W', ModItems.bolt_tungsten }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_rifle_1, 1), new Object[] { "ICI", "CMA", "IAM", 'I', "plateIron", 'C', "ingotCopper", 'A', "ingotAluminum", 'M', ModItems.mechanism_revolver_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_rifle_2, 1), new Object[] { "ICI", "CMA", "IAM", 'I', "plateAdvanced", 'C', "ingotDuraSteel", 'A', "ingotTungsten", 'M', ModItems.mechanism_revolver_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_launcher_1, 1), new Object[] { "TTT", "SSS", "BBI", 'T', "plateTitanium", 'S', "ingotSteel", 'B', ModItems.bolt_tungsten, 'I', "ingotRedstoneAlloy" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_launcher_2, 1), new Object[] { "TTT", "SSS", "BBI", 'T', "plateAdvanced", 'S', "ingotPolymer", 'B', ModItems.bolt_dura_steel, 'I', "ingotDesh" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mechanism_special, 1), new Object[] { "PCI", "ISS", "PCI", 'P', "plateDesh", 'C', ModItems.coil_advanced_alloy, 'I', ModItems.ingot_starmetal, 'S', ModItems.circuit_targeting_tier3 }));
|
||||
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reactor_element), 1), new Object[] { "SCS", "CSC", "SCS", 'S', "ingotSteel", 'C', ModItems.rod_quad_empty }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reactor_control), 1), new Object[] { "SLS", "SLS", "SLS", 'S', "ingotSteel", 'L', "ingotLead" }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reactor_conductor), 1), new Object[] { "SWS", "FFF", "SWS", 'S', "ingotSteel", 'W', Item.getItemFromBlock(ModBlocks.red_wire_coated), 'F', ModItems.fuse }));
|
||||
@ -658,61 +666,61 @@ public class CraftingManager {
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.seal_frame, 2), new Object[] { "SSS", "WRW", "III", 'S', ModBlocks.steel_roof, 'W', ModItems.wire_aluminium, 'R', "dustRedstone", 'I', "ingotSteel" }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.seal_controller, 1), new Object[] { "SSS", "RCR", "III", 'S', ModBlocks.steel_roof, 'C', ModItems.ingot_red_copper, 'R', "dustRedstone", 'I', "ingotSteel" }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " SW", 'S', "plateSteel", 'W', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg_ammo, 8), new Object[] { "SI ", "ITI", " I ", 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CSW", 'S', "plateSteel", 'W', "plateTitanium", 'C', ModItems.circuit_red_copper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " MW", 'S', "plateSteel", 'W', "plateIron", 'M', ModItems.mechanism_launcher_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg_ammo, 8), new Object[] { "SI ", "ITI", " I ", 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron", 'M', ModItems.mechanism_launcher_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CMW", 'S', "plateSteel", 'W', "plateTitanium", 'C', ModItems.circuit_red_copper, 'M', ModItems.mechanism_launcher_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_stinger_ammo, 4), new Object[] { "SS ", "STI", " IR", 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateAluminum", 'R', "dustRedstone" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSS", " RW", 'S', "plateSteel", 'W', Item.getItemFromBlock(Blocks.planks), 'R', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSM", " RW", 'S', "plateSteel", 'W', Item.getItemFromBlock(Blocks.planks), 'R', ModItems.wire_aluminium, 'M', ModItems.mechanism_revolver_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_ammo, 16), new Object[] { "L", "S", "G", 'L', "plateLead", 'S', "plateSteel", 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_iron, 1), new Object[] { "SSS", " RW", 'S', "plateIron", 'W', Item.getItemFromBlock(Blocks.planks), 'R', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_iron, 1), new Object[] { "SSM", " RW", 'S', "plateIron", 'W', Item.getItemFromBlock(Blocks.planks), 'R', ModItems.wire_aluminium, 'M', ModItems.mechanism_revolver_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_iron_ammo, 16), new Object[] { "L", "S", "G", 'L', "plateIron", 'S', "plateCopper", 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_gold, 1), new Object[] { "SSS", " RW", 'S', "plateGold", 'W', "ingotGold", 'R', ModItems.wire_gold }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_gold, 1), new Object[] { "SSM", " RW", 'S', "plateGold", 'W', "ingotGold", 'R', ModItems.wire_gold, 'M', ModItems.mechanism_revolver_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_gold_ammo, 16), new Object[] { "L", "L", "S", 'L', ModItems.plate_gold, 'S', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead, 1), new Object[] { "SSS", " RW", 'S', "plateLead", 'W', "ingotTungsten", 'R', ModItems.wire_tungsten }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead, 1), new Object[] { "SSM", " RW", 'S', "plateLead", 'W', "ingotTungsten", 'R', ModItems.wire_tungsten, 'M', ModItems.mechanism_revolver_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", "G", 'L', "paneGlass", 'S', ModItems.ingot_u235, 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", "G", 'L', "paneGlass", 'S', ModItems.ingot_pu239, 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", "G", 'L', "paneGlass", 'S', ModItems.nuclear_waste, 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", "G", 'L', "paneGlass", 'S', ModItems.trinitite, 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_schrabidium, 1), new Object[] { "SSS", " RW", 'S', ModBlocks.block_schrabidium, 'W', "ingotTungsten", 'R', ModItems.wire_schrabidium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_schrabidium, 1), new Object[] { "SSM", " RW", 'S', ModBlocks.block_schrabidium, 'W', "ingotTungsten", 'R', ModItems.wire_schrabidium, 'M', ModItems.mechanism_special }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gun_revolver_schrabidium_ammo, 16), new Object[] { "L", "N", "S", 'L', ModItems.plate_schrabidium, 'S', Items.gunpowder, 'N', Items.nether_star });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed, 1), new Object[] { "TTM", "SRI", 'S', "plateSteel", 'I', "ingotSteel", 'R', ModItems.wire_red_copper, 'T', "plateTitanium", 'M', ModItems.motor }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed, 1), new Object[] { "TTM", "SRI", 'S', "plateSteel", 'I', "ingotSteel", 'R', ModItems.wire_red_copper, 'T', "plateTitanium", 'M', ModItems.mechanism_revolver_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed_ammo, 32), new Object[] { "L", "L", 'L', "plateSteel", 'S', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_nightmare, 1), new Object[] { "SSE", " RW", 'S', "plateSteel", 'W', Item.getItemFromBlock(Blocks.planks), 'R', ModItems.wire_aluminium, 'E', ModItems.powder_power }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_nightmare, 1), new Object[] { "SEM", " RW", 'S', "plateSteel", 'W', Item.getItemFromBlock(Blocks.planks), 'R', ModItems.wire_aluminium, 'E', ModItems.powder_power, 'M', ModItems.mechanism_revolver_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_nightmare_ammo, 16), new Object[] { "L", "S", "G", 'L', "plateDenseLead", 'S', "plateSteel", 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_nightmare2, 1), new Object[] { "SSS", "RRW", 'S', "plateDenseLead", 'W', "ingotTungsten", 'R', ModItems.wire_gold }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_nightmare2, 1), new Object[] { "SSM", "RRW", 'S', "plateDenseLead", 'W', "ingotTungsten", 'R', ModItems.wire_gold, 'M', ModItems.mechanism_special }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gun_revolver_nightmare2_ammo, 6), new Object[] { "L", "S", "G", 'L', ModItems.powder_power, 'S', ModItems.plate_polymer, 'G', Items.gunpowder });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "SSI", "III", "WPH", 'S', "plateSteel", 'I', "ingotSteel", 'W', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston) }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "SSI", "IIM", "WPH", 'S', "plateSteel", 'I', "ingotSteel", 'W', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston), 'M', ModItems.mechanism_launcher_2 }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman_ammo, 2), new Object[] { " S ", "SPS", "ITI", 'S', "plateSteel", 'P', ModItems.ingot_pu239, 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mirv, 1), new Object[] { "LLL", "WFW", "SSS", 'S', "plateSteel", 'L', "plateLead", 'W', ModItems.wire_gold, 'F', ModItems.gun_fatman }));
|
||||
//GameRegistry.addRecipe(new ItemStack(ModItems.gun_mirv_ammo, 1), new Object[] { "NNN", "NSN", "NNN", 'S', ModItems.hull_small_steel, 'N', ModItems.gun_fatman_ammo });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bf, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_paa, 'L', "plateDenseLead", 'W', ModItems.wire_advanced_alloy, 'F', ModItems.gun_mirv }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gun_bf_ammo, 1), new Object[] { "AEA", "SHS", "AEA", 'H', ModItems.hull_small_steel, 'A', ModItems.cell_antimatter, 'S', ModItems.cell_anti_schrabidium, 'E', ModItems.powder_power });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp40, 1), new Object[] { "III", " SW", " S ", 'S', "plateSteel", 'I', "ingotSteel", 'W', "plankWood" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp40, 1), new Object[] { "IIM", " SW", " S ", 'S', "plateSteel", 'I', "ingotSteel", 'W', "plankWood", 'M', ModItems.mechanism_rifle_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp40_ammo, 16), new Object[] { "L", "P", "G", 'P', "plateCopper", 'L', "plateLead", 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uboinik, 1), new Object[] { "II ", "SPW", 'P', "plateSteel", 'I', "ingotSteel", 'W', "plankWood", 'S', Items.stick }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uboinik, 1), new Object[] { "IIM", "SPW", 'P', "plateSteel", 'I', "ingotSteel", 'W', "plankWood", 'S', Items.stick, 'M', ModItems.mechanism_revolver_2 }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gun_uboinik_ammo, 6), new Object[] { "P", "S", "G", 'P', ModItems.pellet_buckshot, 'S', ModItems.plate_polymer, 'G', Items.gunpowder });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', "plateSteel", 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.circuit_copper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', "plateSteel", 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.mechanism_special }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 64), new Object[] { "SSS", "SRS", "SSS", 'S', "plateSteel", 'R', ModItems.rod_quad_uranium_fuel_depleted }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 32), new Object[] { " S ", "SRS", " S ", 'S', "plateSteel", 'R', ModItems.rod_dual_uranium_fuel_depleted }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', "plateSteel", 'R', ModItems.rod_uranium_fuel_depleted }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', "plateSteel", 'R', ModItems.rod_uranium_fuel_depleted }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', "plateSteel", 'R', "U238" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', "plateSteel", 'R', "U238" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_osipr, 1), new Object[] { "CCT", "WWI", "MCC", 'C', ModItems.plate_combine_steel, 'T', "ingotTungsten", 'W', ModItems.wire_magnetized_tungsten, 'I', ModItems.ingot_magnetized_tungsten, 'M', ModItems.coil_magnetized_tungsten }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_osipr, 1), new Object[] { "CCT", "WWI", "MCC", 'C', ModItems.plate_combine_steel, 'T', "ingotTungsten", 'W', ModItems.wire_magnetized_tungsten, 'I', ModItems.mechanism_rifle_2, 'M', ModItems.coil_magnetized_tungsten }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_osipr_ammo, 16), new Object[] { "G", "R", "S", 'G', "dustGlowstone", 'R', "dustRedstone", 'S', "plateSteel" }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_osipr_ammo, 16), new Object[] { "R", "G", "S", 'G', "dustGlowstone", 'R', "dustRedstone", 'S', "plateSteel" }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_osipr_ammo2, 1), new Object[] { " C ", "PPP", " C ", 'C', ModItems.plate_combine_steel, 'P', ModItems.powder_power }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_immolator, 1), new Object[] { "WCC", "PMT", "WAA", 'W', ModItems.wire_gold, 'C', "plateCopper", 'P', "plateAdvanced", 'M', ModItems.motor, 'T', ModItems.tank_steel, 'A', "plateSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_immolator, 1), new Object[] { "WCC", "PMT", "WAA", 'W', ModItems.wire_gold, 'C', "plateCopper", 'P', "plateAdvanced", 'M', ModItems.mechanism_launcher_1, 'T', ModItems.tank_steel, 'A', "plateSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_immolator_ammo, 16), new Object[] { "SPS", "PCP", "SPS", 'S', "plateSteel", 'C', "dustCoal", 'P', ModItems.powder_fire }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_immolator_ammo, 16), new Object[] { " F ", "SFS", " F ", 'S', "plateSteel", 'F', ModItems.canister_fuel }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_immolator_ammo, 24), new Object[] { " F ", "SFS", " F ", 'S', "plateSteel", 'F', ModItems.canister_napalm }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_cryolator, 1), new Object[] { "SSS", "IWL", "LMI", 'S', "plateSteel", 'I', "plateIron", 'L', Items.leather, 'M', ModItems.motor, 'W', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_cryolator, 1), new Object[] { "SSS", "IWL", "LMI", 'S', "plateSteel", 'I', "plateIron", 'L', Items.leather, 'M', ModItems.mechanism_launcher_1, 'W', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_cryolator_ammo, 16), new Object[] { "SPS", "PCP", "SPS", 'S', "plateSteel", 'C', "dustSalpeter", 'P', Items.snowball }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_cryolator_ammo, 16), new Object[] { " F ", "SFS", " F ", 'S', "plateSteel", 'F', ModItems.powder_ice }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_zomg, 1), new Object[] { "PRR", "CCS", "PXX", 'P', ModItems.plate_paa, 'R', "plateDenseLead", 'S', ModItems.singularity_counter_resonant, 'X', ModItems.crystal_xen, 'C', ModItems.coil_magnetized_tungsten}));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp, 1), new Object[] { "EEE", "SSM", "III", 'E', ModItems.ingot_euphemium, 'S', "plateSteel", 'I', "ingotSteel", 'M', ModItems.motor}));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp, 1), new Object[] { "EEE", "SSM", "III", 'E', ModItems.ingot_euphemium, 'S', "plateSteel", 'I', "ingotSteel", 'M', ModItems.mechanism_rifle_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp_ammo, 32), new Object[] { "G", "C", 'G', "plateGold", 'C', "plateCopper", 'S', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_emp, 1), new Object[] { "CPG", "CMF", "CPI", 'C', ModItems.coil_copper, 'P', "plateLead", 'G', ModItems.circuit_gold, 'M', ModItems.magnetron, 'I', "ingotTungsten", 'F', ModItems.fuse }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_emp, 1), new Object[] { "CPG", "CMF", "CPI", 'C', ModItems.coil_copper, 'P', "plateLead", 'G', ModItems.circuit_gold, 'M', ModItems.magnetron, 'I', "ingotTungsten", 'F', ModItems.mechanism_special }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_emp_ammo, 8), new Object[] { "IGI", "IPI", "IPI", 'G', "plateGold", 'I', "plateIron", 'P', ModItems.powder_power }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_jack, 1), new Object[] { "WW ", "TSD", " TT", 'W', "ingotWeidanium", 'T', ModItems.toothpicks, 'S', ModItems.gun_uboinik, 'D', ModItems.ducttape }));
|
||||
GameRegistry.addShapedRecipe(new ItemStack(ModItems.gun_jack_ammo, 3), new Object[] { "PP", "II", "GG", 'G', Items.gunpowder, 'P', ModItems.pellet_buckshot, 'I', ModItems.plate_polymer });
|
||||
@ -726,15 +734,18 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_hp_ammo, 8), new Object[] { " R ", "BSK", " Y ", 'S', "plateSteel", 'K', new ItemStack(Items.dye, 1, 0), 'R', new ItemStack(Items.dye, 1, 1), 'B', new ItemStack(Items.dye, 1, 4), 'Y', new ItemStack(Items.dye, 1, 11) }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_defabricator, 1), new Object[] { " SS", "DDD", "TCB", 'S', "plateSteel", 'D', ModItems.plate_dalekanium, 'T', "plateTitanium", 'C', ModItems.circuit_gold, 'B', ModItems.battery_lithium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_defabricator_ammo, 16), new Object[] { "PCP", "DDD", "PCP", 'P', "plateSteel", 'C', ModItems.coil_copper, 'D', "dustLithium" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_lever_action, 1), new Object[] { "PPI", "SWD", 'P', "plateIron", 'I', "ingotIron", 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_lever_action_dark, 1), new Object[] { "PPI", "SWD", 'P', "plateSteel", 'I', "ingotSteel", 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_lever_action, 1), new Object[] { "PPI", "SWD", 'P', "plateIron", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_lever_action_dark, 1), new Object[] { "PPI", "SWD", 'P', "plateSteel", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_aluminium }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_lever_action_ammo, 6), new Object[] { "P", "S", "G", 'P', ModItems.pellet_buckshot, 'S', "plateCopper", 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action, 1), new Object[] { "PPI", "SWD", 'P', "plateSteel", 'I', "ingotSteel", 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_copper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_green, 1), new Object[] { "PPI", "SWD", 'P', "plateIron", 'I', "ingotIron", 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_copper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action, 1), new Object[] { "PPI", "SWD", 'P', "plateSteel", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_copper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_green, 1), new Object[] { "PPI", "SWD", 'P', "plateIron", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_copper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_ammo, 2), new Object[] { "P", "S", "G", 'P', "nuggetLead", 'S', ModItems.plate_polymer, 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_b92, 1), new Object[] { "SSS", " EP", 'P', "ingotPolymer", 'S', ModItems.ingot_starmetal, 'E', ModItems.powder_spark_mix }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_b92_ammo, 1), new Object[] { "PSP", "ESE", "PSP", 'P', "plateSteel", 'S', ModItems.ingot_starmetal, 'E', ModItems.powder_spark_mix }));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.weaponized_starblaster_cell, 1), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, FluidType.ACID.getID()), GunB92Cell.getFullCell(), ModItems.wire_copper });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uzi, 1), new Object[] { "SMS", " PB", " P ", 'S', "ingotSteel", 'M', ModItems.mechanism_rifle_2, 'P', "plateSteel", 'B', ModItems.bolt_dura_steel }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uzi_silencer, 1), new Object[] { "P ", " P ", " U", 'P', "ingotPolymer", 'U', ModItems.gun_uzi }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uzi_ammo, 16), new Object[] { "L", "P", "G", 'P', "plateIron", 'L', "plateSteel", 'G', Items.gunpowder }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_light_ammo, 1), new Object[] { " L ", "IGI", "ICI", 'L', "plateLead", 'I', "plateIron", 'C', "plateCopper", 'G', Items.gunpowder }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_heavy_ammo, 1), new Object[] { "LGC", "LGC", "LGC", 'L', "plateLead", 'C', "plateCopper", 'G', Items.gunpowder }));
|
||||
@ -1144,7 +1155,7 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.dynosphere_dineutronium), new Object[] { "RPR", "PBP", "RPR", 'R', ModItems.powder_spark_mix, 'P', "ingotDineutronium", 'B', ModItems.dynosphere_euphemium_charged }));
|
||||
|
||||
//Temporary Crappy Recipes
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_pip, 1), new Object[] { " G ", "SSP", " TI", 'G', Blocks.glass_pane, 'S', "plateSteel", 'P', ModItems.powder_power, 'T', ModItems.wire_tungsten, 'I', "ingotPolymer" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_pip, 1), new Object[] { " G ", "SSP", " TI", 'G', Blocks.glass_pane, 'S', "plateSteel", 'P', ModItems.mechanism_revolver_2, 'T', ModItems.wire_tungsten, 'I', "ingotPolymer" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_pip_ammo, 1), new Object[] { "S", "G", "C", 'S', "plateSteel", 'G', Items.gunpowder, 'C', "plateCopper" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_dineutronium, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_spark_mix, 'I', "ingotDineutronium", 'D', "ingotDesh" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_desh, 4), new Object[] { "PIP", "IDI", "PIP", 'P', ModItems.powder_polymer, 'I', "ingotDesh", 'D', "ingotDuraSteel" }));
|
||||
|
||||
@ -43,6 +43,11 @@ public class ModEventHandler
|
||||
|
||||
@SubscribeEvent
|
||||
public void worldTick(WorldTickEvent event) {
|
||||
|
||||
/////
|
||||
try {
|
||||
/////
|
||||
|
||||
if(event.world != null && !event.world.isRemote && event.world.provider.isSurfaceWorld() && MainRegistry.enableMeteorStrikes) {
|
||||
if(event.world.rand.nextInt(meteorShower > 0 ? MainRegistry.meteorShowerChance : MainRegistry.meteorStrikeChance) == 0) {
|
||||
if(!event.world.playerEntities.isEmpty()) {
|
||||
@ -85,13 +90,18 @@ public class ModEventHandler
|
||||
if(effect != null) {
|
||||
|
||||
if(entity instanceof EntityCreeper) {
|
||||
EntityNuclearCreeper creep = new EntityNuclearCreeper(event.world);
|
||||
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
|
||||
|
||||
if(!entity.isDead)
|
||||
if(!event.world.isRemote)
|
||||
event.world.spawnEntityInWorld(creep);
|
||||
entity.setDead();
|
||||
|
||||
if(event.world.rand.nextInt(5) == 0) {
|
||||
EntityNuclearCreeper creep = new EntityNuclearCreeper(event.world);
|
||||
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
|
||||
|
||||
if(!entity.isDead)
|
||||
if(!event.world.isRemote)
|
||||
event.world.spawnEntityInWorld(creep);
|
||||
entity.setDead();
|
||||
} else {
|
||||
entity.attackEntityFrom(ModDamageSource.radiation, 100F);
|
||||
}
|
||||
|
||||
} else if(entity instanceof EntityCow) {
|
||||
EntityMooshroom creep = new EntityMooshroom(event.world);
|
||||
@ -149,6 +159,12 @@ public class ModEventHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
} catch(Exception x) {
|
||||
MainRegistry.logger.error("Ouchie, something has happened in the NTM world tick event.");
|
||||
}
|
||||
//////////////////////
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@ -38,7 +38,8 @@ import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityMachineReactorSmall extends TileEntity implements ISidedInventory, ISource, IFluidContainer, IFluidAcceptor {
|
||||
public class TileEntityMachineReactorSmall extends TileEntity
|
||||
implements ISidedInventory, ISource, IFluidContainer, IFluidAcceptor {
|
||||
|
||||
private ItemStack slots[];
|
||||
|
||||
@ -54,13 +55,13 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
public int age = 0;
|
||||
public List<IConsumer> list = new ArrayList();
|
||||
public FluidTank[] tanks;
|
||||
|
||||
private static final int[] slots_top = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8};
|
||||
private static final int[] slots_bottom = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
|
||||
private static final int[] slots_side = new int[] {9, 10, 11};
|
||||
|
||||
|
||||
private static final int[] slots_top = new int[] { 16 };
|
||||
private static final int[] slots_bottom = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 16 };
|
||||
private static final int[] slots_side = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16 };
|
||||
|
||||
private String customName;
|
||||
|
||||
|
||||
public TileEntityMachineReactorSmall() {
|
||||
slots = new ItemStack[17];
|
||||
tanks = new FluidTank[2];
|
||||
@ -80,21 +81,19 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if (slots[i] != null) {
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
} else {
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemStack) {
|
||||
slots[i] = itemStack;
|
||||
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
if (itemStack != null && itemStack.stackSize > getInventoryStackLimit()) {
|
||||
itemStack.stackSize = getInventoryStackLimit();
|
||||
}
|
||||
}
|
||||
@ -108,7 +107,7 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
public boolean hasCustomInventoryName() {
|
||||
return this.customName != null && this.customName.length() > 0;
|
||||
}
|
||||
|
||||
|
||||
public void setCustomName(String name) {
|
||||
this.customName = name;
|
||||
}
|
||||
@ -120,67 +119,61 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
|
||||
{
|
||||
if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) {
|
||||
return false;
|
||||
}else{
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
|
||||
} else {
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
}
|
||||
|
||||
//You scrubs aren't needed for anything (right now)
|
||||
|
||||
// You scrubs aren't needed for anything (right now)
|
||||
@Override
|
||||
public void openInventory() {}
|
||||
public void openInventory() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {}
|
||||
public void closeInventory() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
if(i == 0 ||
|
||||
i == 1 ||
|
||||
i == 2 ||
|
||||
i == 3 ||
|
||||
i == 4 ||
|
||||
i == 5 ||
|
||||
i == 6 ||
|
||||
i == 7 ||
|
||||
i == 8)
|
||||
if(itemStack.getItem() instanceof ItemFuelRod)
|
||||
if (i == 0 || i == 1 || i == 2 || i == 3 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 10
|
||||
|| i == 11)
|
||||
if (itemStack.getItem() instanceof ItemFuelRod)
|
||||
return true;
|
||||
if(i == 12)
|
||||
if(itemStack.getItem() == ModItems.rod_water || itemStack.getItem() == ModItems.rod_dual_water || itemStack.getItem() == ModItems.rod_quad_water || itemStack.getItem() == Items.water_bucket)
|
||||
if (i == 12)
|
||||
if (itemStack.getItem() == ModItems.rod_water || itemStack.getItem() == ModItems.rod_dual_water
|
||||
|| itemStack.getItem() == ModItems.rod_quad_water || itemStack.getItem() == Items.water_bucket)
|
||||
return true;
|
||||
if(i == 14)
|
||||
if(itemStack.getItem() == ModItems.rod_coolant || itemStack.getItem() == ModItems.rod_dual_coolant || itemStack.getItem() == ModItems.rod_quad_coolant)
|
||||
if (i == 14)
|
||||
if (itemStack.getItem() == ModItems.rod_coolant || itemStack.getItem() == ModItems.rod_dual_coolant
|
||||
|| itemStack.getItem() == ModItems.rod_quad_coolant)
|
||||
return true;
|
||||
if(i == 16)
|
||||
if(itemStack.getItem() instanceof ItemBattery)
|
||||
if (i == 16)
|
||||
if (itemStack.getItem() instanceof ItemBattery)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if(slots[i].stackSize <= j)
|
||||
{
|
||||
if (slots[i] != null) {
|
||||
if (slots[i].stackSize <= j) {
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
}
|
||||
ItemStack itemStack1 = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0)
|
||||
{
|
||||
if (slots[i].stackSize == 0) {
|
||||
slots[i] = null;
|
||||
}
|
||||
|
||||
|
||||
return itemStack1;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
@ -188,48 +181,45 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
|
||||
power = nbt.getLong("power");
|
||||
coreHeat = nbt.getInteger("heat");
|
||||
hullHeat = nbt.getInteger("hullHeat");
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
tanks[0].readFromNBT(nbt, "water");
|
||||
tanks[1].readFromNBT(nbt, "coolant");
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
{
|
||||
|
||||
for (int i = 0; i < list.tagCount(); i++) {
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length)
|
||||
{
|
||||
if (b0 >= 0 && b0 < slots.length) {
|
||||
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setLong("power", power);
|
||||
nbt.setInteger("heat", coreHeat);
|
||||
nbt.setInteger("hullHeat", hullHeat);
|
||||
NBTTagList list = new NBTTagList();
|
||||
tanks[0].writeToNBT(nbt, "water");
|
||||
tanks[1].writeToNBT(nbt, "coolant");
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
|
||||
for (int i = 0; i < slots.length; i++) {
|
||||
if (slots[i] != null) {
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
nbt1.setByte("slot", (byte) i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_)
|
||||
{
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
|
||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
@ -238,208 +228,220 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
if(i == 0 ||
|
||||
i == 1 ||
|
||||
i == 2 ||
|
||||
i == 3 ||
|
||||
i == 4 ||
|
||||
i == 5 ||
|
||||
i == 6 ||
|
||||
i == 7 ||
|
||||
i == 8)
|
||||
if(itemStack.getItem() == ModItems.rod_uranium_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_dual_uranium_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_quad_uranium_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_plutonium_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_dual_plutonium_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_quad_plutonium_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_mox_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_dual_mox_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_quad_mox_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_schrabidium_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_dual_schrabidium_fuel_depleted ||
|
||||
itemStack.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted)
|
||||
if (i == 0 || i == 1 || i == 2 || i == 3 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 9 || i == 10
|
||||
|| i == 11)
|
||||
if (itemStack.getItem() == ModItems.rod_uranium_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_dual_uranium_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_quad_uranium_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_plutonium_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_dual_plutonium_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_quad_plutonium_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_mox_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_dual_mox_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_quad_mox_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_schrabidium_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_dual_schrabidium_fuel_depleted
|
||||
|| itemStack.getItem() == ModItems.rod_quad_schrabidium_fuel_depleted)
|
||||
return true;
|
||||
if(i == 9 || i == 10)
|
||||
if(itemStack.getItem() == Items.bucket || itemStack.getItem() == ModItems.rod_empty || itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty)
|
||||
if (i == 13 || i == 15)
|
||||
if (itemStack.getItem() == Items.bucket || itemStack.getItem() == ModItems.rod_empty
|
||||
|| itemStack.getItem() == ModItems.rod_dual_empty || itemStack.getItem() == ModItems.rod_quad_empty
|
||||
|| itemStack.getItem() == ModItems.fluid_tank_empty
|
||||
|| itemStack.getItem() == ModItems.fluid_barrel_empty)
|
||||
return true;
|
||||
if(i == 11)
|
||||
if (itemStack.getItem() instanceof ItemBattery && ItemBattery.getCharge(itemStack) == ItemBattery.getMaxChargeStatic(itemStack))
|
||||
if (i == 16)
|
||||
if (itemStack.getItem() instanceof ItemBattery
|
||||
&& ItemBattery.getCharge(itemStack) == ItemBattery.getMaxChargeStatic(itemStack))
|
||||
return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public long getPowerScaled(long i) {
|
||||
return (power * i) / powerMax;
|
||||
}
|
||||
|
||||
|
||||
public int getCoreHeatScaled(int i) {
|
||||
return (coreHeat * i) / maxCoreHeat;
|
||||
}
|
||||
|
||||
|
||||
public int getHullHeatScaled(int i) {
|
||||
return (hullHeat * i) / maxHullHeat;
|
||||
}
|
||||
|
||||
|
||||
public boolean hasPower() {
|
||||
return power > 0;
|
||||
}
|
||||
|
||||
|
||||
public boolean hasCoreHeat() {
|
||||
return coreHeat > 0;
|
||||
}
|
||||
|
||||
|
||||
public boolean hasHullHeat() {
|
||||
return hullHeat > 0;
|
||||
}
|
||||
|
||||
|
||||
private int[] getNeighbouringSlots(int id) {
|
||||
|
||||
switch(id) {
|
||||
case 0: return new int[] { 1, 5 };
|
||||
case 1: return new int[] { 0, 6 };
|
||||
case 2: return new int[] { 3, 7 };
|
||||
case 3: return new int[] { 2, 4, 8 };
|
||||
case 4: return new int[] { 3, 9 };
|
||||
case 5: return new int[] { 0, 6, 0xA };
|
||||
case 6: return new int[] { 1, 5, 0xB };
|
||||
case 7: return new int[] { 2, 8 };
|
||||
case 8: return new int[] { 3, 7, 9};
|
||||
case 9: return new int[] { 4, 8 };
|
||||
case 10: return new int[] { 5, 0xB };
|
||||
case 11: return new int[] { 6, 0xA };
|
||||
|
||||
switch (id) {
|
||||
case 0:
|
||||
return new int[] { 1, 5 };
|
||||
case 1:
|
||||
return new int[] { 0, 6 };
|
||||
case 2:
|
||||
return new int[] { 3, 7 };
|
||||
case 3:
|
||||
return new int[] { 2, 4, 8 };
|
||||
case 4:
|
||||
return new int[] { 3, 9 };
|
||||
case 5:
|
||||
return new int[] { 0, 6, 0xA };
|
||||
case 6:
|
||||
return new int[] { 1, 5, 0xB };
|
||||
case 7:
|
||||
return new int[] { 2, 8 };
|
||||
case 8:
|
||||
return new int[] { 3, 7, 9 };
|
||||
case 9:
|
||||
return new int[] { 4, 8 };
|
||||
case 10:
|
||||
return new int[] { 5, 0xB };
|
||||
case 11:
|
||||
return new int[] { 6, 0xA };
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
|
||||
age++;
|
||||
if(age >= 20)
|
||||
{
|
||||
if (age >= 20) {
|
||||
age = 0;
|
||||
}
|
||||
|
||||
if(age == 9 || age == 19)
|
||||
|
||||
if (age == 9 || age == 19)
|
||||
ffgeuaInit();
|
||||
|
||||
if(tanks[0].getFill() < tanks[0].getMaxFill()) {
|
||||
|
||||
if(worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord) == Blocks.water || worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord) == Blocks.flowing_water)
|
||||
|
||||
if (tanks[0].getFill() < tanks[0].getMaxFill()) {
|
||||
|
||||
if (worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord) == Blocks.water
|
||||
|| worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord) == Blocks.flowing_water)
|
||||
tanks[0].setFill(tanks[0].getFill() + 25);
|
||||
|
||||
if(worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord) == Blocks.water || worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord) == Blocks.flowing_water)
|
||||
|
||||
if (worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord) == Blocks.water
|
||||
|| worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord) == Blocks.flowing_water)
|
||||
tanks[0].setFill(tanks[0].getFill() + 25);
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1) == Blocks.water || worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1) == Blocks.flowing_water)
|
||||
|
||||
if (worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1) == Blocks.water
|
||||
|| worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1) == Blocks.flowing_water)
|
||||
tanks[0].setFill(tanks[0].getFill() + 25);
|
||||
|
||||
if(worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1) == Blocks.water || worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1) == Blocks.flowing_water)
|
||||
|
||||
if (worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1) == Blocks.water
|
||||
|| worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1) == Blocks.flowing_water)
|
||||
tanks[0].setFill(tanks[0].getFill() + 25);
|
||||
|
||||
if(tanks[0].getFill() > tanks[0].getMaxFill())
|
||||
|
||||
if (tanks[0].getFill() > tanks[0].getMaxFill())
|
||||
tanks[0].setFill(tanks[0].getMaxFill());
|
||||
}
|
||||
|
||||
|
||||
tanks[0].loadTank(12, 13, slots);
|
||||
tanks[1].loadTank(14, 15, slots);
|
||||
|
||||
if(retracting && rods > 0) {
|
||||
|
||||
if(rods == rodsMax)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F);
|
||||
|
||||
|
||||
if (retracting && rods > 0) {
|
||||
|
||||
if (rods == rodsMax)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F,
|
||||
0.75F);
|
||||
|
||||
rods--;
|
||||
|
||||
if(rods == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F);
|
||||
|
||||
if (rods == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F,
|
||||
1.0F);
|
||||
}
|
||||
if(!retracting && rods < rodsMax) {
|
||||
|
||||
if(rods == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F, 0.75F);
|
||||
|
||||
if (!retracting && rods < rodsMax) {
|
||||
|
||||
if (rods == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStart", 1.0F,
|
||||
0.75F);
|
||||
|
||||
rods++;
|
||||
|
||||
if(rods == rodsMax)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F, 1.0F);
|
||||
|
||||
if (rods == rodsMax)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.reactorStop", 1.0F,
|
||||
1.0F);
|
||||
}
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
tanks[i].updateTank(xCoord, yCoord, zCoord);
|
||||
|
||||
//Batteries
|
||||
|
||||
// Batteries
|
||||
power = Library.chargeItemsFromTE(slots, 11, power, powerMax);
|
||||
|
||||
if(rods >= rodsMax)
|
||||
for(int i = 0; i < 12; i++)
|
||||
{
|
||||
if(slots[i] != null && slots[i].getItem() instanceof ItemFuelRod)
|
||||
|
||||
if (rods >= rodsMax)
|
||||
for (int i = 0; i < 12; i++) {
|
||||
if (slots[i] != null && slots[i].getItem() instanceof ItemFuelRod)
|
||||
decay(i);
|
||||
}
|
||||
|
||||
if(this.coreHeat > 0 && this.tanks[1].getFill() > 0 && this.hullHeat < this.maxHullHeat) {
|
||||
|
||||
if (this.coreHeat > 0 && this.tanks[1].getFill() > 0 && this.hullHeat < this.maxHullHeat) {
|
||||
this.hullHeat += this.coreHeat * 0.175;
|
||||
this.coreHeat -= this.coreHeat * 0.1;
|
||||
|
||||
|
||||
this.tanks[1].setFill(this.tanks[1].getFill() - 10);
|
||||
|
||||
if(this.tanks[1].getFill() < 0)
|
||||
|
||||
if (this.tanks[1].getFill() < 0)
|
||||
this.tanks[1].setFill(0);
|
||||
}
|
||||
|
||||
if(this.hullHeat > maxHullHeat)
|
||||
{
|
||||
if (this.hullHeat > maxHullHeat) {
|
||||
this.hullHeat = maxHullHeat;
|
||||
}
|
||||
|
||||
if(this.hullHeat > 0 && this.tanks[0].getFill() > 0) {
|
||||
|
||||
if (this.hullHeat > 0 && this.tanks[0].getFill() > 0) {
|
||||
this.power += this.hullHeat * 0.1;
|
||||
this.hullHeat -= this.hullHeat * 0.085;
|
||||
|
||||
|
||||
this.tanks[0].setFill(this.tanks[0].getFill() - 100);
|
||||
|
||||
if(this.tanks[0].getFill() < 0)
|
||||
|
||||
if (this.tanks[0].getFill() < 0)
|
||||
this.tanks[0].setFill(0);
|
||||
}
|
||||
|
||||
if(this.power > powerMax)
|
||||
{
|
||||
if (this.power > powerMax) {
|
||||
this.power = powerMax;
|
||||
}
|
||||
|
||||
if(this.coreHeat > maxCoreHeat)
|
||||
{
|
||||
|
||||
if (this.coreHeat > maxCoreHeat) {
|
||||
this.explode();
|
||||
}
|
||||
|
||||
if(rods > 0 && coreHeat > 0 &&
|
||||
!(worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord).isNormalCube() &&
|
||||
worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord).isNormalCube() &&
|
||||
worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1).isNormalCube() &&
|
||||
worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1).isNormalCube() &&
|
||||
worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord) != Blocks.air &&
|
||||
worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord) != Blocks.air &&
|
||||
worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1) != Blocks.air &&
|
||||
worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1) != Blocks.air)) {
|
||||
|
||||
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(xCoord + 0.5 - 5, yCoord + 1.5 - 5, zCoord + 0.5 - 5, xCoord + 0.5 + 5, yCoord + 1.5 + 5, zCoord + 0.5 + 5));
|
||||
|
||||
for(Entity e : list) {
|
||||
if(e instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)e))
|
||||
{
|
||||
|
||||
} else {
|
||||
if(e instanceof EntityLivingBase)
|
||||
((EntityLivingBase) e).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 80 * 20, 25));
|
||||
}
|
||||
|
||||
if (rods > 0 && coreHeat > 0
|
||||
&& !(worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord).isNormalCube()
|
||||
&& worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord).isNormalCube()
|
||||
&& worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1).isNormalCube()
|
||||
&& worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1).isNormalCube()
|
||||
&& worldObj.getBlock(xCoord + 1, yCoord + 1, zCoord) != Blocks.air
|
||||
&& worldObj.getBlock(xCoord - 1, yCoord + 1, zCoord) != Blocks.air
|
||||
&& worldObj.getBlock(xCoord, yCoord + 1, zCoord + 1) != Blocks.air
|
||||
&& worldObj.getBlock(xCoord, yCoord + 1, zCoord - 1) != Blocks.air)) {
|
||||
|
||||
List<Entity> list = (List<Entity>) worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(xCoord + 0.5 - 5, yCoord + 1.5 - 5, zCoord + 0.5 - 5,
|
||||
xCoord + 0.5 + 5, yCoord + 1.5 + 5, zCoord + 0.5 + 5));
|
||||
|
||||
for (Entity e : list) {
|
||||
if (e instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer) e)) {
|
||||
|
||||
} else {
|
||||
if (e instanceof EntityLivingBase)
|
||||
((EntityLivingBase) e)
|
||||
.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 80 * 20, 25));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -450,113 +452,112 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, hullHeat, 3));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean hasFuelRod(int id) {
|
||||
if(id > 11)
|
||||
if (id > 11)
|
||||
return false;
|
||||
|
||||
if(slots[id] != null)
|
||||
|
||||
if (slots[id] != null)
|
||||
return slots[id].getItem() instanceof ItemFuelRod;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private int getNeightbourCount(int id) {
|
||||
|
||||
|
||||
int[] neighbours = this.getNeighbouringSlots(id);
|
||||
|
||||
if(neighbours == null)
|
||||
|
||||
if (neighbours == null)
|
||||
return 0;
|
||||
|
||||
|
||||
int count = 0;
|
||||
|
||||
for(int i = 0; i < neighbours.length; i++)
|
||||
if(hasFuelRod(neighbours[i]))
|
||||
|
||||
for (int i = 0; i < neighbours.length; i++)
|
||||
if (hasFuelRod(neighbours[i]))
|
||||
count++;
|
||||
|
||||
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
|
||||
//itemstack in slots[id] has to contain ItemFuelRod item
|
||||
// itemstack in slots[id] has to contain ItemFuelRod item
|
||||
private void decay(int id) {
|
||||
if(id > 11)
|
||||
if (id > 11)
|
||||
return;
|
||||
|
||||
|
||||
int decay = getNeightbourCount(id) + 1;
|
||||
|
||||
for(int i = 0; i < decay; i++) {
|
||||
ItemFuelRod rod = ((ItemFuelRod)slots[id].getItem());
|
||||
|
||||
for (int i = 0; i < decay; i++) {
|
||||
ItemFuelRod rod = ((ItemFuelRod) slots[id].getItem());
|
||||
this.coreHeat += rod.heat;
|
||||
ItemFuelRod.setLifeTime(slots[id], ItemFuelRod.getLifeTime(slots[id]) + 1);
|
||||
ItemFuelRod.updateDamage(slots[id]);
|
||||
|
||||
if(ItemFuelRod.getLifeTime(slots[id]) > ((ItemFuelRod)slots[id].getItem()).lifeTime) {
|
||||
|
||||
if (ItemFuelRod.getLifeTime(slots[id]) > ((ItemFuelRod) slots[id].getItem()).lifeTime) {
|
||||
onRunOut(id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//itemstack in slots[id] has to contain ItemFuelRod item
|
||||
|
||||
// itemstack in slots[id] has to contain ItemFuelRod item
|
||||
private void onRunOut(int id) {
|
||||
|
||||
|
||||
System.out.println("aaa");
|
||||
|
||||
|
||||
Item item = slots[id].getItem();
|
||||
|
||||
if(item == ModItems.rod_uranium_fuel) {
|
||||
if (item == ModItems.rod_uranium_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_uranium_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_plutonium_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_plutonium_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_plutonium_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_mox_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_mox_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_mox_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_schrabidium_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_schrabidium_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_schrabidium_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_dual_uranium_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_dual_uranium_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_dual_uranium_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_dual_plutonium_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_dual_plutonium_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_dual_plutonium_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_dual_mox_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_dual_mox_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_dual_mox_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_dual_schrabidium_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_dual_schrabidium_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_dual_schrabidium_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_quad_uranium_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_quad_uranium_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_quad_uranium_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_quad_plutonium_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_quad_plutonium_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_quad_plutonium_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_quad_mox_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_quad_mox_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_quad_mox_fuel_depleted);
|
||||
|
||||
} else if(item == ModItems.rod_quad_schrabidium_fuel) {
|
||||
|
||||
} else if (item == ModItems.rod_quad_schrabidium_fuel) {
|
||||
slots[id] = new ItemStack(ModItems.rod_quad_schrabidium_fuel_depleted);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void explode() {
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
for (int i = 0; i < slots.length; i++) {
|
||||
this.slots[i] = null;
|
||||
}
|
||||
|
||||
worldObj.createExplosion(null, this.xCoord, this.yCoord, this.zCoord, 18.0F, true);
|
||||
ExplosionNukeGeneric.waste(worldObj, this.xCoord, this.yCoord, this.zCoord, 35);
|
||||
worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.flowing_lava);
|
||||
|
||||
worldObj.createExplosion(null, this.xCoord, this.yCoord, this.zCoord, 18.0F, true);
|
||||
ExplosionNukeGeneric.waste(worldObj, this.xCoord, this.yCoord, this.zCoord, 35);
|
||||
worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, Blocks.flowing_lava);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ffgeua(int x, int y, int z, boolean newTact) {
|
||||
|
||||
|
||||
Library.ffgeua(x, y, z, newTact, this, worldObj);
|
||||
}
|
||||
|
||||
@ -566,20 +567,19 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
ffgeua(this.xCoord + 1, this.yCoord, this.zCoord, getTact());
|
||||
ffgeua(this.xCoord, this.yCoord, this.zCoord - 1, getTact());
|
||||
ffgeua(this.xCoord, this.yCoord, this.zCoord + 1, getTact());
|
||||
|
||||
|
||||
ffgeua(this.xCoord - 1, this.yCoord + 2, this.zCoord, getTact());
|
||||
ffgeua(this.xCoord + 1, this.yCoord + 2, this.zCoord, getTact());
|
||||
ffgeua(this.xCoord, this.yCoord + 2, this.zCoord - 1, getTact());
|
||||
ffgeua(this.xCoord, this.yCoord + 2, this.zCoord + 1, getTact());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
if(age >= 0 && age < 10)
|
||||
{
|
||||
if (age >= 0 && age < 10) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -605,9 +605,9 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
|
||||
@Override
|
||||
public int getMaxAFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else
|
||||
return 0;
|
||||
@ -615,17 +615,17 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
|
||||
@Override
|
||||
public void setAFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(i);
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAFluidFill(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getFill();
|
||||
else
|
||||
return 0;
|
||||
@ -633,25 +633,24 @@ public class TileEntityMachineReactorSmall extends TileEntity implements ISidedI
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||