diff --git a/src/main/java/techreborn/init/ModBlocks.java b/src/main/java/techreborn/init/ModBlocks.java index e20d3ca5e..eeb632275 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -537,6 +537,10 @@ public class ModBlocks OreDictionary.registerOre("leavesRubber", new ItemStack(rubberLeaves, 1, OreDictionary.WILDCARD_VALUE)); OreDictionary.registerOre("fenceIron", ironFence); + + OreDictionary.registerOre("machineBlockBasic", BlockMachineFrame.getFrameByName("machine", 1)); + OreDictionary.registerOre("machineBlockAdvanced", BlockMachineFrame.getFrameByName("advancedMachine", 1)); + OreDictionary.registerOre("machineBlockHighlyAdvanced", BlockMachineFrame.getFrameByName("highlyAdvancedMachine", 1)); } } diff --git a/src/main/java/techreborn/init/ModItems.java b/src/main/java/techreborn/init/ModItems.java index eb8648a08..c2fe20d73 100644 --- a/src/main/java/techreborn/init/ModItems.java +++ b/src/main/java/techreborn/init/ModItems.java @@ -20,6 +20,7 @@ import techreborn.items.armor.ItemLithiumBatpack; import techreborn.items.armor.ItemTRArmour; import techreborn.items.tools.*; import techreborn.lib.Reference; +import techreborn.parts.ItemStandaloneCables; public class ModItems { @@ -92,6 +93,7 @@ public class ModItems public static Item lapotronCrystal; public static Item energyCrystal; public static Item scrapBox; + public static Item frequencyTransmitter; public static Item bronzeSword; public static Item bronzePickaxe; @@ -316,6 +318,9 @@ public class ModItems scrapBox = new ItemScrapBox(); GameRegistry.registerItem(scrapBox, "scrapbox"); + + frequencyTransmitter = new ItemFrequencyTransmitter(); + GameRegistry.registerItem(frequencyTransmitter, "frequencyTransmitter"); upgrades = new ItemUpgrades(); GameRegistry.registerItem(upgrades, "upgrades"); @@ -896,6 +901,8 @@ public class ModItems OreUnifier.registerOre("materialResin", ItemParts.getPartByName("rubberSap")); OreUnifier.registerOre("materialRubber", ItemParts.getPartByName("rubber")); + OreUnifier.registerOre("circuitBasic", ItemParts.getPartByName("electronicCircuit")); + OreUnifier.registerOre("circuitAdvanced", ItemParts.getPartByName("advancedCircuit")); } diff --git a/src/main/java/techreborn/init/ModRecipes.java b/src/main/java/techreborn/init/ModRecipes.java index 1e3383bce..09c6f776b 100644 --- a/src/main/java/techreborn/init/ModRecipes.java +++ b/src/main/java/techreborn/init/ModRecipes.java @@ -341,10 +341,15 @@ public class ModRecipes { } static void addIc2ReplacementReicpes() { + // TODO: Replace item pump with block CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("pump"), "CEC", "CMC", "PTP", 'C', - ItemCells.getCellByName("empty"), 'T', new ItemStack(ModItems.treeTap), 'M', - new ItemStack(ModBlocks.MachineCasing), 'P', new ItemStack(Blocks.iron_bars), 'E', - ItemParts.getPartByName("electronicCircuit")); + ItemCells.getCellByName("empty"), 'T', new ItemStack(ModItems.treeTap), 'M', "machineBlockBasic", 'P', + new ItemStack(Blocks.iron_bars), 'E', "circuitBasic"); + + // TODO: Replace item teleporter with block + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("teleporter"), "CTC", "WMW", "CDC", 'C', + "circuitAdvanced", 'T', new ItemStack(ModItems.frequencyTransmitter), 'M', "machineBlockAdvanced", 'W', + ItemStandaloneCables.getCableByName("glassfiber"), 'D', "gemDiamond", 'E', "circuitBasic"); } static void addGrinderRecipes() { @@ -518,16 +523,115 @@ public class ModRecipes { ItemIngots.getIngotByName("refinediron"), 'E', new ItemStack(ModBlocks.Extractor), 'C', ItemParts.getPartByName("advancedCircuit")); - CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 2), "RRR", "BBB", "TTT", 'R', - ItemIngots.getIngotByName("refinediron"), 'B', "ingotBronze", 'T', "ingotTin"); + // Mixed Metal Ingot Recipes :P - CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Compressor), "SXS", "SCS", "SMS", 'C', - ItemParts.getPartByName("electronicCircuit"), 'M', BlockMachineFrame.getFrameByName("machine", 1), 'S', - Blocks.stone); + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 2), "RRR", "BBB", "TTT", 'R', + "ingotRefinedIron", 'B', "ingotBronze", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 2), "RRR", "BBB", "TTT", 'R', + "ingotRefinedIron", 'B', "ingotBronze", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 2), "RRR", "BBB", "TTT", 'R', + "ingotRefinedIron", 'B', "ingotBrass", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 2), "RRR", "BBB", "TTT", 'R', + "ingotRefinedIron", 'B', "ingotBrass", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 3), "RRR", "BBB", "TTT", 'R', + "ingotNickel", 'B', "ingotBronze", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 3), "RRR", "BBB", "TTT", 'R', + "ingotNickel", 'B', "ingotBronze", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 3), "RRR", "BBB", "TTT", 'R', + "ingotNickel", 'B', "ingotBrass", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 3), "RRR", "BBB", "TTT", 'R', + "ingotNickel", 'B', "ingotBrass", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 4), "RRR", "BBB", "TTT", 'R', + "ingotNickel", 'B', "ingotBronze", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 4), "RRR", "BBB", "TTT", 'R', + "ingotNickel", 'B', "ingotBrass", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 4), "RRR", "BBB", "TTT", 'R', + "ingotInvar", 'B', "ingotBronze", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 4), "RRR", "BBB", "TTT", 'R', + "ingotInvar", 'B', "ingotBronze", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 4), "RRR", "BBB", "TTT", 'R', + "ingotInvar", 'B', "ingotBrass", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 4), "RRR", "BBB", "TTT", 'R', + "ingotInvar", 'B', "ingotBrass", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotInvar", 'B', "ingotBronze", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotInvar", 'B', "ingotBrass", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotTitanium", 'B', "ingotBronze", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotTitanium", 'B', "ingotBronze", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotTitanium", 'B', "ingotBrass", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotTitanium", 'B', "ingotBrass", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 6), "RRR", "BBB", "TTT", 'R', + "ingotTitanium", 'B', "ingotBronze", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 6), "RRR", "BBB", "TTT", 'R', + "ingotTitanium", 'B', "ingotBrass", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotTungsten", 'B', "ingotBronze", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotTungsten", 'B', "ingotBronze", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotTungsten", 'B', "ingotBrass", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 5), "RRR", "BBB", "TTT", 'R', + "ingotTungsten", 'B', "ingotBrass", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 6), "RRR", "BBB", "TTT", 'R', + "ingotTungsten", 'B', "ingotBronze", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 6), "RRR", "BBB", "TTT", 'R', + "ingotTungsten", 'B', "ingotBrass", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 8), "RRR", "BBB", "TTT", 'R', + "ingotTungstensteel", 'B', "ingotBronze", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 8), "RRR", "BBB", "TTT", 'R', + "ingotTungstensteel", 'B', "ingotBronze", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 8), "RRR", "BBB", "TTT", 'R', + "ingotTungstensteel", 'B', "ingotBrass", 'T', "ingotTin"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 8), "RRR", "BBB", "TTT", 'R', + "ingotTungstensteel", 'B', "ingotBrass", 'T', "ingotZinc"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 9), "RRR", "BBB", "TTT", 'R', + "ingotTungstensteel", 'B', "ingotBronze", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("mixedmetalingot", 9), "RRR", "BBB", "TTT", 'R', + "ingotTungstensteel", 'B', "ingotBrass", 'T', "ingotAluminum"); + + CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Compressor), "SXS", "SCS", "SMS", 'C', "circuitBasic", + 'M', BlockMachineFrame.getFrameByName("machine", 1), 'S', Blocks.stone); CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ElectricFurnace), "XCX", "RFR", "XXX", 'C', - ItemParts.getPartByName("electronicCircuit"), 'F', new ItemStack(ModBlocks.ironFurnace), 'R', - Items.redstone); + "circuitBasic", 'F', new ItemStack(ModBlocks.ironFurnace), 'R', Items.redstone); CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ironFurnace), "III", "IXI", "III", 'I', "ingotIron"); @@ -535,8 +639,7 @@ public class ModRecipes { 'F', Blocks.furnace); CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("electronicCircuit"), "WWW", "SRS", "WWW", 'R', - ItemIngots.getIngotByName("refinediron"), 'S', Items.redstone, 'W', - ItemStandaloneCables.getCableByName("insulatedcopper")); + "ingotRefinedIron", 'S', Items.redstone, 'W', ItemStandaloneCables.getCableByName("insulatedcopper")); CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.reBattery), "XWX", "TRT", "TRT", 'T', "ingotTin", 'R', Items.redstone, 'W', ItemStandaloneCables.getCableByName("insulatedcopper")); @@ -548,9 +651,8 @@ public class ModRecipes { ItemParts.getPartByName("electronicCircuit")); CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.centrifuge), "RCR", "AEA", "RCR", 'R', - ItemIngots.getIngotByName("refinediron"), 'E', new ItemStack(ModBlocks.Extractor), 'A', - BlockMachineFrame.getFrameByName("advancedMachine", 1), 'C', - ItemParts.getPartByName("electronicCircuit")); + "ingotRefinedIron", 'E', new ItemStack(ModBlocks.Extractor), 'A', "machineBlockAdvanced", 'C', + "circuitBasic"); CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("advancedCircuit"), "RGR", "LCL", "RGR", 'R', Items.redstone, 'G', Items.glowstone_dust, 'L', "dyeBlue", 'C', @@ -687,7 +789,7 @@ public class ModRecipes { ItemParts.getPartByName("NaKCoolantSimple"), 'W', ItemStandaloneCables.getCableByName("insulatedcopper"), 'C', ItemParts.getPartByName("electronicCircuit")); - + CraftingHelper.addShapedOreRecipe(ItemUpgrades.getUpgradeByName("Transformer"), "GGG", "WTW", "GCG", 'G', "blockGlass", 'W', ItemStandaloneCables.getCableByName("insulatedgold"), 'C', ItemParts.getPartByName("electronicCircuit"), 'T', ModBlocks.mvt); @@ -745,7 +847,7 @@ public class ModRecipes { } GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.rubberPlanks, 4), ModBlocks.rubberLog); - GameRegistry.addShapelessRecipe(ItemParts.getPartByName("frequencyTransmitter"), + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.frequencyTransmitter), ItemStandaloneCables.getCableByName("insulatedcopper"), ItemParts.getPartByName("electronicCircuit")); for (String name : ItemDustsSmall.types) { diff --git a/src/main/java/techreborn/items/ItemFrequencyTransmitter.java b/src/main/java/techreborn/items/ItemFrequencyTransmitter.java new file mode 100644 index 000000000..70d0e18aa --- /dev/null +++ b/src/main/java/techreborn/items/ItemFrequencyTransmitter.java @@ -0,0 +1,58 @@ +package techreborn.items; + +import me.modmuss50.jsonDestroyer.api.ITexturedItem; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumHand; +import net.minecraft.world.World; +import reborncore.RebornCore; +import techreborn.api.ScrapboxList; +import techreborn.client.TechRebornCreativeTabMisc; + +public class ItemFrequencyTransmitter extends ItemTextureBase implements ITexturedItem +{ + + public ItemFrequencyTransmitter() + { + setUnlocalizedName("techreborn.frequencyTransmitter"); + setCreativeTab(TechRebornCreativeTabMisc.instance); + RebornCore.jsonDestroyer.registerObject(this); + } + + @Override + public ActionResult onItemRightClick(ItemStack itemStack, World world, EntityPlayer player, + EnumHand hand) + { + if (!world.isRemote) + { + int random = world.rand.nextInt(ScrapboxList.stacks.size()); + ItemStack out = ScrapboxList.stacks.get(random).copy(); + float xOffset = world.rand.nextFloat() * 0.8F + 0.1F; + float yOffset = world.rand.nextFloat() * 0.8F + 0.1F; + float zOffset = world.rand.nextFloat() * 0.8F + 0.1F; + EntityItem entityitem = new EntityItem(world, player.getPosition().getX() + xOffset, + player.getPosition().getY() + yOffset, player.getPosition().getZ() + zOffset, out); + + entityitem.setPickupDelay(20); + world.spawnEntityInWorld(entityitem); + + itemStack.stackSize--; + } + return new ActionResult<>(EnumActionResult.SUCCESS, itemStack); + } + + @Override + public int getMaxMeta() + { + return 1; + } + + @Override + public String getTextureName(int arg0) + { + return "techreborn:items/misc/frequency_transmitter"; + } +} diff --git a/src/main/java/techreborn/items/ItemParts.java b/src/main/java/techreborn/items/ItemParts.java index 443579482..92fbf10de 100644 --- a/src/main/java/techreborn/items/ItemParts.java +++ b/src/main/java/techreborn/items/ItemParts.java @@ -24,8 +24,8 @@ public class ItemParts extends ItemTextureBase { "doubleThoriumCell", "quadThoriumCell", "plutoniumCell", "doublePlutoniumCell", "quadPlutoniumCell", "destructoPack", "iridiumNeutronReflector", "massHoleDevice", "computerMonitor", "machineParts", "thickNeutronReflector", "neutronReflector", "electronicCircuit", "advancedCircuit", "rubberSap", "rubber", - "scrap", "pump", "teleporter", "advancedAlloy", "mixedmetalingot", "carbonmesh", "carbonfiber", - "frequencyTransmitter", "CoolantSimple", "CoolantTriple", "CoolantSix" }; + "scrap", "pump", "teleporter", "advancedAlloy", "mixedmetalingot", "carbonmesh", "carbonfiber", "dogecoin", + "CoolantSimple", "CoolantTriple", "CoolantSix" }; public ItemParts() { setCreativeTab(TechRebornCreativeTab.instance); diff --git a/src/main/resources/assets/techreborn/lang/en_US.lang b/src/main/resources/assets/techreborn/lang/en_US.lang index ea71ae5b9..4a515cad9 100644 --- a/src/main/resources/assets/techreborn/lang/en_US.lang +++ b/src/main/resources/assets/techreborn/lang/en_US.lang @@ -629,6 +629,7 @@ item.techreborn.part.advancedCircuit.name=Advanced Electronic Circuit item.techreborn.part.advancedAlloy.name=Advanced Alloy item.techreborn.part.frequencyTransmitter.name=Frequency Transmitter item.techreborn.part.tungstenGrindingHead.name=Tungsten Grinding Head +item.techreborn.part.dogecoin.name=Dogecoin item.techreborn.part.CoolantSimple.name=10k Coolant Cell item.techreborn.part.CoolantTriple.name=30k Coolant Cell item.techreborn.part.CoolantSix.name=60k Coolant Cell diff --git a/src/main/resources/assets/techreborn/textures/blocks/machine/generators/lightning_rod_side.png b/src/main/resources/assets/techreborn/textures/blocks/machine/generators/lightning_rod_side.png deleted file mode 100644 index 16f2dd319..000000000 Binary files a/src/main/resources/assets/techreborn/textures/blocks/machine/generators/lightning_rod_side.png and /dev/null differ diff --git a/src/main/resources/assets/techreborn/textures/blocks/machine/generators/lightning_rod_side_off.png b/src/main/resources/assets/techreborn/textures/blocks/machine/generators/lightning_rod_side_off.png index 09af237dd..16f2dd319 100644 Binary files a/src/main/resources/assets/techreborn/textures/blocks/machine/generators/lightning_rod_side_off.png and b/src/main/resources/assets/techreborn/textures/blocks/machine/generators/lightning_rod_side_off.png differ diff --git a/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/pump_side_off.png b/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/pump_side_off.png new file mode 100644 index 000000000..537ab32cd Binary files /dev/null and b/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/pump_side_off.png differ diff --git a/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/pump_side_on.png b/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/pump_side_on.png new file mode 100644 index 000000000..537ab32cd Binary files /dev/null and b/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/pump_side_on.png differ diff --git a/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/teleporter_side.png b/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/teleporter_side.png new file mode 100644 index 000000000..a527e2b9b Binary files /dev/null and b/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/teleporter_side.png differ diff --git a/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/teleporter_top.png b/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/teleporter_top.png new file mode 100644 index 000000000..436d5a96b Binary files /dev/null and b/src/main/resources/assets/techreborn/textures/blocks/machine/greg_machines/teleporter_top.png differ diff --git a/src/main/resources/assets/techreborn/textures/items/part/frequencyTransmitter.png b/src/main/resources/assets/techreborn/textures/items/misc/frequency_transmitter.png similarity index 100% rename from src/main/resources/assets/techreborn/textures/items/part/frequencyTransmitter.png rename to src/main/resources/assets/techreborn/textures/items/misc/frequency_transmitter.png diff --git a/src/main/resources/assets/techreborn/textures/items/part/dogecoin.png b/src/main/resources/assets/techreborn/textures/items/part/dogecoin.png new file mode 100644 index 000000000..7e4e24d11 Binary files /dev/null and b/src/main/resources/assets/techreborn/textures/items/part/dogecoin.png differ