From db6b2eb7f7f9edd81475fa3e5d7300a132f30cb3 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Tue, 23 Jun 2020 17:59:27 +0200 Subject: Added Special interface Former-commit-id: e6f272bb86db65738e4649716b6cbd55e898f334 --- .../system/material/BW_MetaGeneratedBlocks_Casing.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java index a1738fca46..a688664efd 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java @@ -1,5 +1,6 @@ package com.github.bartimaeusnek.bartworks.system.material; +import com.github.technus.tectech.mechanics.structure.ICustomMetaBlock; import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_LanguageManager; @@ -16,7 +17,8 @@ import net.minecraft.world.World; import java.util.List; import java.util.Optional; -public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks { +@cpw.mods.fml.common.Optional.Interface(modid = "tectech", striprefs = true, iface = "com.github.technus.tectech.mechanics.structure.ICustomMetaBlock") +public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks implements ICustomMetaBlock { public BW_MetaGeneratedBlocks_Casing(Material p_i45386_1_, Class tileEntity, String blockName, OrePrefixes prefixes) { super(p_i45386_1_, tileEntity, blockName, prefixes); @@ -96,4 +98,13 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks { .map(pMaterial -> new ItemStack(aItem, 1, pMaterial.getmID())) .forEach(aList::add); } + + @cpw.mods.fml.common.Optional.Method(modid = "tectech") + public void setBlock(World world, int x, int y, int z, int meta) { + world.setBlock(x, y, z,this, meta,2); + Optional.ofNullable(world.getTileEntity(x,y,z)) + .filter(te -> te instanceof BW_MetaGeneratedBlocks_Casing_TE) + .map(te -> (BW_MetaGeneratedBlocks_Casing_TE) te) + .ifPresent(te -> te.mMetaData = (short) meta); + } } -- cgit From 18e2960ea363a8b947e93fc3eb54fe6eb6a1d731 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Wed, 9 Sep 2020 21:34:08 +0200 Subject: Renamed Casings + added GT++ warning + updated TT + fixed forestry capsules + fixed eic Former-commit-id: 319fc8b86aaf8d6c07954f0f3b56119c10f10cb3 --- libs/TecTech-1.7.10-3.8.3.jar.REMOVED.git-id | 1 - ...ecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id | 1 + libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id | 2 +- .../github/bartimaeusnek/bartworks/MainMod.java | 22 ++++- .../GT_TileEntity_ElectricImplosionCompressor.java | 11 ++- .../material/BW_MetaGeneratedBlocks_Casing.java | 21 ++--- .../material/GT_Enhancement/BWGTMetaItems.java | 22 ++++- .../GT_Enhancement/GTMetaItemEnhancer.java | 97 ++++++++++++++-------- .../bartworks/system/material/Werkstoff.java | 36 ++++++++ .../bartworks/system/material/WerkstoffLoader.java | 7 +- 10 files changed, 154 insertions(+), 66 deletions(-) delete mode 100644 libs/TecTech-1.7.10-3.8.3.jar.REMOVED.git-id create mode 100644 libs/TecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id (limited to 'src') diff --git a/libs/TecTech-1.7.10-3.8.3.jar.REMOVED.git-id b/libs/TecTech-1.7.10-3.8.3.jar.REMOVED.git-id deleted file mode 100644 index b280989ef6..0000000000 --- a/libs/TecTech-1.7.10-3.8.3.jar.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -56ea637c442d397b87ecdaaac1be3c63f335c9e0 \ No newline at end of file diff --git a/libs/TecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id b/libs/TecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id new file mode 100644 index 0000000000..6a3cc6b00a --- /dev/null +++ b/libs/TecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id @@ -0,0 +1 @@ +c13aa64170017f7dcbb833974f75d7a99d14ae80 \ No newline at end of file diff --git a/libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id b/libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id index f92d3052a9..700ca28882 100644 --- a/libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id +++ b/libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id @@ -1 +1 @@ -099d4e2e397a3d24c7339102cf3908403f33ab3d \ No newline at end of file +14c31c860e0a098cc07a306c5a01997664b0604f \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index e2ad0b6416..6ba2dec96d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -47,6 +47,8 @@ import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.event.*; import cpw.mods.fml.common.network.IGuiHandler; import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; @@ -63,7 +65,7 @@ import static com.github.bartimaeusnek.bartworks.common.loaders.BioRecipeLoader. import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.removeIC2Recipes; import static gregtech.api.enums.GT_Values.VN; -@SuppressWarnings("unused") +@SuppressWarnings("ALL") @Mod( modid = MainMod.MOD_ID, name = MainMod.NAME, version = MainMod.VERSION, dependencies = "required-after:IC2; " @@ -89,8 +91,15 @@ public final class MainMod { public static MainMod instance; public static BW_Network BW_Network_instance = new BW_Network(); + @SideOnly(Side.CLIENT) + private void ClientGTppWarning() { + javax.swing.JOptionPane.showMessageDialog(null, + "BartWorks was NOT meant to be played with GT++," + + " since GT++'s Multiblocks break the Platinum Processing chain. " + + "Feel free to continue, but be aware of this.","GT++ Warning", javax.swing.JOptionPane.ERROR_MESSAGE); + } + @Mod.EventHandler - @SuppressWarnings("ALL") public void preInit(FMLPreInitializationEvent preinit) { if (!(API_REFERENCE.VERSION.equals(MainMod.APIVERSION))) { @@ -99,6 +108,15 @@ public final class MainMod { LoaderReference.init(); //Check for ALL the mods. + if (LoaderReference.miscutils) { + if (SideReference.Side.Client) + ClientGTppWarning(); + + MainMod.LOGGER.error("BartWorks was NOT meant to be played with GT++," + + " since GT++'s Multiblocks break the Platinum Processing chain. " + + "Feel free to continue, but be aware of this."); + } + if (LoaderReference.miscutils && ConfigHandler.GTppLogDisabler) { STFUGTPPLOG.replaceLogger(); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java index 8eac4a7f09..0502a4a82e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java @@ -43,7 +43,7 @@ import static com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry.BW_ public class GT_TileEntity_ElectricImplosionCompressor extends GT_MetaTileEntity_ImplosionCompressor { public static GT_Recipe.GT_Recipe_Map eicMap; - private boolean piston; + private Boolean piston = null; public GT_TileEntity_ElectricImplosionCompressor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -109,7 +109,8 @@ public class GT_TileEntity_ElectricImplosionCompressor extends GT_MetaTileEntity @Override public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - this.piston = true; + if (this.piston == null) + this.piston = true; } private void resetPiston() { @@ -148,8 +149,6 @@ public class GT_TileEntity_ElectricImplosionCompressor extends GT_MetaTileEntity } } } - GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(5), 10, 1.0F, aX, aY, aZ); - this.piston = !this.piston; } else { for (int x = -1; x <= 1; x++) { for (int z = -1; z <= 1; z++) { @@ -157,9 +156,9 @@ public class GT_TileEntity_ElectricImplosionCompressor extends GT_MetaTileEntity this.getBaseMetaTileEntity().getWorld().setBlock(xDir + aX + x, aY + 2, zDir + aZ + z, GregTech_API.sBlockMetal5, 2, 3); } } - GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(5), 10, 1.0F, aX, aY, aZ); - this.piston = !this.piston; } + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(5), 10, 1.0F, aX, aY, aZ); + this.piston = !this.piston; if (hax) this.explodeMultiblock(); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java index a688664efd..c1fa1fbc85 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java @@ -1,6 +1,6 @@ package com.github.bartimaeusnek.bartworks.system.material; -import com.github.technus.tectech.mechanics.structure.ICustomMetaBlock; +import com.github.technus.tectech.mechanics.structure.ICustomBlockSetting; import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_LanguageManager; @@ -17,8 +17,8 @@ import net.minecraft.world.World; import java.util.List; import java.util.Optional; -@cpw.mods.fml.common.Optional.Interface(modid = "tectech", striprefs = true, iface = "com.github.technus.tectech.mechanics.structure.ICustomMetaBlock") -public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks implements ICustomMetaBlock { +@cpw.mods.fml.common.Optional.Interface(modid = "tectech", striprefs = true, iface = "com.github.technus.tectech.mechanics.structure.ICustomBlockSetting") +public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks implements ICustomBlockSetting { public BW_MetaGeneratedBlocks_Casing(Material p_i45386_1_, Class tileEntity, String blockName, OrePrefixes prefixes) { super(p_i45386_1_, tileEntity, blockName, prefixes); @@ -51,16 +51,12 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks imple @Override public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) { - if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } @Override public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { - if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } @Override @@ -89,12 +85,7 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks imple @SuppressWarnings("unchecked") public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) { Werkstoff.werkstoffHashSet.stream() - .filter(pMaterial -> - pMaterial != null - && ( - pMaterial.hasItemType(OrePrefixes.plate) && pMaterial.hasItemType(OrePrefixes.screw) && pMaterial.hasItemType(OrePrefixes.plateDouble) - ) - ) + .filter(pMaterial -> (pMaterial.hasItemType(WerkstoffLoader.blockCasing))) .map(pMaterial -> new ItemStack(aItem, 1, pMaterial.getmID())) .forEach(aList::add); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java index d9d4ac7dbe..8838d9dc3d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java @@ -40,14 +40,18 @@ import net.minecraft.entity.item.EntityItem; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; +import java.util.HashSet; import java.util.List; +import java.util.Set; import static com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement.GTMetaItemEnhancer.NoMetaValue; public class BWGTMetaItems extends BW_MetaGenerated_Items { private boolean hasList; + private final Set hiddenThings = new HashSet<>(); public BWGTMetaItems(OrePrefixes orePrefixes, List noSubIDMaterials) { super(orePrefixes,null); @@ -60,10 +64,16 @@ public class BWGTMetaItems extends BW_MetaGenerated_Items { for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) if (w.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName())) continue materialloop; + if (OreDictionary.doesOreNameExist(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ",""))){ + hiddenThings.add(i); + continue; + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".name", getDefaultLocalization(w)); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".tooltip", w.getToolTip()); - GT_OreDictUnificator.registerOre(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ",""), tStack); + GT_OreDictUnificator.registerOre(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ",""), tStack); } + if (noSubIDMaterials != null){ hasList = true; materialloop: @@ -75,9 +85,13 @@ public class BWGTMetaItems extends BW_MetaGenerated_Items { for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) if (w.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName())) continue materialloop; + if (OreDictionary.doesOreNameExist(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ",""))){ + hiddenThings.add(i); + continue; + } GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".name", getDefaultLocalization(w)); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".tooltip", w.getToolTip()); - GT_OreDictUnificator.registerOre(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ",""), tStack); + GT_OreDictUnificator.registerOre(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ",""), tStack); } } } @@ -116,6 +130,8 @@ public class BWGTMetaItems extends BW_MetaGenerated_Items { continue; else if (((w.getMolten(1) == null && orePrefixes == WerkstoffLoader.capsuleMolten) || ((w.getFluid(1) == null && w.getGas(1) == null) && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle)))) continue; + else if (hiddenThings.contains(i)) + continue; aList.add(new ItemStack(this, 1, i)); } if (hasList) @@ -125,6 +141,8 @@ public class BWGTMetaItems extends BW_MetaGenerated_Items { continue; else if (((w.getMolten(1) == null && orePrefixes == WerkstoffLoader.capsuleMolten) || ((w.getFluid(1) == null && w.getGas(1) == null) && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle)))) continue; + else if (hiddenThings.contains(i)) + continue; aList.add(new ItemStack(this, 1, i + 1001)); } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java index fe66b74c40..75a2846172 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/GTMetaItemEnhancer.java @@ -23,7 +23,6 @@ package com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement; import com.github.bartimaeusnek.bartworks.API.LoaderReference; -import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -36,6 +35,7 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; import java.util.List; import java.util.stream.Collectors; @@ -52,48 +52,53 @@ public class GTMetaItemEnhancer { Materials[] values = Materials.values(); for (int i = 0, valuesLength = values.length; i < valuesLength; i++) { Materials m = values[i]; - if (m != null && m.mStandardMoltenFluid != null) { - final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(m.getMolten(144), new ItemStack(moltenCell, 1, i), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L)); - FluidContainerRegistry.registerFluidContainer(emptyData); - GT_Utility.addFluidContainerData(emptyData); - GT_Values.RA.addFluidCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), new ItemStack(moltenCell, 1, i), m.getMolten(144), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(new ItemStack(moltenCell, 1, i), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), GT_Values.NF, m.getMolten(144)); - } + if (m == null || m.mStandardMoltenFluid == null) + continue; + final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(m.getMolten(144), new ItemStack(moltenCell, 1, i), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L)); + FluidContainerRegistry.registerFluidContainer(emptyData); + GT_Utility.addFluidContainerData(emptyData); + GT_Values.RA.addFluidCannerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), new ItemStack(moltenCell, 1, i), m.getMolten(144), GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe(new ItemStack(moltenCell, 1, i), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L), GT_Values.NF, m.getMolten(144)); } } - if (LoaderReference.Forestry) { - NoMetaValue = Materials.getMaterialsMap().values().stream().filter(m -> m.mMetaItemSubID == -1).collect(Collectors.toList()); - Item moltenCapsuls = new BWGTMetaItems(WerkstoffLoader.capsuleMolten, null); - Item capsuls = new BWGTMetaItems(OrePrefixes.capsule, NoMetaValue); - //Item bottles = new BWGTMetaItems(OrePrefixes.bottle, NoMetaValue); + if (!LoaderReference.Forestry) { + return; + } + NoMetaValue = Materials.getMaterialsMap().values().stream().filter(m -> m.mMetaItemSubID == -1).collect(Collectors.toList()); + Item moltenCapsuls = new BWGTMetaItems(WerkstoffLoader.capsuleMolten, null); + Item capsuls = new BWGTMetaItems(OrePrefixes.capsule, NoMetaValue); + //Item bottles = new BWGTMetaItems(OrePrefixes.bottle, NoMetaValue); - Materials[] values = Materials.values(); - for (int i = 0, valuesLength = values.length; i < valuesLength; i++) { - Materials m = values[i]; - if (m.mStandardMoltenFluid != null && GT_OreDictUnificator.get(WerkstoffLoader.cellMolten, m, 1) != null) { - final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(m.getMolten(144), new ItemStack(moltenCapsuls, 1, i), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); - FluidContainerRegistry.registerFluidContainer(emptyData); - GT_Utility.addFluidContainerData(emptyData); - GT_Values.RA.addFluidCannerRecipe(GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1), new ItemStack(moltenCapsuls, 1, i), m.getMolten(144), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(new ItemStack(moltenCapsuls, 1, i), GT_Values.NI, GT_Values.NF, m.getMolten(144)); - } - if (m.getFluid(1) != null || m.getGas(1) != null) { - addFluidData(m,GT_ModHandler.getModItem("Forestry", "waxCapsule", 1),capsuls,1000,i,true); - // addFluidData(m,new ItemStack(Items.glass_bottle),bottles,250,i,false); - } - } - for (int i = 0, valuesLength = NoMetaValue.size(); i < valuesLength; i++) { - Materials m = NoMetaValue.get(i); - if (m.getFluid(1) != null || m.getGas(1) != null) { - addFluidData(m,GT_ModHandler.getModItem("Forestry", "waxCapsule", 1),capsuls,1000,i + 1001,true); - // addFluidData(m,new ItemStack(Items.glass_bottle),bottles,250,i + 1001,false); - } + Materials[] values = Materials.values(); + for (int i = 0, valuesLength = values.length; i < valuesLength; i++) { + Materials m = values[i]; + if (m.mStandardMoltenFluid != null && GT_OreDictUnificator.get(WerkstoffLoader.cellMolten, m, 1) != null) { + final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(m.getMolten(144), new ItemStack(moltenCapsuls, 1, i), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); + FluidContainerRegistry.registerFluidContainer(emptyData); + GT_Utility.addFluidContainerData(emptyData); + GT_Values.RA.addFluidCannerRecipe(GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1), new ItemStack(moltenCapsuls, 1, i), m.getMolten(144), GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe(new ItemStack(moltenCapsuls, 1, i), GT_Values.NI, GT_Values.NF, m.getMolten(144)); } - + if (m.getFluid(1) == null && m.getGas(1) == null) + continue; + if (OreDictionary.doesOreNameExist("capsule"+m.mName)) + continue; + addFluidData(m, GT_ModHandler.getModItem("Forestry", "waxCapsule", 1), capsuls, 1000, i, true); + // addFluidData(m, new ItemStack(Items.glass_bottle), bottles, 250, i, false); } + for (int i = 0, valuesLength = NoMetaValue.size(); i < valuesLength; i++) { + Materials m = NoMetaValue.get(i); + if (m.getFluid(1) == null && m.getGas(1) == null) + continue; + if (OreDictionary.doesOreNameExist("capsule"+m.mName)) + continue; + addFluidData(m, GT_ModHandler.getModItem("Forestry", "waxCapsule", 1), capsuls, 1000, i + 1001, true); + // addFluidData(m, new ItemStack(Items.glass_bottle), bottles, 250, i + 1001, false); + } + } - private static void addFluidData(Materials m, ItemStack container, Item filled,int amount, int it, boolean empty){ + private static void addFluidData(Materials m, ItemStack container, Item filled, int amount, int it, boolean empty){ Fluid f = m.getFluid(1) != null ? m.getFluid(1).getFluid() : m.getGas(1).getFluid(); final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(f, amount), new ItemStack(filled, 1, it), container); FluidContainerRegistry.registerFluidContainer(emptyData); @@ -102,4 +107,24 @@ public class GTMetaItemEnhancer { GT_Values.RA.addFluidCannerRecipe(new ItemStack(filled, 1, it), empty ? GT_Values.NI : container, GT_Values.NF, new FluidStack(f, amount)); } + public static void addAdditionalOreDictToForestry(){ + if (!LoaderReference.Forestry) + return; + OreDictionary.registerOre("capsuleWater", getForestryItem("waxCapsuleWater")); + OreDictionary.registerOre("capsuleIce", getForestryItem("waxCapsuleIce")); + OreDictionary.registerOre("capsuleHoney", getForestryItem("waxCapsuleHoney")); + OreDictionary.registerOre("capsuleJuice", getForestryItem("waxCapsuleJuice")); + OreDictionary.registerOre("capsuleSeedOil", getForestryItem("waxCapsuleSeedOil")); + OreDictionary.registerOre("capsuleEthanol", getForestryItem("waxCapsuleEthanol")); + OreDictionary.registerOre("capsuleBiomass", getForestryItem("waxCapsuleBiomass")); + OreDictionary.registerOre("capsuleShortMead", getForestryItem("waxCapsuleShortMead")); + OreDictionary.registerOre("capsuleMead", getForestryItem("waxCapsuleMead")); + OreDictionary.registerOre("capsuleFuel", getForestryItem("waxCapsuleFuel")); + OreDictionary.registerOre("capsuleOil", getForestryItem("waxCapsuleOil")); + OreDictionary.registerOre("capsuleLava", getForestryItem("refractoryLava")); + } + + private static ItemStack getForestryItem(String itemName){ + return GT_ModHandler.getModItem("Forestry", itemName, 1); + } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java index bf744178d9..5c5698afdc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java @@ -34,6 +34,7 @@ import net.minecraftforge.fluids.FluidStack; import java.lang.reflect.InvocationTargetException; import java.nio.ByteBuffer; import java.util.*; +import java.util.stream.Collectors; @SuppressWarnings("ALL") public class Werkstoff implements IColorModulationContainer, ISubTagContainer { @@ -75,6 +76,41 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { Werkstoff.default_null_Werkstoff = new Werkstoff(new short[3], "_NULL", "Default null Werkstoff", Werkstoff.DEFAULT_NULL_STATS, Werkstoff.Types.UNDEFINED, Werkstoff.DEFAULT_NULL_GENERATION_FEATURES, -1, TextureSet.SET_NONE); } + public Werkstoff(Materials materials, Werkstoff.GenerationFeatures generationFeatures, Types type, int mID){ + this( materials.mRGBa, + materials.getToolTip(), + materials.mDefaultLocalName, + type == null ? materials.mElement != null ? Types.ELEMENT : Types.UNDEFINED : type, + generationFeatures, + mID, + materials.mIconSet, + (List) materials.mOreByProducts, + materials.mMaterialList + .stream() + .map(ml -> new Pair(ml.mMaterial, (int) ml.mAmount)) + .collect(Collectors.toList()) + .>toArray(new Pair[0]) + ); + this.stats.mass = materials.getMass(); + this.stats.protons = materials.getProtons(); + this.stats.meltingPoint = materials.mMeltingPoint; + this.stats.neutrons = materials.getNeutrons(); + this.stats.speedOverride = materials.mToolSpeed; + this.stats.durOverride = materials.mDurability; + this.stats.qualityOverride = materials.mToolQuality; + this.stats.setGas(materials.mHasGas); + this.stats.setRadioactive(materials.isRadioactive()); + this.stats.setBlastFurnace(materials.mBlastFurnaceRequired); + if (type == Types.COMPOUND){ + this.stats.setElektrolysis(type == Types.COMPOUND); + this.generationFeatures.addChemicalRecipes(); + } + else if (type == Types.MIXTURE) { + this.stats.setCentrifuge(type == Types.MIXTURE); + this.generationFeatures.addMixerRecipes(); + } + } + public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type, int meltingpoint, Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet, Pair... contents) { this(rgba, defaultName, Werkstoff.Types.getDefaultStatForType(type).setMeltingPoint(meltingpoint), type, generationFeatures, mID, texSet, contents); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java index 6065c78a5a..07bef2bcf1 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java @@ -78,7 +78,7 @@ import static com.github.bartimaeusnek.bartworks.util.BW_Util.subscriptNumbers; import static com.github.bartimaeusnek.bartworks.util.BW_Util.superscriptNumbers; import static gregtech.api.enums.OrePrefixes.*; -@SuppressWarnings({"unchecked", "unused", "deprecation"}) +@SuppressWarnings({"unchecked", "deprecation"}) public class WerkstoffLoader { private WerkstoffLoader() { } @@ -148,7 +148,7 @@ public class WerkstoffLoader { Element t = EnumUtils.createNewElement("Tr", 123L, 203L, 0L, -1L, null, "Tiberium", false); blockCasing = EnumUtils.addNewOrePrefix("blockCasing", "A Casing block for a Multiblock-Machine", - "", " Casing", + "Bolted ", " Casing", true, true, true, @@ -165,7 +165,7 @@ public class WerkstoffLoader { -1); blockCasingAdvanced = EnumUtils.addNewOrePrefix("blockCasingAdvanced", "An Advanced Casing block for a Multiblock-Machine", - "Advanced ", " Casing", + "Rebolted ", " Casing", true, true, true, @@ -1740,6 +1740,7 @@ public class WerkstoffLoader { GameRegistry.registerBlock(WerkstoffLoader.BWBlockCasings, BW_MetaGeneratedBlock_Item.class, "bw.werkstoffblockscasing.01"); GameRegistry.registerBlock(WerkstoffLoader.BWBlockCasingsAdvanced, BW_MetaGeneratedBlock_Item.class, "bw.werkstoffblockscasingadvanced.01"); + GTMetaItemEnhancer.addAdditionalOreDictToForestry(); GTMetaItemEnhancer.init(); } -- cgit From 28747be843b6dff2e48c51fc0faaecc12d6f59f4 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Mon, 14 Sep 2020 20:11:05 +0200 Subject: Refactor + Updated Copyright + Split WerkstoffLoader into seperate Files + Fixed overclock underflow + Fixed TT debug code + Fixed autogenerated Casings Former-commit-id: 368bc456441b7560127b712cad2304cbf8628670 --- .../com/github/bartimaeusnek/ASM/ASMUtils.java | 2 +- .../bartimaeusnek/ASM/BWCoreTransformer.java | 2 +- .../bartworks/API/BioRecipeAdder.java | 2 +- .../bartimaeusnek/bartworks/API/INoiseGen.java | 2 +- .../bartimaeusnek/bartworks/API/IRadMaterial.java | 2 +- .../bartworks/API/ITileAddsInformation.java | 2 +- .../bartworks/API/ITileDropsContent.java | 2 +- .../API/ITileHasDifferentTextureSides.java | 2 +- .../bartimaeusnek/bartworks/API/ITileWithGUI.java | 2 +- .../client/ClientEventHandler/TooltipCache.java | 2 +- .../ClientEventHandler/TooltipEventHandler.java | 2 +- .../bartworks/client/creativetabs/BioTab.java | 2 +- .../bartworks/client/creativetabs/GT2Tab.java | 2 +- .../client/creativetabs/bartworksTab.java | 2 +- .../gui/BW_GUIContainer_HeatedWaterPump.java | 2 +- .../client/gui/BW_GUIContainer_RadLevel.java | 2 +- .../client/gui/BW_GUIContainer_RotorBlock.java | 2 +- .../gui/GT_GUIContainer_CircuitProgrammer.java | 2 +- .../client/gui/GT_GUIContainer_Destructopack.java | 2 +- .../bartworks/client/gui/GT_GUIContainer_LESU.java | 2 +- .../client/renderer/BW_GT_ItemRenderer.java | 2 +- .../client/renderer/BW_GT_Vanilla_Texture.java | 2 +- .../client/renderer/BW_Renderer_Block_Ores.java | 2 +- .../client/renderer/RendererGlasBlock.java | 2 +- .../renderer/RendererSwitchingColorFluid.java | 2 +- .../blocks/BW_TileEntityContainer_Multiple.java | 2 +- .../bartworks/common/blocks/BioFluidBlock.java | 2 +- .../common/commands/PrintRecipeListToFile.java | 3 +- .../bartworks/common/commands/SummonRuin.java | 2 +- .../bartworks/common/items/BW_ItemBlocks.java | 2 +- .../bartworks/common/items/BW_SimpleWindMeter.java | 2 +- .../bartworks/common/items/BW_Stonage_Rotors.java | 2 +- .../bartworks/common/items/Circuit_Programmer.java | 2 +- .../common/items/GT_Destructopack_Item.java | 2 +- .../bartworks/common/items/GT_Rockcutter_Item.java | 2 +- .../bartworks/common/items/GT_Teslastaff_Item.java | 2 +- .../bartworks/common/items/LabModule.java | 2 +- .../bartworks/common/items/LabParts.java | 2 +- .../bartworks/common/items/SimpleIconItem.java | 2 +- .../bartworks/common/items/SimpleSubItemClass.java | 2 +- .../bartworks/common/net/BW_Network.java | 2 +- .../common/net/CircuitProgrammerPacket.java | 2 +- .../bartworks/common/net/MetaBlockPacket.java | 2 +- .../bartworks/common/net/OreDictCachePacket.java | 2 +- .../bartworks/common/net/ServerJoinedPackage.java | 2 +- .../classic/BWTileEntityDimIDBridge.java | 2 +- .../common/tileentities/classic/BW_RotorBlock.java | 2 +- .../BW_TileEntity_ExperimentalFloodGate.java | 2 +- .../classic/BW_TileEntity_InfinityTank.java | 2 +- .../common/tileentities/debug/CreativeScanner.java | 2 +- .../multis/GT_TileEntity_CircuitAssemblyLine.java | 3 +- .../tileentities/multis/GT_TileEntity_DEHP.java | 2 +- .../GT_TileEntity_ElectricImplosionCompressor.java | 2 +- .../tileentities/multis/GT_TileEntity_LESU.java | 2 +- .../multis/GT_TileEntity_ManualTrafo.java | 3 +- .../mega/GT_TileEntity_MegaProcessingArray.java | 2 +- .../tiered/GT_MetaTileEntity_AcidGenerator.java | 2 +- .../GT_MetaTileEntity_CompressedFluidHatch.java | 2 +- .../tiered/GT_MetaTileEntity_Diode.java | 2 +- .../GT_MetaTileEntity_EnergyDistributor.java | 2 +- .../tiered/GT_MetaTileEntity_GiantOutputHatch.java | 2 +- .../tiered/GT_MetaTileEntity_Transistor.java | 2 +- .../bartworks/neiHandler/BW_NEI_BioLabHandler.java | 2 +- .../bartworks/neiHandler/BW_NEI_BioVatHandler.java | 2 +- .../bartworks/neiHandler/NEI_BW_Config.java | 2 +- .../container/BW_Container_HeatedWaterPump.java | 2 +- .../server/container/BW_Container_RadioHatch.java | 2 +- .../container/GT_Container_CircuitProgrammer.java | 2 +- .../container/GT_Container_Item_Destructopack.java | 2 +- .../server/container/GT_Container_LESU.java | 2 +- .../server/container/GT_Container_RadioHatch.java | 2 +- .../server/container/Slots/BW_DelSlot.java | 2 +- .../server/container/Slots/BW_FuelSlot.java | 2 +- .../material/BW_MetaGeneratedBlock_Item.java | 2 +- .../material/BW_MetaGeneratedBlocks_Casing.java | 35 +- .../BW_MetaGeneratedBlocks_CasingAdvanced_TE.java | 22 + .../material/BW_MetaGeneratedBlocks_Casing_TE.java | 22 + .../system/material/BW_MetaGeneratedFrames.java | 2 +- .../system/material/BW_MetaGeneratedOreTE.java | 2 +- .../material/BW_MetaGeneratedSmallOreTE.java | 2 +- .../system/material/BW_MetaGenerated_Block_TE.java | 2 +- .../system/material/BW_MetaGenerated_Blocks.java | 2 +- .../system/material/BW_MetaGenerated_Items.java | 3 +- .../system/material/BW_NonMeta_MaterialItems.java | 2 +- .../material/CircuitGeneration/CircuitData.java | 2 +- .../CircuitGeneration/CircuitImprintLoader.java | 6 +- .../CircuitGeneration/CircuitPartLoader.java | 2 +- .../bartworks/system/material/Werkstoff.java | 18 +- .../bartworks/system/material/WerkstoffLoader.java | 945 ++------------------- .../processingLoaders/AfterLuVTierEnhacement.java | 4 +- .../werkstoff_loaders/IWerkstoffRunnable.java | 29 + .../werkstoff_loaders/recipe/AspectLoader.java | 61 ++ .../werkstoff_loaders/recipe/BlockLoader.java | 48 ++ .../werkstoff_loaders/recipe/CasingLoader.java | 69 ++ .../werkstoff_loaders/recipe/CellLoader.java | 187 ++++ .../recipe/CraftingMaterialLoader.java | 106 +++ .../werkstoff_loaders/recipe/CrushedLoader.java | 93 ++ .../werkstoff_loaders/recipe/DustLoader.java | 205 +++++ .../werkstoff_loaders/recipe/GemLoader.java | 112 +++ .../werkstoff_loaders/recipe/MetalLoader.java | 43 + .../werkstoff_loaders/recipe/MoltenCellLoader.java | 84 ++ .../recipe/MultipleMetalLoader.java | 46 + .../werkstoff_loaders/recipe/OreLoader.java | 53 ++ .../recipe/SimpleMetalLoader.java | 84 ++ .../werkstoff_loaders/recipe/ToolLoader.java | 121 +++ .../registration/AssociationLoader.java | 49 ++ .../registration/BridgeMaterialsLoader.java | 122 +++ .../registration/CasingRegistrator.java | 48 ++ .../bartworks/system/object/AbstractedStack.java | 2 +- .../bartworks/system/oredict/OreDictAdder.java | 2 +- .../bartworks/system/oredict/OreDictHandler.java | 2 +- .../bartworks/system/oregen/BW_WordGenerator.java | 2 +- .../system/oregen/BW_WorldGenRoss128b.java | 2 +- .../system/oregen/BW_WorldGenRoss128ba.java | 2 +- .../bartimaeusnek/bartworks/util/BW_Util.java | 65 +- .../crossmod/emt/recipe/TCRecipeHandler.java | 2 +- .../multi/GT_Industrial_Alchemic_Construct.java | 2 +- .../crossmod/emt/util/EMTHandler.java | 2 +- .../crossmod/galacticraft/PlanetsHelperClass.java | 2 +- .../atmosphere/BWAtmosphereManager.java | 6 +- .../galacticraft/blocks/UniversalSpaceBlocks.java | 2 +- .../galacticraft/creativetabs/SpaceTab.java | 2 +- .../planets/AbstractWorldProviderSpace.java | 2 +- .../planets/ross128b/SkyProviderRoss128b.java | 2 +- .../planets/ross128b/WorldProviderRoss128b.java | 2 +- .../planets/ross128ba/ChunkProviderRoss128ba.java | 2 +- .../tileEntity/DysonSwarmSunReplacement.java | 2 +- .../galaxySpace/tileEntity/GalaxySpaceProxy.java | 2 +- .../crossmod/openComputers/GT_NBT_DataBase.java | 2 +- .../tectech/TT_TileEntity_ManualTrafo.java | 4 +- .../crossmod/thaumcraft/CustomAspects.java | 2 +- .../tile/GT_Multi_IndustrialCrucible.java | 2 +- .../crossmod/thaumcraft/tile/GT_WandBuffer.java | 2 +- 133 files changed, 1829 insertions(+), 1072 deletions(-) create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java (limited to 'src') diff --git a/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java b/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java index bdfdb29ca8..4d9fe89836 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java index 99a748fbd7..775c3fc9b1 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java index 30d387399c..7fb06e019e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java index 8d5c0d23ae..96a075d9c7 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java index b4fe0923bc..19f422265b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java index fe92654fd0..d7de7ee822 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java index 5e8663f907..c10f7ffb39 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java index 9ae176d26f..369a403dc1 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java index deec80e80f..1318cb919f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java index 59e9ee2782..efa6f601ef 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java index 1f28933622..d5875e4609 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java index 628b4acb96..0360502170 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java index 03ecf155e3..a300c63802 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java index 41ce06cc81..68c82fc7cc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java index 610aeb14f7..16cafa256d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java index 5ede1e09f0..7a9603ee61 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java index 94731e1833..90923deee4 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java index ba0bc69c3b..80970c254c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java index 2f45e3c7c9..aa13bb4ee1 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java index ae1187c3d0..c0d2ed88c6 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java index 4de38a0e55..f11167a6bc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java index 4dd9bc3860..bad6170263 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java index 5418587508..795acbec17 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java index 74bc3e2712..a054273f6b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java index cb0f78ffa5..612bd33b98 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java index 41525ef6d7..6a8c62bb83 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java index 61c93217d9..a135e7e315 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java index b7d6e7f82d..9b85abbedb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/PrintRecipeListToFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -44,6 +44,7 @@ public class PrintRecipeListToFile extends CommandBase { } @Override + @SuppressWarnings("unchecked") public void processCommand(ICommandSender p_71515_1_, String[] p_71515_2_) { File file = new File(p_71515_2_[0]); try { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java index 3e410ff2d3..aedddf54f8 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java index 46706f6f08..a3a9fc26e0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java index e6c0a5ad90..c5a6efd711 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java index fdb263a9f0..efe7f5c6ca 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java index a39d75dd97..29c14101a6 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java index 1376a00bd8..c6a6782e34 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java index 700b8974c3..3c132cef88 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java index 458a80e673..ba46ded1b2 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java index a588921145..8d0dfcbb60 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java index b879c94958..c98bdf232a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java index d8070f4e90..2b9cb9a994 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleIconItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java index 8287c44778..34bf243c1b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java index b22bd115fd..ca291e64bc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/BW_Network.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java index be1fb4dea5..3b4571a4ca 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/CircuitProgrammerPacket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java index 7d083bdaec..4fa7ab4327 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/MetaBlockPacket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java index 9a4ce6cf38..2831ee4ebe 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/OreDictCachePacket.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java index 4a1367d1dc..4f3eaf160e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/net/ServerJoinedPackage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java index e382a138ec..816f43c20b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BWTileEntityDimIDBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java index 78df5d33f8..f655541555 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_RotorBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java index 0497a1b5b6..2cae9449df 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_ExperimentalFloodGate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java index f47be6d45e..9efc0c4cfb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/classic/BW_TileEntity_InfinityTank.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java index ac7c929cba..f252afa132 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java index fe20f66d50..45bcd28218 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -379,6 +379,7 @@ public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBl } @Override + @SuppressWarnings("deprecation") public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { return aSide == aFacing ? new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE)} : new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]}; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java index daadf33416..35e9667204 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_DEHP.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java index 0502a4a82e..bd45fe554a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java index 1c39d5e07c..5f6dde9c7f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java index 8c258a96e6..06c8324457 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -396,6 +396,7 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_MultiBlockBase } @Override + @SuppressWarnings("deprecation") public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { return aSide == aFacing ? new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[this.texid], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)} : new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[this.texid]}; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaProcessingArray.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaProcessingArray.java index 89c68563de..cd630ef2c3 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaProcessingArray.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaProcessingArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java index cc82311a70..9d17accb06 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java index be916e52ff..4105c99c3c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_CompressedFluidHatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java index fc7a1e6a05..3d82290fac 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java index f454af02d5..eb19af2040 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java index 4f2bebb0d6..1aa313c19b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_GiantOutputHatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java index 94b1aedd7e..d5afddb264 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Transistor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java index dec4e11c5e..0e17f16506 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioLabHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java index 531c54cfd1..7b554447a2 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_BioVatHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java index 48c1b6e6ed..c0f6ba3340 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/NEI_BW_Config.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java index 4bc7bf3802..ee959d878a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_HeatedWaterPump.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java index 8d2d9b0b51..918713a50a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/BW_Container_RadioHatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java index 385897db6a..95ac8a9a09 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java index 2fd79898d8..7f82680495 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_Item_Destructopack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java index 7621a17f0a..5541256158 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java index 512325688c..e576296d7b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_RadioHatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java index 84f054b4bb..3ce3219bde 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_DelSlot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java index 6e2eafdf13..0cc1cf956b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/Slots/BW_FuelSlot.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java index 0e2121a0ae..18748c8e5c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java index c1fa1fbc85..adeeea4928 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.github.bartimaeusnek.bartworks.system.material; import com.github.technus.tectech.mechanics.structure.ICustomBlockSetting; @@ -85,14 +107,25 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks imple @SuppressWarnings("unchecked") public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) { Werkstoff.werkstoffHashSet.stream() - .filter(pMaterial -> (pMaterial.hasItemType(WerkstoffLoader.blockCasing))) + .filter(pMaterial -> + pMaterial.hasItemType(OrePrefixes.plate) + && pMaterial.hasItemType(OrePrefixes.screw) + && pMaterial.hasItemType(OrePrefixes.plateDouble) + ) .map(pMaterial -> new ItemStack(aItem, 1, pMaterial.getmID())) .forEach(aList::add); } + /** + * DEBUG Method for TT-Blueprints! + */ @cpw.mods.fml.common.Optional.Method(modid = "tectech") public void setBlock(World world, int x, int y, int z, int meta) { world.setBlock(x, y, z,this, meta,2); + try { + Thread.sleep(1); + //Fucking Minecraft TE settings. + } catch (InterruptedException ignored) {} Optional.ofNullable(world.getTileEntity(x,y,z)) .filter(te -> te instanceof BW_MetaGeneratedBlocks_Casing_TE) .map(te -> (BW_MetaGeneratedBlocks_Casing_TE) te) diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java index 4234355124..6dd15c8b5a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_CasingAdvanced_TE.java @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.github.bartimaeusnek.bartworks.system.material; import com.github.bartimaeusnek.bartworks.API.SideReference; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java index b14f30f120..58863aff02 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing_TE.java @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.github.bartimaeusnek.bartworks.system.material; import com.github.bartimaeusnek.bartworks.API.SideReference; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java index 37c14a6bd0..5fe7a3c4f5 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedFrames.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java index 5a5539b3f4..e43ee12471 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedOreTE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java index 80126f39f4..3aa323277f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedSmallOreTE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java index 7213816976..9ad31b32cd 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Block_TE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java index 1dbe218c09..87eaf7038d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java index 10e33f28cc..ab84e7fd0b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java @@ -89,7 +89,6 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa } } - public boolean onEntityItemUpdate(EntityItem aItemEntity) { if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure || this.orePrefixes == OrePrefixes.crushed) { int aDamage = aItemEntity.getEntityItem().getItemDamage(); @@ -223,7 +222,7 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa @Override public int getRadiationLevel(ItemStack aStack) { Werkstoff w = werkstoffHashMap.get((short)aStack.getItemDamage()); - return w.getStats().isRadioactive() ? (int) w.getStats().protons : 0; + return w.getStats().isRadioactive() ? (int) w.getStats().getProtons() : 0; } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java index 1cb7d6ea64..fd3a74b470 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java index 22a1caaaf1..33658ef8e9 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java index 56e3ad035c..bad997cb1e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -60,7 +60,7 @@ public class CircuitImprintLoader { private static final HashSet ORIGINAL_CAL_RECIPES = new HashSet<>(); private static final HashSet MODIFIED_CAL_RECIPES = new HashSet<>(); - @SuppressWarnings("unused") + @SuppressWarnings({"unused","RedundantSuppression"}) public static void run() { HashSet toRem = new HashSet<>(); HashSet toAdd = new HashSet<>(); @@ -69,7 +69,7 @@ public class CircuitImprintLoader { rebuildCircuitAssemblerMap(toRem,toAdd); exchangeRecipesInList(toRem,toAdd); makeCircuitImprintRecipes(); - + toRem = null; toAdd = null; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java index 79ee9d697a..a82dfb452d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/CircuitPartLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java index 5c5698afdc..0713ddf102 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java @@ -801,16 +801,14 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { return this; } - byte qualityOverride; - int durOverride; - float speedOverride; - - int meltingPoint; - - long protons; - long neutrons; - long electrons; - long mass; + private byte qualityOverride; + private int durOverride; + private float speedOverride; + private int meltingPoint; + private long protons; + private long neutrons; + private long electrons; + private long mass; float durMod = 1f; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java index 07bef2bcf1..5e12e2e7a9 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java @@ -27,47 +27,38 @@ import com.github.bartimaeusnek.bartworks.API.SideReference; import com.github.bartimaeusnek.bartworks.API.WerkstoffAdderRegistry; import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.client.renderer.BW_Renderer_Block_Ores; -import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker; -import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.BW_CircuitsLoader; import com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement.GTMetaItemEnhancer; import com.github.bartimaeusnek.bartworks.system.material.processingLoaders.AdditionalRecipes; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe.*; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.registration.AssociationLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.registration.BridgeMaterialsLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.registration.CasingRegistrator; import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler; -import com.github.bartimaeusnek.bartworks.util.BWRecipes; import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil; import com.github.bartimaeusnek.bartworks.util.EnumUtils; import com.github.bartimaeusnek.bartworks.util.Pair; import com.github.bartimaeusnek.bartworks.util.log.DebugLog; import com.github.bartimaeusnek.crossmod.cls.CLSCompat; -import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler; import com.google.common.collect.HashBiMap; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.ProgressManager; import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enchants.Enchantment_Radioactivity; import gregtech.api.enums.*; import gregtech.api.interfaces.ISubTagContainer; import gregtech.api.objects.GT_Fluid; -import gregtech.api.objects.GT_MultiTexture; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.*; -import gregtech.common.GT_Proxy; import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.items.behaviors.Behaviour_DataOrb; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputOreDict; import ic2.api.recipe.RecipeOutput; import ic2.api.recipe.Recipes; import net.minecraft.block.Block; import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import org.apache.logging.log4j.Level; @@ -199,9 +190,10 @@ public class WerkstoffLoader { } //TODO: - //FREE ID RANGE: 95-30000 - //bartimaeusnek reserved 0-10000 - //Tec & basdxz reserved range 30000-32767 + //FREE ID RANGE: 95-29_999 + //bartimaeusnek reserved 0-10_000 + //Tec & basdxz reserved range 30_000-31_000 + //GT Material range reserved on 31_767-32_767 public static final Werkstoff Bismutite = new Werkstoff( new short[]{255, 233, 0, 0}, "Bismutite", @@ -1432,7 +1424,7 @@ public class WerkstoffLoader { return WerkstoffLoader.getCorrespondingItemStack(orePrefixes, werkstoff, 1); } - private static ItemStack getCorrespondingItemStackUnsafe(OrePrefixes orePrefixes, Werkstoff werkstoff, int amount) { + public static ItemStack getCorrespondingItemStackUnsafe(OrePrefixes orePrefixes, Werkstoff werkstoff, int amount) { if (!werkstoff.getGenerationFeatures().enforceUnification) { ItemStack ret = OreDictHandler.getItemStack(werkstoff.getVarName(), orePrefixes, amount); if (ret != null) @@ -1480,13 +1472,31 @@ public class WerkstoffLoader { long timepre = System.nanoTime(); ProgressManager.ProgressBar progressBar = ProgressManager.push("Register BW Materials", Werkstoff.werkstoffHashSet.size() + 1); DebugLog.log("Loading Recipes" + (System.nanoTime() - timepre)); - Integer[] clsArr = new Integer[0]; int size = 0; if (LoaderReference.betterloadingscreen) clsArr = CLSCompat.initCls(); + + IWerkstoffRunnable[] werkstoffRunnables = new IWerkstoffRunnable[]{ + new ToolLoader(), + new DustLoader(), + new GemLoader(), + new SimpleMetalLoader(), + new CasingLoader(), + new AspectLoader(), + new OreLoader(), + new CrushedLoader(), + new CraftingMaterialLoader(), + new CellLoader(), + new MoltenCellLoader(), + new MultipleMetalLoader(), + new MetalLoader(), + new BlockLoader() + }; + + long timepreone = 0; for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { - long timepreone = System.nanoTime(); + timepreone = System.nanoTime(); DebugLog.log("Werkstoff is null or id < 0 ? " + (werkstoff == null || werkstoff.getmID() < 0) + " " + (System.nanoTime() - timepreone)); if (werkstoff == null || werkstoff.getmID() < 0) { progressBar.step(""); @@ -1495,41 +1505,17 @@ public class WerkstoffLoader { if (LoaderReference.betterloadingscreen) size = CLSCompat.invokeStepSize(werkstoff, clsArr, size); DebugLog.log("Werkstoff: " + werkstoff.getDefaultName() + " " + (System.nanoTime() - timepreone)); - DebugLog.log("Loading Dusts Recipes" + " " + (System.nanoTime() - timepreone)); - addDustRecipes(werkstoff); - DebugLog.log("Loading Gem Recipes" + " " + (System.nanoTime() - timepreone)); - addGemRecipes(werkstoff); - DebugLog.log("Loading Ore Recipes" + " " + (System.nanoTime() - timepreone)); - addOreRecipes(werkstoff); - DebugLog.log("Loading Crushed Recipes" + " " + (System.nanoTime() - timepreone)); - addCrushedRecipes(werkstoff); - DebugLog.log("Loading Cell Recipes" + " " + (System.nanoTime() - timepreone)); - addCellRecipes(werkstoff); - DebugLog.log("Loading Meltdown Recipes" + " " + (System.nanoTime() - timepreone)); - addMoltenRecipes(werkstoff); - DebugLog.log("Loading Simple MetalWorking Recipes" + " " + (System.nanoTime() - timepreone)); - addSimpleMetalRecipes(werkstoff); - DebugLog.log("Loading Crafting MetalWorking Recipes" + " " + (System.nanoTime() - timepreone)); - addCraftingMetalRecipes(werkstoff); - DebugLog.log("Loading MultipleIngots MetalWorking Recipes" + " " + (System.nanoTime() - timepreone)); - addMultipleMetalRecipes(werkstoff); - DebugLog.log("Loading Metal Recipes" + " " + (System.nanoTime() - timepreone)); - addMetalRecipes(werkstoff); - DebugLog.log("Loading Block Recipes" + " " + (System.nanoTime() - timepreone)); - addBlockRecipes(werkstoff); - DebugLog.log("Loading Tool Recipes" + " " + (System.nanoTime() - timepreone)); - addTools(werkstoff); - DebugLog.log("Loading Casing Recipes" + " " + (System.nanoTime() - timepreone)); - addCasingRecipes(werkstoff); - if (LoaderReference.Thaumcraft) { - DebugLog.log("Loading Aspects" + " " + (System.nanoTime() - timepreone)); - addAspectToAll(werkstoff); + for (IWerkstoffRunnable runnable : werkstoffRunnables) { + String loaderName = runnable.getClass().getSimpleName(); + DebugLog.log( loaderName + " started " + (System.nanoTime() - timepreone)); + runnable.run(werkstoff); + DebugLog.log(loaderName + " done " + (System.nanoTime() - timepreone)); } - DebugLog.log("Loading New Circuits" + " " + (System.nanoTime() - timepreone)); - BW_CircuitsLoader.initNewCircuits(); DebugLog.log("Done" + " " + (System.nanoTime() - timepreone)); progressBar.step(werkstoff.getDefaultName()); } + DebugLog.log("Loading New Circuits" + " " + (System.nanoTime() - timepreone)); + BW_CircuitsLoader.initNewCircuits(); if (LoaderReference.betterloadingscreen) CLSCompat.disableCls(); @@ -1544,7 +1530,6 @@ public class WerkstoffLoader { } private static void addSubTags() { - WerkstoffLoader.CubicZirconia.getStats().setDurOverride(Materials.Diamond.mDurability); WerkstoffLoader.HDCS.getStats().setSpeedOverride(Materials.HSSS.mToolSpeed); WerkstoffLoader.HDCS.getStats().setDurMod(10f); @@ -1556,7 +1541,6 @@ public class WerkstoffLoader { Materials.Radon.add(WerkstoffLoader.NOBLE_GAS); WerkstoffLoader.Oganesson.add(WerkstoffLoader.NOBLE_GAS, WerkstoffLoader.ANAEROBE_GAS); - Materials.Nitrogen.add(WerkstoffLoader.ANAEROBE_GAS); WerkstoffLoader.Calcium.add(WerkstoffLoader.ANAEROBE_SMELTING); @@ -1624,8 +1608,8 @@ public class WerkstoffLoader { if (!FluidRegistry.isFluidRegistered("molten." + werkstoff.getDefaultName())) { DebugLog.log("Adding new Molten: " + werkstoff.getDefaultName()); Fluid fluid = new GT_Fluid("molten." + werkstoff.getDefaultName(), "molten.autogenerated", werkstoff.getRGBA()); - if (werkstoff.getStats().meltingPoint > 0) - fluid = fluid.setTemperature(werkstoff.getStats().meltingPoint); + if (werkstoff.getStats().getMeltingPoint() > 0) + fluid = fluid.setTemperature(werkstoff.getStats().getMeltingPoint()); FluidRegistry.registerFluid(fluid); //GT_LanguageManager.addStringLocalization("Molten." + werkstoff.getDefaultName(), "Molten "+ werkstoff.getDefaultName()); GT_LanguageManager.addStringLocalization(fluid.getUnlocalizedName(), "Molten " + werkstoff.getDefaultName()); @@ -1745,102 +1729,21 @@ public class WerkstoffLoader { } private static void runGTItemDataRegistrator() { + IWerkstoffRunnable[] registrations = new IWerkstoffRunnable[] { + new BridgeMaterialsLoader(), + new AssociationLoader(), + new CasingRegistrator() + }; for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { - //int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, String aConfigSection, boolean aCustomOre, String aCustomID - Materials werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null ? werkstoff.getBridgeMaterial() : Materials.get(werkstoff.getVarName()) != Materials._NULL ? Materials.get(werkstoff.getVarName()) : - new Materials(-1, werkstoff.getTexSet(), werkstoff.getToolSpeed(), werkstoff.getDurability(), werkstoff.getToolQuality(), 0, werkstoff.getRGBA()[0], werkstoff.getRGBA()[1], werkstoff.getRGBA()[2], werkstoff.getRGBA()[3], werkstoff.getVarName(), werkstoff.getDefaultName(), 0, 0, werkstoff.getStats().meltingPoint, werkstoff.getStats().meltingPoint, werkstoff.getStats().isBlastFurnace(), false, 0, 1, 1, null); - for (OrePrefixes prefixes : values()) { - if (!(prefixes == cell && werkstoff.getType().equals(Werkstoff.Types.ELEMENT))) { - if (prefixes == dust && werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { - if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { - boolean ElementSet = false; - for (Element e : Element.values()) { - if (e.toString().equals(werkstoff.getToolTip())) { - if (e.mLinkedMaterials.size() > 0) - break; - werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null ? werkstoff.getBridgeMaterial() : Materials.get(werkstoff.getVarName()) != Materials._NULL ? Materials.get(werkstoff.getVarName()) : - new Materials(-1, werkstoff.getTexSet(), werkstoff.getToolSpeed(), werkstoff.getDurability(), werkstoff.getToolQuality(), 0, werkstoff.getRGBA()[0], werkstoff.getRGBA()[1], werkstoff.getRGBA()[2], werkstoff.getRGBA()[3], werkstoff.getVarName(), werkstoff.getDefaultName(), 0, 0, werkstoff.getStats().meltingPoint, werkstoff.getStats().meltingPoint, werkstoff.getStats().isBlastFurnace(), false, 0, 1, 1, null); - werkstoffBridgeMaterial.mElement = e; - e.mLinkedMaterials = new ArrayList<>(); - e.mLinkedMaterials.add(werkstoffBridgeMaterial); - if (werkstoff.hasItemType(dust)) { - GT_OreDictUnificator.addAssociation(dust, werkstoffBridgeMaterial, werkstoff.get(dust), false); - GT_OreDictUnificator.set(dust, werkstoffBridgeMaterial, werkstoff.get(dust), true, true); - } - ElementSet = true; - break; - } - } - if (!ElementSet) - continue; -// try { -// Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); -// f.setAccessible(true); -// Map MATERIALS_MAP = (Map) f.get(null); -// MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); -// } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { -// e.printStackTrace(); -// } - if (werkstoff.hasItemType(dust)) { - ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); - Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); - Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(prefixes)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); - //GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, null, new ItemStack[]{werkstoff.get(prefixes)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); - } - } - } - - if (werkstoff.hasItemType(cell)) { - werkstoffBridgeMaterial.setHasCorrespondingFluid(true); - werkstoffBridgeMaterial.setHasCorrespondingGas(true); - werkstoffBridgeMaterial.mFluid = werkstoff.getFluidOrGas(1).getFluid(); - werkstoffBridgeMaterial.mGas = werkstoff.getFluidOrGas(1).getFluid(); - } - - if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { - werkstoffBridgeMaterial.mStandardMoltenFluid = werkstoff.getMolten(1).getFluid(); - } - werkstoffBridgeMaterial.mName = werkstoff.getVarName(); - werkstoffBridgeMaterial.mDefaultLocalName = werkstoff.getDefaultName(); - try { - Field f = Materials.class.getField("mLocalizedName"); - f.set(werkstoffBridgeMaterial, werkstoff.getDefaultName()); - } catch (NoSuchFieldException | IllegalAccessException ignored) { - } - werkstoffBridgeMaterial.mChemicalFormula = werkstoff.getToolTip(); - if (LoaderReference.Thaumcraft) - werkstoffBridgeMaterial.mAspects = werkstoff.getGTWrappedTCAspects(); - werkstoffBridgeMaterial.mMaterialInto = werkstoffBridgeMaterial; - werkstoffBridgeMaterial.mHandleMaterial = werkstoff.contains(SubTag.BURNING) ? Materials.Blaze : werkstoff.contains(SubTag.MAGICAL) ? Materials.Thaumium : werkstoffBridgeMaterial.mDurability > 5120 ? Materials.TungstenSteel : werkstoffBridgeMaterial.mDurability > 1280 ? Materials.Steel : Materials.Wood; - if (werkstoff.getStats().isRadioactive()) { - werkstoffBridgeMaterial.setEnchantmentForArmors(Enchantment_Radioactivity.INSTANCE, werkstoff.getStats().getEnchantmentlvl()); - werkstoffBridgeMaterial.setEnchantmentForTools(Enchantment_Radioactivity.INSTANCE, werkstoff.getStats().getEnchantmentlvl()); - } - werkstoff.setBridgeMaterial(werkstoffBridgeMaterial); - //if (WerkstoffLoader.items.get(prefixes) != null) - } + for (IWerkstoffRunnable registration : registrations) { + registration.run(werkstoff); } } - addAssociationToItems(); addFakeItemDataToInWorldBlocksAndCleanUpFakeData(); - addCasingsToGTOreDictUnificator(); + addVanillaCasingsToGTOreDictUnificator(); } - public static void addCasingsToGTOreDictUnificator(){ - Werkstoff.werkstoffHashSet.forEach(werkstoff -> { - GT_OreDictUnificator.addAssociation( - blockCasing, werkstoff.getBridgeMaterial(), - new ItemStack(WerkstoffLoader.BWBlockCasings, 1, werkstoff.getmID()), - false - ); - GT_OreDictUnificator.addAssociation( - blockCasingAdvanced, werkstoff.getBridgeMaterial(), - new ItemStack(WerkstoffLoader.BWBlockCasingsAdvanced, 1, werkstoff.getmID()), - false - ); - } - ); + public static void addVanillaCasingsToGTOreDictUnificator(){ GT_OreDictUnificator.addAssociation( blockCasing, Materials.Aluminium, ItemList.Casing_FrostProof.get(1L), @@ -1873,21 +1776,6 @@ public class WerkstoffLoader { ); } - public static void addAssociationToItems() { - Arrays.stream(values()).forEach(prefixes -> - Werkstoff.werkstoffHashSet.stream() - .filter(werkstoff -> werkstoff.hasItemType(prefixes)) - .forEach(werkstoff -> { - Materials werkstoffBridgeMaterial = werkstoff.getBridgeMaterial(); - ItemStack stack = WerkstoffLoader.getCorrespondingItemStackUnsafe(prefixes, werkstoff, 1); - - if (stack != null && stack.getItem() != null) { - GT_OreDictUnificator.addAssociation(prefixes, werkstoffBridgeMaterial, stack, false); - GT_OreDictUnificator.set(prefixes, werkstoffBridgeMaterial, stack, true, true); - } - })); - } - /** * very hacky way to make my ores/blocks/smallores detectable by gt assosication in world, well at least the prefix. * used for the miners mostly @@ -1923,80 +1811,6 @@ public class WerkstoffLoader { MATERIALS_MAP.remove("bwblocks"); } - private static void addTools(Werkstoff werkstoff) { - if (werkstoff.getBridgeMaterial().mDurability == 0) - return; - - if (werkstoff.hasItemType(gem)) { - if (!werkstoff.getGenerationFeatures().isExtension()) - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HARDHAMMER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"XX ", "XXS", "XX ", 'X', gem.get(werkstoff.getBridgeMaterial()), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(toolHeadSaw, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"GGf", 'G', gem.get(werkstoff.getBridgeMaterial())}); - } - - if (!werkstoff.hasItemType(plate)) - return; - - //Disable recipe gen with handle Material for GT Materials - if (!werkstoff.getGenerationFeatures().isExtension()) { - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{" fS", " Sh", "W ", 'S', stick.get(werkstoff.getBridgeMaterial()), 'W', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(toolHeadWrench, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"hXW", "XRX", "WXd", 'X', plate.get(werkstoff.getBridgeMaterial()), 'S', plate.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'R', ring.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'W', screw.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HARDHAMMER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{toolHeadHammer.get(werkstoff.getBridgeMaterial()), stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.FILE, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P", "P", "S", 'P', plate.get(werkstoff.getBridgeMaterial()), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); - GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SAW, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), new Object[]{toolHeadSaw.get(werkstoff.getBridgeMaterial()), stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV, 1, werkstoff.getBridgeMaterial(), Materials.Rubber, new long[]{100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', bolt.get(werkstoff.getBridgeMaterial()), 'P', plate.get(Materials.AnyRubber), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'L', ItemList.Battery_RE_LV_Lithium.get(1L)}); - - if (gtnhGT) { - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(162, 1, werkstoff.getBridgeMaterial(), Materials.Rubber, new long[]{400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', bolt.get(werkstoff.getBridgeMaterial()), 'P', plate.get(Materials.AnyRubber), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'L', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(164, 1, werkstoff.getBridgeMaterial(), Materials.StyreneButadieneRubber, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', bolt.get(werkstoff.getBridgeMaterial()), 'P', plate.get(Materials.StyreneButadieneRubber), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'L', ItemList.Battery_RE_HV_Lithium.get(1L)}); - } - - if (!werkstoff.hasItemType(gem)) { - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HARDHAMMER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"XX ", "XXS", "XX ", 'X', ingot.get(werkstoff.getBridgeMaterial()), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); - } - } - - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PLUNGER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"xRR", " SR", "S f", 'S', stick.get(werkstoff.getBridgeMaterial()), 'R', plate.get(Materials.AnyRubber)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IhI", "III", " I ", 'I', ingot.get(werkstoff.getBridgeMaterial())}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.CROWBAR, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"hDS", "DSD", "SDf", 'S', stick.get(werkstoff.getBridgeMaterial()), 'D', Dyes.dyeBlue}); - - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WIRECUTTER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PfP", "hPd", "STS", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P', plate.get(werkstoff.getBridgeMaterial()), 'T', screw.get(werkstoff.getBridgeMaterial())}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCOOP, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SWS", "SSS", "xSh", 'S', stick.get(werkstoff.getBridgeMaterial()), 'W', new ItemStack(Blocks.wool, 1, 32767)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.BRANCHCUTTER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PfP", "PdP", "STS", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P', plate.get(werkstoff.getBridgeMaterial()), 'T', screw.get(werkstoff.getBridgeMaterial())}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.KNIFE, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"fPh", " S ", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P', plate.get(werkstoff.getBridgeMaterial())}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.BUTCHERYKNIFE, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPf", "PP ", "Sh ", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P', plate.get(werkstoff.getBridgeMaterial())}); - - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{75000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{300000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{200000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); - - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{75000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)}); - - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(toolHeadHammer, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"II ", "IIh", "II ", 'P', plate.get(werkstoff.getBridgeMaterial()), 'I', ingot.get(werkstoff.getBridgeMaterial())}); - - if (!werkstoff.hasItemType(gem)) { - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(toolHeadSaw, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"PP ", "fh ", 'P', plate.get(werkstoff.getBridgeMaterial()), 'I', ingot.get(werkstoff.getBridgeMaterial())}); - } - - if (gtnhGT) { - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(152, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(152, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{300000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(152, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{200000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(154, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(154, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); - GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(154, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); - } - - // GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(16,1, werkstoff.getBridgeMaterial(),werkstoff.getBridgeMaterial(),null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IhI", "III", " I ", 'I', werkstoff.get(ingot)}); - } - public static void removeIC2Recipes() { try { Set> remset = new HashSet<>(); @@ -2018,7 +1832,6 @@ public class WerkstoffLoader { } private static void runAdditionalOreDict() { - for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { if (werkstoff.hasItemType(ore)) { GT_OreDictUnificator.registerOre(ore + werkstoff.getVarName(), werkstoff.get(ore)); @@ -2044,666 +1857,4 @@ public class WerkstoffLoader { GT_OreDictUnificator.registerOre("craftingIndustrialDiamond", WerkstoffLoader.CubicZirconia.get(gemExquisite)); } - - private static void addCasingRecipes(Werkstoff werkstoff) { - if (!(werkstoff.hasItemType(blockCasing) && werkstoff.hasItemType(plate) && werkstoff.hasItemType(screw) && werkstoff.hasItemType(gearGt) )) - return; - - GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasing),new Object[]{ - "PSP", - "PGP", - "PSP", - 'P', werkstoff.get(plate), - 'S', werkstoff.get(screw), - 'G', werkstoff.get(gearGtSmall) - }); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - werkstoff.get(plate,6), - werkstoff.get(screw,2), - werkstoff.get(gearGtSmall) - }, GT_Values.NF,werkstoff.get(blockCasing), 200, 30); - - GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasingAdvanced),new Object[]{ - "PSP", - "PGP", - "PSP", - 'P', werkstoff.get(plateDouble), - 'S', werkstoff.get(screw), - 'G', werkstoff.get(gearGt) - }); - GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - werkstoff.get(plateDouble,6), - werkstoff.get(screw,2), - werkstoff.get(gearGt) - }, GT_Values.NF,werkstoff.get(blockCasingAdvanced), 200, 30); - } - - private static void addGemRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(gem)) { - if (werkstoff.getGenerationFeatures().hasSifterRecipes() || (werkstoff.hasItemType(ore) && werkstoff.hasItemType(dust))) { - - GT_ModHandler.addCompressionRecipe(werkstoff.get(gem, 9), werkstoff.get(block)); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(block), werkstoff.get(gem, 9), 100, 24); - GT_Values.RA.addSifterRecipe( - werkstoff.get(crushedPurified), - new ItemStack[]{ - werkstoff.get(gemExquisite), - werkstoff.get(gemFlawless), - werkstoff.get(gem), - werkstoff.get(gemFlawed), - werkstoff.get(gemChipped), - werkstoff.get(dust) - }, - new int[]{ - 200, 1000, 2500, 2000, 4000, 5000 - }, - 800, - 16 - ); - } - - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemExquisite), werkstoff.get(dust, 4)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemFlawless), werkstoff.get(dust, 2)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gem), werkstoff.get(dust)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemFlawed), werkstoff.get(dustSmall, 2)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemChipped), werkstoff.get(dustSmall)); - - GT_ModHandler.addCraftingRecipe(werkstoff.get(gemFlawless, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gemExquisite)}); - GT_ModHandler.addCraftingRecipe(werkstoff.get(gem, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gemFlawless)}); - GT_ModHandler.addCraftingRecipe(werkstoff.get(gemFlawed, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gem)}); - GT_ModHandler.addCraftingRecipe(werkstoff.get(gemChipped, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gemFlawed)}); - - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemExquisite), werkstoff.get(gemFlawless, 2), 64, 16); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawless), werkstoff.get(gem, 2), 64, 16); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gem), werkstoff.get(gemFlawed, 2), 64, 16); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawed), werkstoff.get(gemChipped, 2), 64, 16); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemChipped), werkstoff.get(dustTiny), 64, 16); - - if (!werkstoff.contains(WerkstoffLoader.NO_BLAST)) { - GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawless, 3), 8, werkstoff.get(gemExquisite), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gem, 3), 8, werkstoff.get(gemFlawless), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawed, 3), 8, werkstoff.get(gem), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gemChipped, 3), 8, werkstoff.get(gemFlawed), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - - GT_Values.RA.addImplosionRecipe(werkstoff.get(dust, 4), 24, werkstoff.get(gem, 3), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 8)); - } - - if (werkstoff.hasItemType(plate)) { - GT_Values.RA.addLatheRecipe(werkstoff.get(plate), werkstoff.get(lens), werkstoff.get(dustSmall), 1200, 120); - } - - GT_Values.RA.addLatheRecipe(werkstoff.get(gemExquisite), werkstoff.get(lens), werkstoff.get(dust, 2), 2400, 30); - GregTech_API.registerCover(werkstoff.get(lens), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LENS, werkstoff.getRGBA(), false)), new gregtech.common.covers.GT_Cover_Lens(BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mIndex)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(lens), werkstoff.get(dustSmall, 3)); - - for (ItemStack is : OreDictionary.getOres("craftingLens" + BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mName.replace(" ", ""))) { - is.stackSize = 0; - GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemChipped, 3), is, werkstoff.get(gemFlawed, 1), 600, 30); - GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemFlawed, 3), is, werkstoff.get(gem, 1), 600, 120); - GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gem, 3), is, werkstoff.get(gemFlawless, 1), 1200, 480); - GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemFlawless, 3), is, werkstoff.get(gemExquisite, 1), 2400, 2000); - } - } - } - - private static void addSimpleMetalRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(plate)) { - if (werkstoff.hasItemType(gem)) { - GT_Values.RA.addLatheRecipe(werkstoff.get(gem), werkstoff.get(stick), werkstoff.get(dustSmall, 2), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1L), 16); - GT_ModHandler.addCraftingRecipe(werkstoff.get(stick, 2), GT_Proxy.tBits, new Object[]{"s", "X", 'X', werkstoff.get(stickLong)}); - GT_ModHandler.addCraftingRecipe(werkstoff.get(stick), GT_Proxy.tBits, new Object[]{"f ", " X", 'X', werkstoff.get(gem)}); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(stick, 2), werkstoff.get(stickLong), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); - - TextureSet texSet = werkstoff.getTexSet(); - GT_RenderedTexture texture = SideReference.Side.Client ? - new GT_RenderedTexture(texSet.mTextures[PrefixTextureLinker.blockTexMap.getOrDefault(texSet, block.mTextureIndex)], werkstoff.getRGBA(), false) : - new GT_RenderedTexture(texSet.mTextures[block.mTextureIndex], werkstoff.getRGBA(), false); - GregTech_API.registerCover(werkstoff.get(plate),texture,null); - - GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); - return; - } - - GT_ModHandler.addCraftingRecipe(werkstoff.get(stick, 2), GT_Proxy.tBits, new Object[]{"s", "X", 'X', werkstoff.get(stickLong)}); - GT_ModHandler.addCraftingRecipe(werkstoff.get(stick), GT_Proxy.tBits, new Object[]{"f ", " X", 'X', werkstoff.get(ingot)}); - GT_ModHandler.addCraftingRecipe(werkstoff.get(plate), GT_Proxy.tBits, new Object[]{"h", "X", "X", 'X', werkstoff.get(ingot)}); - - GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{werkstoff.get(ingot), GT_Utility.getIntegratedCircuit(1)}, new ItemStack[]{werkstoff.get(plate)}, null, null, null, null, (int) Math.max(werkstoff.getStats().getMass(), 1L), 24, 0)); - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(ingot, 3), werkstoff.get(plate, 2), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); - GregTech_API.registerCover(werkstoff.get(plate), new GT_RenderedTexture(werkstoff.getTexSet().mTextures[71], werkstoff.getRGBA(), false), null); - - GT_Values.RA.addLatheRecipe(werkstoff.get(ingot), werkstoff.get(stick), werkstoff.get(dustSmall, 2), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1L), 16); - - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(stick, 2), werkstoff.get(stickLong), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); - - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Plate.get(0), werkstoff.get(plate), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 45); - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Rod.get(0), werkstoff.get(stick, 2), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 45); - - GT_Values.RA.addPulveriserRecipe(werkstoff.get(ingot), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(stickLong), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(stick), new ItemStack[]{werkstoff.get(dustSmall, 2)}, null, 2, 8); - } - } - - private static void addCraftingMetalRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(screw)) { - int tVoltageMultiplier = werkstoff.getStats().meltingPoint >= 2800 ? 60 : 15; - - //bolt - GT_Values.RA.addExtruderRecipe(werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(ingot), ItemList.Shape_Extruder_Bolt.get(0L), werkstoff.get(bolt, 8), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 8 * tVoltageMultiplier); - GT_Values.RA.addCutterRecipe(werkstoff.get(stick), werkstoff.get(bolt, 4), null, (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 4); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(bolt), new ItemStack[]{werkstoff.get(dustTiny, 1)}, null, 2, 8); - - //screw - GT_Values.RA.addLatheRecipe(werkstoff.get(bolt), werkstoff.get(screw), null, (int) Math.max(werkstoff.getStats().getMass() / 8L, 1L), 4); - GT_ModHandler.addCraftingRecipe(werkstoff.get(screw), GT_Proxy.tBits, new Object[]{"fX", "X ", 'X', werkstoff.get(bolt)}); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(screw), new ItemStack[]{werkstoff.get(dustTiny, 1)}, null, 2, 8); - - if (werkstoff.hasItemType(gem)) - return; - - //ring - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Ring.get(0L), werkstoff.get(ring, 4), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 6 * tVoltageMultiplier); - GT_ModHandler.addCraftingRecipe(werkstoff.get(ring), GT_Proxy.tBits, new Object[]{"h ", "fX", 'X', werkstoff.get(stick)}); - - //Gear - GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGt), GT_Proxy.tBits, new Object[]{"SPS", "PwP", "SPS", 'P', werkstoff.get(plate), 'S', werkstoff.get(stick)}); - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 4), ItemList.Shape_Extruder_Gear.get(0L), werkstoff.get(gearGt), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1), 8 * tVoltageMultiplier); - - //wireFine - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Wire.get(0L), werkstoff.get(wireFine, 8), (int) Math.max(werkstoff.getStats().getMass() * 1.5F, 1F), 8 * tVoltageMultiplier); - GT_Values.RA.addWiremillRecipe(werkstoff.get(ingot), werkstoff.get(wireFine, 8), (int) Math.max(werkstoff.getStats().getMass(), 1), 8 * tVoltageMultiplier); - GT_Values.RA.addWiremillRecipe(werkstoff.get(stick), werkstoff.get(wireFine, 4), (int) Math.max(werkstoff.getStats().getMass() * 0.5F, 1F), 8 * tVoltageMultiplier); - - //smallGear - if (WerkstoffLoader.smallGearShape != null) - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), WerkstoffLoader.smallGearShape.get(0L), werkstoff.get(gearGtSmall), (int) werkstoff.getStats().mass, 8 * tVoltageMultiplier); - if (ConfigHandler.hardmode) - GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[]{" S ", "hPx", " S ", 'S', werkstoff.get(stick), 'P', werkstoff.get(plate)}); - else - GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[]{"P ", " h ", 'P', werkstoff.get(plate)}); - - //Rotor - GT_ModHandler.addCraftingRecipe(werkstoff.get(rotor), GT_Proxy.tBits, new Object[]{"PhP", "SRf", "PdP", 'P', werkstoff.get(plate), 'R', werkstoff.get(ring), 'S', werkstoff.get(screw)}); - GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.Tin.getMolten(32), werkstoff.get(rotor), 240, 24); - GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.Lead.getMolten(48), werkstoff.get(rotor), 240, 24); - GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.SolderingAlloy.getMolten(16), werkstoff.get(rotor), 240, 24); - - if (WerkstoffLoader.rotorShape != null) - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 5), WerkstoffLoader.rotorShape.get(0L), werkstoff.get(rotor), 200, 60); - - //molten -> metal - if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0L), werkstoff.getMolten(576), werkstoff.get(gearGt), 128, 8); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear_Small.get(0L), werkstoff.getMolten(144), werkstoff.get(gearGtSmall), 16, 8); - if (WerkstoffLoader.ringMold != null) - GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.ringMold.get(0L), werkstoff.getMolten(36), werkstoff.get(ring), 100, 4 * tVoltageMultiplier); - if (WerkstoffLoader.boltMold != null) - GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.boltMold.get(0L), werkstoff.getMolten(18), werkstoff.get(bolt), 50, 2 * tVoltageMultiplier); - - if (WerkstoffLoader.rotorMold != null) - GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.rotorMold.get(0L), werkstoff.getMolten(612), werkstoff.get(rotor), 100, 60); - } - - GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGt), new ItemStack[]{werkstoff.get(dust, 4)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGtSmall), new ItemStack[]{werkstoff.get(dust, 1)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(rotor), new ItemStack[]{werkstoff.get(dust, 4), werkstoff.get(dustSmall)}, null, 2, 8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(ring), new ItemStack[]{werkstoff.get(dustSmall, 1)}, null, 2, 8); - } - } - - private static void addBlockRecipes(Werkstoff werkstoff) { - if (!werkstoff.hasItemType(block)) - return; - if (werkstoff.hasItemType(ingot)) { - GT_Values.RA.addArcFurnaceRecipe(werkstoff.get(block), new ItemStack[]{werkstoff.get(ingot, 9)}, null, 16, 90, false); - } - if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(block), null, werkstoff.getMolten(1296), 0, 288, 8); - } - if (werkstoff.hasItemType(plate)) { - GT_Values.RA.addCutterRecipe(werkstoff.get(block), werkstoff.get(plate, 9), null, (int) Math.max(werkstoff.getStats().getMass() * 10L, 1L), 30); - } - } - - private static void addMetalRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(ingot)) { - GT_ModHandler.addCompressionRecipe(werkstoff.get(ingot, 9), werkstoff.get(block)); - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 9), ItemList.Shape_Extruder_Block.get(0), werkstoff.get(block), (int) werkstoff.getStats().mass, 8 * werkstoff.getStats().getMeltingPoint() >= 2800 ? 60 : 15); - GT_Values.RA.addAlloySmelterRecipe(werkstoff.get(ingot, 9), ItemList.Shape_Mold_Block.get(0L), werkstoff.get(block), (int) (werkstoff.getStats().mass / 2), 4 * werkstoff.getStats().getMeltingPoint() >= 2800 ? 60 : 15); - } - } - - private static void addMultipleMetalRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(plateDense)) { - GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{werkstoff.get(ingot, 2), GT_Utility.getIntegratedCircuit(2)}, new ItemStack[]{werkstoff.get(plateDouble)}, null, null, null, null, (int) Math.max(werkstoff.getStats().getMass() * 2, 1L), 60, 0)); - GregTech_API.registerCover(werkstoff.get(plateDouble), new GT_RenderedTexture(werkstoff.getTexSet().mTextures[72], werkstoff.getRGBA(), false), null); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(plateDouble), new ItemStack[]{werkstoff.get(dust, 2)}, null, 2, 8); - } - } - - private static void addDustRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(dust)) { - List flOutputs = new ArrayList<>(); - List stOutputs = new ArrayList<>(); - HashMap> tracker = new HashMap<>(); - int cells = 0; - - if (werkstoff.getGenerationFeatures().hasMixerRecipes() || werkstoff.getStats().isElektrolysis() || werkstoff.getStats().isCentrifuge() || werkstoff.getGenerationFeatures().hasChemicalRecipes()) { - for (Pair container : werkstoff.getContents().getValue().toArray(new Pair[0])) { - if (container.getKey() instanceof Materials) { - if (((Materials) container.getKey()).getGas(0) != null || ((Materials) container.getKey()).getFluid(0) != null || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID) { - FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000 * container.getValue()); - if (tmpFl == null || tmpFl.getFluid() == null) { - tmpFl = ((Materials) container.getKey()).getFluid(1000 * container.getValue()); - } - flOutputs.add(tmpFl); - if (flOutputs.size() > 1) { - if (!tracker.containsKey(container.getKey())) { - stOutputs.add(((Materials) container.getKey()).getCells(container.getValue())); - tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); - } else { - stOutputs.add(((Materials) container.getKey()).getCells(tracker.get(container.getKey()).getKey() + container.getValue())); - stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); - } - cells += container.getValue(); - } - } else { - if (((Materials) container.getKey()).getDust(container.getValue()) == null) { - if (((Materials) container.getKey()).getCells(container.getValue()) != null && (((Materials) container.getKey()).getMolten(0) != null || ((Materials) container.getKey()).getSolid(0) != null)) { - FluidStack tmpFl = ((Materials) container.getKey()).getMolten(1000 * container.getValue()); - if (tmpFl == null || tmpFl.getFluid() == null) { - tmpFl = ((Materials) container.getKey()).getSolid(1000 * container.getValue()); - } - flOutputs.add(tmpFl); - if (flOutputs.size() > 1) { - if (!tracker.containsKey(container.getKey())) { - stOutputs.add(((Materials) container.getKey()).getCells(container.getValue())); - tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); - } else { - stOutputs.add(((Materials) container.getKey()).getCells(tracker.get(container.getKey()).getKey() + container.getValue())); - stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); - } - cells += container.getValue(); - } - } else - continue; - } - if (!tracker.containsKey(container.getKey())) { - stOutputs.add(((Materials) container.getKey()).getDust(container.getValue())); - tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); - } else { - stOutputs.add(((Materials) container.getKey()).getDust(tracker.get(container.getKey()).getKey() + container.getValue())); - stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); - } - } - } else if (container.getKey() instanceof Werkstoff) { - if (((Werkstoff) container.getKey()).getStats().isGas() || ((Werkstoff) container.getKey()).hasItemType(cell)) { - FluidStack tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue()); - if (tmpFl == null || tmpFl.getFluid() == null) { - tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue()); - } - flOutputs.add(tmpFl); - if (flOutputs.size() > 1) { - if (!tracker.containsKey(container.getKey())) { - stOutputs.add(((Werkstoff) container.getKey()).get(cell, container.getValue())); - tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); - } else { - stOutputs.add(((Werkstoff) container.getKey()).get(cell, tracker.get(container.getKey()).getKey() + container.getValue())); - stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); - } - cells += container.getValue(); - } - } else { - if (!((Werkstoff) container.getKey()).hasItemType(dust)) - continue; - if (!tracker.containsKey(container.getKey())) { - stOutputs.add(((Werkstoff) container.getKey()).get(dust, container.getValue())); - tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); - } else { - stOutputs.add(((Werkstoff) container.getKey()).get(dust, (tracker.get(container.getKey()).getKey() + container.getValue()))); - stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); - } - } - } - } - ItemStack input = werkstoff.get(dust); - input.stackSize = werkstoff.getContents().getKey(); - if (werkstoff.getStats().isElektrolysis()) - GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().protons / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); - if (werkstoff.getStats().isCentrifuge()) - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().mass / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); - if (werkstoff.getGenerationFeatures().hasChemicalRecipes()) { - if (cells > 0) - stOutputs.add(Materials.Empty.getCells(cells)); - GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().protons / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); - GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().protons / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0); - } - if (werkstoff.getGenerationFeatures().hasMixerRecipes()) { - if (cells > 0) - stOutputs.add(Materials.Empty.getCells(cells)); - GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().mass / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); - } - } - - GT_ModHandler.addCraftingRecipe(werkstoff.get(dust), new Object[]{ - "TTT", "TTT", "TTT", 'T', - werkstoff.get(dustTiny) - }); - GT_ModHandler.addCraftingRecipe(werkstoff.get(dust), new Object[]{ - "TT ", "TT ", 'T', - WerkstoffLoader.getCorrespondingItemStack(dustSmall, werkstoff) - }); - GT_ModHandler.addCraftingRecipe(WerkstoffLoader.getCorrespondingItemStack(dustSmall, werkstoff, 4), new Object[]{ - " T ", 'T', werkstoff.get(dust) - }); - GT_ModHandler.addCraftingRecipe(WerkstoffLoader.getCorrespondingItemStack(dustTiny, werkstoff, 9), new Object[]{ - "T ", 'T', werkstoff.get(dust) - }); - - GT_Values.RA.addBoxingRecipe(werkstoff.get(dustTiny, 9), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4); - GT_Values.RA.addBoxingRecipe(werkstoff.get(dustSmall, 4), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4); - GT_Values.RA.addBoxingRecipe(werkstoff.get(dustTiny, 9), ItemList.Schematic_3by3.get(0L), werkstoff.get(dust), 100, 4); - GT_Values.RA.addBoxingRecipe(werkstoff.get(dustSmall, 4), ItemList.Schematic_2by2.get(0L), werkstoff.get(dust), 100, 4); - - if (werkstoff.hasItemType(ingot) && !werkstoff.getStats().isBlastFurnace()) { - GT_ModHandler.addSmeltingRecipe(werkstoff.get(dust), werkstoff.get(ingot)); - GT_ModHandler.addSmeltingRecipe(werkstoff.get(dustTiny), werkstoff.get(nugget)); - } else if (werkstoff.hasItemType(ingot) && werkstoff.getStats().isBlastFurnace() && werkstoff.getStats().meltingPoint != 0) { - if (werkstoff.contains(WerkstoffLoader.ANAEROBE_SMELTING)) { - GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11), Materials.Nitrogen.getGas(1000), null, werkstoff.getStats().meltingPoint < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().meltingPoint, 120, werkstoff.getStats().getMeltingPoint()); - } else if (werkstoff.contains(WerkstoffLoader.NOBLE_GAS_SMELTING)) { - GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11), Materials.Argon.getGas(1000), null, werkstoff.getStats().meltingPoint < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().meltingPoint, 120, werkstoff.getStats().getMeltingPoint()); - } else { - GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(1), null, null, werkstoff.getStats().meltingPoint < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().meltingPoint, 120, werkstoff.getStats().getMeltingPoint()); - if (werkstoff.getStats().meltingPoint <= 1000) { - GT_Values.RA.addPrimitiveBlastRecipe(werkstoff.get(dust), null, 9, werkstoff.get(ingot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().meltingPoint); - GT_ModHandler.addRCBlastFurnaceRecipe(werkstoff.get(ingot), werkstoff.get(dust), werkstoff.getStats().meltingPoint); - } - } - } - - if (werkstoff.getStats().isBlastFurnace() && werkstoff.getStats().meltingPoint > 1750) { - GT_Values.RA.addVacuumFreezerRecipe(werkstoff.get(ingotHot), werkstoff.get(ingot), (int) Math.max(werkstoff.getStats().mass * 3L, 1L)); - } - - if (werkstoff.hasItemType(ingot)) { - GT_ModHandler.addPulverisationRecipe(werkstoff.get(ingot), werkstoff.get(dust)); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(nugget), werkstoff.get(dustTiny)); - } - if (werkstoff.hasItemType(ingot) || werkstoff.hasItemType(gem)) { - GT_ModHandler.addPulverisationRecipe(werkstoff.get(block), werkstoff.get(dust, 9)); - } - } - } - - private static void addOreRecipes(Werkstoff werkstoff) { - if (werkstoff.hasItemType(ore) && werkstoff.hasItemType(ingot) && !werkstoff.getStats().isBlastFurnace()) - GT_ModHandler.addSmeltingRecipe(WerkstoffLoader.getCorrespondingItemStack(ore, werkstoff), werkstoff.get(ingot)); - - if (werkstoff.hasItemType(ore)) { - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(ore), werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(crushed), 16, 10); - GT_ModHandler.addPulverisationRecipe( - werkstoff.get(ore), - werkstoff.get(crushed, 2), - werkstoff.contains(SubTag.CRYSTAL) ? werkstoff.get(gem) : werkstoff.getOreByProduct(0, dust), - werkstoff.getNoOfByProducts() > 0 ? 10 : 0, - Materials.Stone.getDust(1), - 50, - true); - } - } - - private static void addCrushedRecipes(Werkstoff werkstoff) { - if ((werkstoff.getGenerationFeatures().toGenerate & 0b1000) == 0 || (werkstoff.getGenerationFeatures().toGenerate & 0b1) == 0) - return; - - if (werkstoff.hasItemType(ingot) && !werkstoff.getStats().isBlastFurnace()) { - if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { - GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushed), werkstoff.get(nugget, 10)); - GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedPurified), werkstoff.get(nugget, 10)); - GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(nugget, 10)); - } else { - GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushed), werkstoff.get(ingot)); - GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedPurified), werkstoff.get(ingot)); - GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(ingot)); - } - GT_ModHandler.addSmeltingRecipe(werkstoff.get(dustImpure), werkstoff.get(ingot)); - GT_ModHandler.addSmeltingRecipe(werkstoff.get(dustPure), werkstoff.get(ingot)); - GT_ModHandler.addSmeltingRecipe(werkstoff.get(dust), werkstoff.get(ingot)); - } - - GT_ModHandler.addCraftingRecipe(werkstoff.get(dustImpure), new Object[]{"h ", "W ", 'W', werkstoff.get(crushed)}); - GT_ModHandler.addCraftingRecipe(werkstoff.get(dustPure), new Object[]{"h ", "W ", 'W', werkstoff.get(crushedPurified)}); - GT_ModHandler.addCraftingRecipe(werkstoff.get(dust), new Object[]{"h ", "W ", 'W', werkstoff.get(crushedCentrifuged)}); - - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushed), werkstoff.get(dustImpure), 10, 16); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushed), werkstoff.get(dustImpure), werkstoff.getOreByProduct(0, dust), 10, false); - GT_ModHandler.addOreWasherRecipe(werkstoff.get(crushed), 1000, werkstoff.get(crushedPurified), werkstoff.getOreByProduct(0, dustTiny), GT_OreDictUnificator.get(dust, Materials.Stone, 1L)); - GT_ModHandler.addThermalCentrifugeRecipe(werkstoff.get(crushed), (int) Math.min(5000L, Math.abs(werkstoff.getStats().protons * 20L)), werkstoff.get(crushedCentrifuged), werkstoff.getOreByProduct(1, dustTiny), GT_OreDictUnificator.get(dust, Materials.Stone, 1L)); - - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedPurified), werkstoff.get(dustPure), 10, 16); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushedPurified), werkstoff.get(dustPure), werkstoff.getOreByProduct(1, dust), 10, false); - GT_ModHandler.addThermalCentrifugeRecipe(werkstoff.get(crushedPurified), (int) Math.min(5000L, Math.abs(werkstoff.getStats().protons * 20L)), werkstoff.get(crushedCentrifuged), werkstoff.getOreByProduct(1, dustTiny)); - - GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(dust), 10, 16); - GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(dust), werkstoff.getOreByProduct(2, dust), 10, false); - - GT_Values.RA.addCentrifugeRecipe(werkstoff.get(dustImpure), 0, werkstoff.get(dust), werkstoff.getOreByProduct(0, dustTiny), null, null, null, null, (int) Math.max(1L, werkstoff.getStats().mass * 8L)); - GT_Values.RA.addCentrifugeRecipe(werkstoff.get(dustPure), 0, werkstoff.get(dust), werkstoff.getOreByProduct(1, dustTiny), null, null, null, null, (int) Math.max(1L, werkstoff.getStats().mass * 8L)); - - if (werkstoff.contains(SubTag.CRYSTALLISABLE)) { - GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustPure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24); - GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustImpure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24); - GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustPure), gregtech.api.util.GT_ModHandler.getDistilledWater(200L), werkstoff.get(gem), 9500, 1500, 24); - GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustImpure), gregtech.api.util.GT_ModHandler.getDistilledWater(200L), werkstoff.get(gem), 9500, 1500, 24); - } - if (werkstoff.contains(SubTag.WASHING_MERCURY)) - GT_Values.RA.addChemicalBathRecipe(werkstoff.get(crushed), Materials.Mercury.getFluid(1000L), werkstoff.get(crushedPurified), werkstoff.getOreByProduct(1, dust), GT_OreDictUnificator.get(dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); - if (werkstoff.contains(SubTag.WASHING_SODIUMPERSULFATE)) - GT_Values.RA.addChemicalBathRecipe(werkstoff.get(crushed), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), werkstoff.get(crushedPurified), werkstoff.getOreByProduct(1, dust), GT_OreDictUnificator.get(dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); - if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD)) - GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Gold, 1L), GT_OreDictUnificator.get(nugget, Materials.Gold, 1L), new int[]{10000, 4000, 2000}, 400, 24); - else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_IRON)) - GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Iron, 1L), GT_OreDictUnificator.get(nugget, Materials.Iron, 1L), new int[]{10000, 4000, 2000}, 400, 24); - else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM)) - GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Neodymium, 1L), GT_OreDictUnificator.get(nugget, Materials.Neodymium, 1L), new int[]{10000, 4000, 2000}, 400, 24); - } - - private static void addCellRecipes(Werkstoff werkstoff) { - if ((werkstoff.getGenerationFeatures().toGenerate & 0b10000) == 0) - return; - -// if (werkstoff.getStats().isElektrolysis() || werkstoff.getStats().isCentrifuge() || werkstoff.getGenerationFeatures().hasChemicalRecipes()) { -// List flOutputs = new ArrayList<>(); -// List stOutputs = new ArrayList<>(); -// HashMap> tracker = new HashMap<>(); -// int cells = 0; -// for (Pair container : werkstoff.getContents().getValue().toArray(new Pair[0])) { -// if (container.getKey() instanceof Materials) { -// if (((Materials) container.getKey()).hasCorrespondingGas() || ((Materials) container.getKey()).hasCorrespondingFluid() || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID) { -// FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000 * container.getValue()); -// if (tmpFl == null || tmpFl.getFluid() == null) { -// tmpFl = ((Materials) container.getKey()).getFluid(1000 * container.getValue()); -// } -// flOutputs.add(tmpFl); -// if (flOutputs.size() > 1) { -// if (!tracker.containsKey(container.getKey())) { -// stOutputs.add(((Materials) container.getKey()).getCells(container.getValue())); -// tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); -// } else { -// stOutputs.add(((Materials) container.getKey()).getCells(tracker.get(container.getKey()).getKey() + container.getValue())); -// stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); -// } -// cells += container.getValue(); -// } -// } else { -// if (((Materials) container.getKey()).getDust(container.getValue()) == null) -// continue; -// if (!tracker.containsKey(container.getKey())) { -// stOutputs.add(((Materials) container.getKey()).getDust(container.getValue())); -// tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); -// } else { -// stOutputs.add(((Materials) container.getKey()).getDust(tracker.get(container.getKey()).getKey() + container.getValue())); -// stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); -// } -// } -// } else if (container.getKey() instanceof Werkstoff) { -// if (((Werkstoff) container.getKey()).getStats().isGas() || ((Werkstoff) container.getKey()).hasItemType(cell)) { -// FluidStack tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue()); -// if (tmpFl == null || tmpFl.getFluid() == null) { -// tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue()); -// } -// flOutputs.add(tmpFl); -// if (flOutputs.size() > 1) { -// if (!tracker.containsKey(container.getKey())) { -// stOutputs.add(((Werkstoff) container.getKey()).get(cell, container.getValue())); -// tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); -// } else { -// stOutputs.add(((Werkstoff) container.getKey()).get(cell, tracker.get(container.getKey()).getKey() + container.getValue())); -// stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); -// } -// cells += container.getValue(); -// } -// } else { -// if (!((Werkstoff) container.getKey()).hasItemType(dust)) -// continue; -// if (!tracker.containsKey(container.getKey())) { -// stOutputs.add(((Werkstoff) container.getKey()).get(dust, container.getValue())); -// tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); -// } else { -// stOutputs.add(((Werkstoff) container.getKey()).get(dust, (tracker.get(container.getKey()).getKey() + container.getValue()))); -// stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); -// } -// } -// } -// } -// ItemStack input = werkstoff.get(cell); -// input.stackSize = werkstoff.getContents().getKey(); -// cells += werkstoff.getContents().getKey(); -// stOutputs.add(Materials.Empty.getCells(cells)); -// if (werkstoff.getStats().isElektrolysis()) -// GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().protons * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); -// if (werkstoff.getStats().isCentrifuge()) -// GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().mass * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); -// if (werkstoff.getGenerationFeatures().hasChemicalRecipes()) { -// if (cells > 0) -// stOutputs.add(Materials.Empty.getCells(cells)); -// GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]),new ItemStack[]{input},null,null,new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null},null,(int) Math.max(1L, Math.abs(werkstoff.getStats().protons * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30,0)); -// } -// if (werkstoff.getGenerationFeatures().hasMixerRecipes()) { -// if (cells > 0) -// stOutputs.add(Materials.Empty.getCells(cells)); -// GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]),new ItemStack[]{input},null,null,new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null},null,(int) Math.max(1L, Math.abs(werkstoff.getStats().mass * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5,0)); -// } -// } - - //Tank "Recipe" - GT_Utility.addFluidContainerData(new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000), werkstoff.get(cell), Materials.Empty.getCells(1))); - FluidContainerRegistry.registerFluidContainer(werkstoff.getFluidOrGas(1).getFluid(), werkstoff.get(cell), Materials.Empty.getCells(1)); - GT_Values.RA.addFluidCannerRecipe(Materials.Empty.getCells(1), werkstoff.get(cell), new FluidStack(Objects.requireNonNull(fluids.get(werkstoff)), 1000), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(werkstoff.get(cell), Materials.Empty.getCells(1), GT_Values.NF, new FluidStack(Objects.requireNonNull(fluids.get(werkstoff)), 1000)); - - if (LoaderReference.Forestry) { - FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000), werkstoff.get(capsule), GT_ModHandler.getModItem("Forestry", "waxCapsule", 1), true); - GT_Utility.addFluidContainerData(emptyData); - FluidContainerRegistry.registerFluidContainer(emptyData); - GT_Values.RA.addFluidCannerRecipe(werkstoff.get(capsule), GT_Values.NI, GT_Values.NF, new FluidStack(Objects.requireNonNull(fluids.get(werkstoff)), 1000)); - } - - if (werkstoff.hasItemType(dust)) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dust), null, werkstoff.getFluidOrGas(1000), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidSolidifierRecipe(GT_Utility.getIntegratedCircuit(1), werkstoff.getFluidOrGas(1000), werkstoff.get(dust), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - } - - if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { - Materials werkstoffBridgeMaterial = null; - boolean ElementSet = false; - for (Element e : Element.values()) { - if (e.toString().equals(werkstoff.getToolTip())) { - werkstoffBridgeMaterial = new Materials(-1, werkstoff.getTexSet(), 0, 0, 0, false, werkstoff.getDefaultName(), werkstoff.getDefaultName()); - werkstoffBridgeMaterial.mElement = e; - e.mLinkedMaterials.add(werkstoffBridgeMaterial); - ElementSet = true; - break; - } - } - if (!ElementSet) - return; - - GT_OreDictUnificator.addAssociation(cell, werkstoffBridgeMaterial, werkstoff.get(cell), false); -// try { -// Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); -// f.setAccessible(true); -// Map MATERIALS_MAP = (Map) f.get(null); -// MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); -// } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { -// e.printStackTrace(); -// } - ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); - Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); - Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(cell)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); - //GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{Materials.Empty.getCells(1)}, new ItemStack[]{werkstoff.get(cell)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); - } - } - - private static void addMoltenRecipes(Werkstoff werkstoff) { - if (!werkstoff.hasItemType(WerkstoffLoader.cellMolten)) - return; - - //Tank "Recipe" - final FluidContainerRegistry.FluidContainerData data = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), werkstoff.get(WerkstoffLoader.cellMolten), Materials.Empty.getCells(1)); - FluidContainerRegistry.registerFluidContainer(werkstoff.getMolten(144), werkstoff.get(cell), Materials.Empty.getCells(1)); - GT_Utility.addFluidContainerData(data); - GT_Values.RA.addFluidCannerRecipe(Materials.Empty.getCells(1), werkstoff.get(WerkstoffLoader.cellMolten), new FluidStack(Objects.requireNonNull(molten.get(werkstoff)), 144), GT_Values.NF); - GT_Values.RA.addFluidCannerRecipe(werkstoff.get(WerkstoffLoader.cellMolten), Materials.Empty.getCells(1), GT_Values.NF, new FluidStack(Objects.requireNonNull(molten.get(werkstoff)), 144)); - - if (LoaderReference.Forestry) { - final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), werkstoff.get(capsuleMolten), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); - FluidContainerRegistry.registerFluidContainer(werkstoff.getMolten(144), werkstoff.get(capsuleMolten), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); - GT_Utility.addFluidContainerData(emptyData); - GT_Values.RA.addFluidCannerRecipe(werkstoff.get(capsuleMolten), GT_Values.NI, GT_Values.NF, new FluidStack(Objects.requireNonNull(molten.get(werkstoff)), 144)); - } - - if (werkstoff.hasItemType(ingot)) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(ingot), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - if ((werkstoff.getGenerationFeatures().toGenerate & 0b10000000) != 0) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(stickLong), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(plate), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(stick), null, werkstoff.getMolten(72), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - } - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(nugget), null, werkstoff.getMolten(16), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), werkstoff.getMolten(144), werkstoff.get(ingot), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - //GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), werkstoff.getMolten(144), werkstoff.get(block), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0), werkstoff.getMolten(16), werkstoff.get(nugget), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), werkstoff.getMolten(1296), werkstoff.get(block), (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - } else if (werkstoff.hasItemType(dust) && (werkstoff.getGenerationFeatures().toGenerate & 0b10) == 0) { - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dust), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dustSmall), null, werkstoff.getMolten(36), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dustTiny), null, werkstoff.getMolten(16), 0, (int) werkstoff.getStats().mass, werkstoff.getStats().getMass() > 128 ? 64 : 30); - } - } - - public static void addAspectToAll(Werkstoff werkstoff){ - for (OrePrefixes enabledOrePrefixes : WerkstoffLoader.ENABLED_ORE_PREFIXES) { - if (werkstoff.hasItemType(enabledOrePrefixes)) { - if (enabledOrePrefixes.mMaterialAmount >= 3628800L || enabledOrePrefixes == OrePrefixes.ore) { - DebugLog.log("OrePrefix: " + enabledOrePrefixes.name() + " mMaterialAmount: " + enabledOrePrefixes.mMaterialAmount/3628800L); - if (Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes))) - ThaumcraftHandler.AspectAdder.addAspectViaBW( - werkstoff.get(enabledOrePrefixes), - werkstoff.getTCAspects(enabledOrePrefixes == OrePrefixes.ore ? 1 : - (int) (enabledOrePrefixes.mMaterialAmount / 3628800L)) - ); - } - else if (enabledOrePrefixes.mMaterialAmount >= 0L) { - if (Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes))) - ThaumcraftHandler.AspectAdder.addAspectViaBW(werkstoff.get(enabledOrePrefixes), new Pair<>(TC_Aspects.PERDITIO.mAspect, 1)); - } - } - } - } } \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java index 2df54251eb..a162f4ed45 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -34,7 +34,7 @@ import static gregtech.api.enums.OrePrefixes.dustSmall; public class AfterLuVTierEnhacement { - private AfterLuVTierEnhacement(){}; + private AfterLuVTierEnhacement(){} public static void run() { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java new file mode 100644 index 0000000000..ae7f85ed68 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/IWerkstoffRunnable.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; + +public interface IWerkstoffRunnable { + void run(Werkstoff werkstoff); +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java new file mode 100644 index 0000000000..822706fb77 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/AspectLoader.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.API.LoaderReference; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.Pair; +import com.github.bartimaeusnek.bartworks.util.log.DebugLog; +import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.TC_Aspects; + +import java.util.Objects; + +public class AspectLoader implements IWerkstoffRunnable { + + @Override + public void run(Werkstoff werkstoff) { + if (!LoaderReference.Thaumcraft) + return; + for (OrePrefixes enabledOrePrefixes : WerkstoffLoader.ENABLED_ORE_PREFIXES) { + if (werkstoff.hasItemType(enabledOrePrefixes)) { + if (enabledOrePrefixes.mMaterialAmount >= 3628800L || enabledOrePrefixes == OrePrefixes.ore) { + DebugLog.log("OrePrefix: " + enabledOrePrefixes.name() + " mMaterialAmount: " + enabledOrePrefixes.mMaterialAmount / 3628800L); + if (Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes))) + ThaumcraftHandler.AspectAdder.addAspectViaBW( + werkstoff.get(enabledOrePrefixes), + werkstoff.getTCAspects(enabledOrePrefixes == OrePrefixes.ore ? 1 : + (int) (enabledOrePrefixes.mMaterialAmount / 3628800L)) + ); + } else if (enabledOrePrefixes.mMaterialAmount >= 0L) { + if (Objects.nonNull(WerkstoffLoader.items.get(enabledOrePrefixes))) + //noinspection unchecked + ThaumcraftHandler.AspectAdder.addAspectViaBW(werkstoff.get(enabledOrePrefixes), new Pair<>(TC_Aspects.PERDITIO.mAspect, 1)); + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java new file mode 100644 index 0000000000..369423817f --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/BlockLoader.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.OrePrefixes.*; + +public class BlockLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (!werkstoff.hasItemType(block)) + return; + if (werkstoff.hasItemType(ingot)) { + GT_Values.RA.addArcFurnaceRecipe(werkstoff.get(block), new ItemStack[]{werkstoff.get(ingot, 9)}, null, 16, 90, false); + } + if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(block), null, werkstoff.getMolten(1296), 0, 288, 8); + } + if (werkstoff.hasItemType(plate)) { + GT_Values.RA.addCutterRecipe(werkstoff.get(block), werkstoff.get(plate, 9), null, (int) Math.max(werkstoff.getStats().getMass() * 10L, 1L), 30); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java new file mode 100644 index 0000000000..cc1f7650a3 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_ModHandler; +import net.minecraft.item.ItemStack; + +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasing; +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasingAdvanced; +import static gregtech.api.enums.OrePrefixes.*; + +public class CasingLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (!(werkstoff.hasItemType(blockCasing) || werkstoff.hasItemType(plate) || werkstoff.hasItemType(screw) || werkstoff.hasItemType(gearGt) )) + return; + + GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasing),new Object[]{ + "PSP", + "PGP", + "PSP", + 'P', werkstoff.get(plate), + 'S', werkstoff.get(screw), + 'G', werkstoff.get(gearGtSmall) + }); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + werkstoff.get(plate,6), + werkstoff.get(screw,2), + werkstoff.get(gearGtSmall) + }, GT_Values.NF,werkstoff.get(blockCasing), 200, 30); + + GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasingAdvanced),new Object[]{ + "PSP", + "PGP", + "PSP", + 'P', werkstoff.get(plateDouble), + 'S', werkstoff.get(screw), + 'G', werkstoff.get(gearGt) + }); + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ + werkstoff.get(plateDouble,6), + werkstoff.get(screw,2), + werkstoff.get(gearGt) + }, GT_Values.NF,werkstoff.get(blockCasingAdvanced), 200, 30); + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java new file mode 100644 index 0000000000..ab589c3bec --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CellLoader.java @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.API.LoaderReference; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import gregtech.api.enums.Element; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.behaviors.Behaviour_DataOrb; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; + +import java.util.Objects; + +import static gregtech.api.enums.OrePrefixes.*; +import static gregtech.api.enums.OrePrefixes.cell; + +public class CellLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (!werkstoff.hasItemType(cell)) + return; + +// if (werkstoff.getStats().isElektrolysis() || werkstoff.getStats().isCentrifuge() || werkstoff.getGenerationFeatures().hasChemicalRecipes()) { +// List flOutputs = new ArrayList<>(); +// List stOutputs = new ArrayList<>(); +// HashMap> tracker = new HashMap<>(); +// int cells = 0; +// for (Pair container : werkstoff.getContents().getValue().toArray(new Pair[0])) { +// if (container.getKey() instanceof Materials) { +// if (((Materials) container.getKey()).hasCorrespondingGas() || ((Materials) container.getKey()).hasCorrespondingFluid() || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID) { +// FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000 * container.getValue()); +// if (tmpFl == null || tmpFl.getFluid() == null) { +// tmpFl = ((Materials) container.getKey()).getFluid(1000 * container.getValue()); +// } +// flOutputs.add(tmpFl); +// if (flOutputs.size() > 1) { +// if (!tracker.containsKey(container.getKey())) { +// stOutputs.add(((Materials) container.getKey()).getCells(container.getValue())); +// tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); +// } else { +// stOutputs.add(((Materials) container.getKey()).getCells(tracker.get(container.getKey()).getKey() + container.getValue())); +// stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); +// } +// cells += container.getValue(); +// } +// } else { +// if (((Materials) container.getKey()).getDust(container.getValue()) == null) +// continue; +// if (!tracker.containsKey(container.getKey())) { +// stOutputs.add(((Materials) container.getKey()).getDust(container.getValue())); +// tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); +// } else { +// stOutputs.add(((Materials) container.getKey()).getDust(tracker.get(container.getKey()).getKey() + container.getValue())); +// stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); +// } +// } +// } else if (container.getKey() instanceof Werkstoff) { +// if (((Werkstoff) container.getKey()).getStats().isGas() || ((Werkstoff) container.getKey()).hasItemType(cell)) { +// FluidStack tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue()); +// if (tmpFl == null || tmpFl.getFluid() == null) { +// tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue()); +// } +// flOutputs.add(tmpFl); +// if (flOutputs.size() > 1) { +// if (!tracker.containsKey(container.getKey())) { +// stOutputs.add(((Werkstoff) container.getKey()).get(cell, container.getValue())); +// tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); +// } else { +// stOutputs.add(((Werkstoff) container.getKey()).get(cell, tracker.get(container.getKey()).getKey() + container.getValue())); +// stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); +// } +// cells += container.getValue(); +// } +// } else { +// if (!((Werkstoff) container.getKey()).hasItemType(dust)) +// continue; +// if (!tracker.containsKey(container.getKey())) { +// stOutputs.add(((Werkstoff) container.getKey()).get(dust, container.getValue())); +// tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); +// } else { +// stOutputs.add(((Werkstoff) container.getKey()).get(dust, (tracker.get(container.getKey()).getKey() + container.getValue()))); +// stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); +// } +// } +// } +// } +// ItemStack input = werkstoff.get(cell); +// input.stackSize = werkstoff.getContents().getKey(); +// cells += werkstoff.getContents().getKey(); +// stOutputs.add(Materials.Empty.getCells(cells)); +// if (werkstoff.getStats().isElektrolysis()) +// GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); +// if (werkstoff.getStats().isCentrifuge()) +// GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().getMass() * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); +// if (werkstoff.getGenerationFeatures().hasChemicalRecipes()) { +// if (cells > 0) +// stOutputs.add(Materials.Empty.getCells(cells)); +// GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]),new ItemStack[]{input},null,null,new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null},null,(int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30,0)); +// } +// if (werkstoff.getGenerationFeatures().hasMixerRecipes()) { +// if (cells > 0) +// stOutputs.add(Materials.Empty.getCells(cells)); +// GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]),new ItemStack[]{input},null,null,new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null},null,(int) Math.max(1L, Math.abs(werkstoff.getStats().getMass() * werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5,0)); +// } +// } + + //Tank "Recipe" + GT_Utility.addFluidContainerData(new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000), werkstoff.get(cell), Materials.Empty.getCells(1))); + FluidContainerRegistry.registerFluidContainer(werkstoff.getFluidOrGas(1).getFluid(), werkstoff.get(cell), Materials.Empty.getCells(1)); + GT_Values.RA.addFluidCannerRecipe(Materials.Empty.getCells(1), werkstoff.get(cell), new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000), GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe(werkstoff.get(cell), Materials.Empty.getCells(1), GT_Values.NF, new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000)); + + if (LoaderReference.Forestry) { + FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000), werkstoff.get(capsule), GT_ModHandler.getModItem("Forestry", "waxCapsule", 1), true); + GT_Utility.addFluidContainerData(emptyData); + FluidContainerRegistry.registerFluidContainer(emptyData); + GT_Values.RA.addFluidCannerRecipe(werkstoff.get(capsule), GT_Values.NI, GT_Values.NF, new FluidStack(Objects.requireNonNull(WerkstoffLoader.fluids.get(werkstoff)), 1000)); + } + + if (werkstoff.hasItemType(dust)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dust), null, werkstoff.getFluidOrGas(1000), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidSolidifierRecipe(GT_Utility.getIntegratedCircuit(1), werkstoff.getFluidOrGas(1000), werkstoff.get(dust), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + } + + if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { + Materials werkstoffBridgeMaterial = null; + boolean ElementSet = false; + for (Element e : Element.values()) { + if (e.toString().equals(werkstoff.getToolTip())) { + werkstoffBridgeMaterial = new Materials(-1, werkstoff.getTexSet(), 0, 0, 0, false, werkstoff.getDefaultName(), werkstoff.getDefaultName()); + werkstoffBridgeMaterial.mElement = e; + e.mLinkedMaterials.add(werkstoffBridgeMaterial); + ElementSet = true; + break; + } + } + if (!ElementSet) + return; + + GT_OreDictUnificator.addAssociation(cell, werkstoffBridgeMaterial, werkstoff.get(cell), false); +// try { +// Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); +// f.setAccessible(true); +// Map MATERIALS_MAP = (Map) f.get(null); +// MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); +// } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { +// e.printStackTrace(); +// } + ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); + Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); + Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(cell)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); + //GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{Materials.Empty.getCells(1)}, new ItemStack[]{werkstoff.get(cell)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java new file mode 100644 index 0000000000..0302f12a59 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CraftingMaterialLoader.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; +import gregtech.common.GT_Proxy; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.OrePrefixes.*; + +public class CraftingMaterialLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(screw)) { + int tVoltageMultiplier = werkstoff.getStats().getMeltingPoint() >= 2800 ? 60 : 15; + + //bolt + GT_Values.RA.addExtruderRecipe(werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(ingot), ItemList.Shape_Extruder_Bolt.get(0L), werkstoff.get(bolt, 8), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 8 * tVoltageMultiplier); + GT_Values.RA.addCutterRecipe(werkstoff.get(stick), werkstoff.get(bolt, 4), null, (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 4); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(bolt), new ItemStack[]{werkstoff.get(dustTiny, 1)}, null, 2, 8); + + //screw + GT_Values.RA.addLatheRecipe(werkstoff.get(bolt), werkstoff.get(screw), null, (int) Math.max(werkstoff.getStats().getMass() / 8L, 1L), 4); + GT_ModHandler.addCraftingRecipe(werkstoff.get(screw), GT_Proxy.tBits, new Object[]{"fX", "X ", 'X', werkstoff.get(bolt)}); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(screw), new ItemStack[]{werkstoff.get(dustTiny, 1)}, null, 2, 8); + + if (werkstoff.hasItemType(gem)) + return; + + //ring + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Ring.get(0L), werkstoff.get(ring, 4), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 6 * tVoltageMultiplier); + GT_ModHandler.addCraftingRecipe(werkstoff.get(ring), GT_Proxy.tBits, new Object[]{"h ", "fX", 'X', werkstoff.get(stick)}); + + //Gear + GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGt), GT_Proxy.tBits, new Object[]{"SPS", "PwP", "SPS", 'P', werkstoff.get(plate), 'S', werkstoff.get(stick)}); + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 4), ItemList.Shape_Extruder_Gear.get(0L), werkstoff.get(gearGt), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1), 8 * tVoltageMultiplier); + + //wireFine + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Wire.get(0L), werkstoff.get(wireFine, 8), (int) Math.max(werkstoff.getStats().getMass() * 1.5F, 1F), 8 * tVoltageMultiplier); + GT_Values.RA.addWiremillRecipe(werkstoff.get(ingot), werkstoff.get(wireFine, 8), (int) Math.max(werkstoff.getStats().getMass(), 1), 8 * tVoltageMultiplier); + GT_Values.RA.addWiremillRecipe(werkstoff.get(stick), werkstoff.get(wireFine, 4), (int) Math.max(werkstoff.getStats().getMass() * 0.5F, 1F), 8 * tVoltageMultiplier); + + //smallGear + if (WerkstoffLoader.smallGearShape != null) + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), WerkstoffLoader.smallGearShape.get(0L), werkstoff.get(gearGtSmall), (int) werkstoff.getStats().getMass(), 8 * tVoltageMultiplier); + if (ConfigHandler.hardmode) + GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[]{" S ", "hPx", " S ", 'S', werkstoff.get(stick), 'P', werkstoff.get(plate)}); + else + GT_ModHandler.addCraftingRecipe(werkstoff.get(gearGtSmall), GT_Proxy.tBits, new Object[]{"P ", " h ", 'P', werkstoff.get(plate)}); + + //Rotor + GT_ModHandler.addCraftingRecipe(werkstoff.get(rotor), GT_Proxy.tBits, new Object[]{"PhP", "SRf", "PdP", 'P', werkstoff.get(plate), 'R', werkstoff.get(ring), 'S', werkstoff.get(screw)}); + GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.Tin.getMolten(32), werkstoff.get(rotor), 240, 24); + GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.Lead.getMolten(48), werkstoff.get(rotor), 240, 24); + GT_Values.RA.addAssemblerRecipe(werkstoff.get(plate, 4), werkstoff.get(ring), Materials.SolderingAlloy.getMolten(16), werkstoff.get(rotor), 240, 24); + + if (WerkstoffLoader.rotorShape != null) + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 5), WerkstoffLoader.rotorShape.get(0L), werkstoff.get(rotor), 200, 60); + + //molten -> metal + if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0L), werkstoff.getMolten(576), werkstoff.get(gearGt), 128, 8); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear_Small.get(0L), werkstoff.getMolten(144), werkstoff.get(gearGtSmall), 16, 8); + if (WerkstoffLoader.ringMold != null) + GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.ringMold.get(0L), werkstoff.getMolten(36), werkstoff.get(ring), 100, 4 * tVoltageMultiplier); + if (WerkstoffLoader.boltMold != null) + GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.boltMold.get(0L), werkstoff.getMolten(18), werkstoff.get(bolt), 50, 2 * tVoltageMultiplier); + + if (WerkstoffLoader.rotorMold != null) + GT_Values.RA.addFluidSolidifierRecipe(WerkstoffLoader.rotorMold.get(0L), werkstoff.getMolten(612), werkstoff.get(rotor), 100, 60); + } + + GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGt), new ItemStack[]{werkstoff.get(dust, 4)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGtSmall), new ItemStack[]{werkstoff.get(dust, 1)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(rotor), new ItemStack[]{werkstoff.get(dust, 4), werkstoff.get(dustSmall)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(ring), new ItemStack[]{werkstoff.get(dustSmall, 1)}, null, 2, 8); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java new file mode 100644 index 0000000000..e0c44aed4d --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CrushedLoader.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.GT_Mod; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.SubTag; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; + +import static gregtech.api.enums.OrePrefixes.*; + +public class CrushedLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (!werkstoff.hasItemType(ore) || !werkstoff.hasItemType(dust)) + return; + + if (werkstoff.hasItemType(ingot) && !werkstoff.getStats().isBlastFurnace()) { + if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { + GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushed), werkstoff.get(nugget, 10)); + GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedPurified), werkstoff.get(nugget, 10)); + GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(nugget, 10)); + } else { + GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushed), werkstoff.get(ingot)); + GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedPurified), werkstoff.get(ingot)); + GT_ModHandler.addSmeltingRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(ingot)); + } + GT_ModHandler.addSmeltingRecipe(werkstoff.get(dustImpure), werkstoff.get(ingot)); + GT_ModHandler.addSmeltingRecipe(werkstoff.get(dustPure), werkstoff.get(ingot)); + GT_ModHandler.addSmeltingRecipe(werkstoff.get(dust), werkstoff.get(ingot)); + } + + GT_ModHandler.addCraftingRecipe(werkstoff.get(dustImpure), new Object[]{"h ", "W ", 'W', werkstoff.get(crushed)}); + GT_ModHandler.addCraftingRecipe(werkstoff.get(dustPure), new Object[]{"h ", "W ", 'W', werkstoff.get(crushedPurified)}); + GT_ModHandler.addCraftingRecipe(werkstoff.get(dust), new Object[]{"h ", "W ", 'W', werkstoff.get(crushedCentrifuged)}); + + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushed), werkstoff.get(dustImpure), 10, 16); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushed), werkstoff.get(dustImpure), werkstoff.getOreByProduct(0, dust), 10, false); + GT_ModHandler.addOreWasherRecipe(werkstoff.get(crushed), 1000, werkstoff.get(crushedPurified), werkstoff.getOreByProduct(0, dustTiny), GT_OreDictUnificator.get(dust, Materials.Stone, 1L)); + GT_ModHandler.addThermalCentrifugeRecipe(werkstoff.get(crushed), (int) Math.min(5000L, Math.abs(werkstoff.getStats().getProtons() * 20L)), werkstoff.get(crushedCentrifuged), werkstoff.getOreByProduct(1, dustTiny), GT_OreDictUnificator.get(dust, Materials.Stone, 1L)); + + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedPurified), werkstoff.get(dustPure), 10, 16); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushedPurified), werkstoff.get(dustPure), werkstoff.getOreByProduct(1, dust), 10, false); + GT_ModHandler.addThermalCentrifugeRecipe(werkstoff.get(crushedPurified), (int) Math.min(5000L, Math.abs(werkstoff.getStats().getProtons() * 20L)), werkstoff.get(crushedCentrifuged), werkstoff.getOreByProduct(1, dustTiny)); + + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(dust), 10, 16); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(crushedCentrifuged), werkstoff.get(dust), werkstoff.getOreByProduct(2, dust), 10, false); + + GT_Values.RA.addCentrifugeRecipe(werkstoff.get(dustImpure), 0, werkstoff.get(dust), werkstoff.getOreByProduct(0, dustTiny), null, null, null, null, (int) Math.max(1L, werkstoff.getStats().getMass() * 8L)); + GT_Values.RA.addCentrifugeRecipe(werkstoff.get(dustPure), 0, werkstoff.get(dust), werkstoff.getOreByProduct(1, dustTiny), null, null, null, null, (int) Math.max(1L, werkstoff.getStats().getMass() * 8L)); + + if (werkstoff.contains(SubTag.CRYSTALLISABLE)) { + GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustPure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24); + GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustImpure), Materials.Water.getFluid(200L), werkstoff.get(gem), 9000, 2000, 24); + GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustPure), gregtech.api.util.GT_ModHandler.getDistilledWater(200L), werkstoff.get(gem), 9500, 1500, 24); + GT_Values.RA.addAutoclaveRecipe(werkstoff.get(dustImpure), gregtech.api.util.GT_ModHandler.getDistilledWater(200L), werkstoff.get(gem), 9500, 1500, 24); + } + if (werkstoff.contains(SubTag.WASHING_MERCURY)) + GT_Values.RA.addChemicalBathRecipe(werkstoff.get(crushed), Materials.Mercury.getFluid(1000L), werkstoff.get(crushedPurified), werkstoff.getOreByProduct(1, dust), GT_OreDictUnificator.get(dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + if (werkstoff.contains(SubTag.WASHING_SODIUMPERSULFATE)) + GT_Values.RA.addChemicalBathRecipe(werkstoff.get(crushed), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L), werkstoff.get(crushedPurified), werkstoff.getOreByProduct(1, dust), GT_OreDictUnificator.get(dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8); + if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_GOLD)) + GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Gold, 1L), GT_OreDictUnificator.get(nugget, Materials.Gold, 1L), new int[]{10000, 4000, 2000}, 400, 24); + else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_IRON)) + GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Iron, 1L), GT_OreDictUnificator.get(nugget, Materials.Iron, 1L), new int[]{10000, 4000, 2000}, 400, 24); + else if (werkstoff.contains(SubTag.ELECTROMAGNETIC_SEPERATION_NEODYMIUM)) + GT_Values.RA.addElectromagneticSeparatorRecipe(werkstoff.get(dustPure), werkstoff.get(dust), GT_OreDictUnificator.get(dustSmall, Materials.Neodymium, 1L), GT_OreDictUnificator.get(nugget, Materials.Neodymium, 1L), new int[]{10000, 4000, 2000}, 400, 24); + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java new file mode 100644 index 0000000000..8f79fc85bc --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/DustLoader.java @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import com.github.bartimaeusnek.bartworks.util.Pair; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.TextureSet; +import gregtech.api.interfaces.ISubTagContainer; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import static gregtech.api.enums.OrePrefixes.*; + +public class DustLoader implements IWerkstoffRunnable { + + @Override + @SuppressWarnings("unchecked") + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(dust)) { + List flOutputs = new ArrayList<>(); + List stOutputs = new ArrayList<>(); + HashMap> tracker = new HashMap<>(); + int cells = 0; + + if (werkstoff.getGenerationFeatures().hasMixerRecipes() || werkstoff.getStats().isElektrolysis() || werkstoff.getStats().isCentrifuge() || werkstoff.getGenerationFeatures().hasChemicalRecipes()) { + for (Pair container : werkstoff.getContents().getValue().toArray(new Pair[0])) { + if (container.getKey() instanceof Materials) { + if (((Materials) container.getKey()).getGas(0) != null || ((Materials) container.getKey()).getFluid(0) != null || ((Materials) container.getKey()).mIconSet == TextureSet.SET_FLUID) { + FluidStack tmpFl = ((Materials) container.getKey()).getGas(1000 * container.getValue()); + if (tmpFl == null || tmpFl.getFluid() == null) { + tmpFl = ((Materials) container.getKey()).getFluid(1000 * container.getValue()); + } + flOutputs.add(tmpFl); + if (flOutputs.size() > 1) { + if (!tracker.containsKey(container.getKey())) { + stOutputs.add(((Materials) container.getKey()).getCells(container.getValue())); + tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); + } else { + stOutputs.add(((Materials) container.getKey()).getCells(tracker.get(container.getKey()).getKey() + container.getValue())); + stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); + } + cells += container.getValue(); + } + } else { + if (((Materials) container.getKey()).getDust(container.getValue()) == null) { + if (((Materials) container.getKey()).getCells(container.getValue()) != null && (((Materials) container.getKey()).getMolten(0) != null || ((Materials) container.getKey()).getSolid(0) != null)) { + FluidStack tmpFl = ((Materials) container.getKey()).getMolten(1000 * container.getValue()); + if (tmpFl == null || tmpFl.getFluid() == null) { + tmpFl = ((Materials) container.getKey()).getSolid(1000 * container.getValue()); + } + flOutputs.add(tmpFl); + if (flOutputs.size() > 1) { + if (!tracker.containsKey(container.getKey())) { + stOutputs.add(((Materials) container.getKey()).getCells(container.getValue())); + tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); + } else { + stOutputs.add(((Materials) container.getKey()).getCells(tracker.get(container.getKey()).getKey() + container.getValue())); + stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); + } + cells += container.getValue(); + } + } else + continue; + } + if (!tracker.containsKey(container.getKey())) { + stOutputs.add(((Materials) container.getKey()).getDust(container.getValue())); + tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); + } else { + stOutputs.add(((Materials) container.getKey()).getDust(tracker.get(container.getKey()).getKey() + container.getValue())); + stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); + } + } + } else if (container.getKey() instanceof Werkstoff) { + if (((Werkstoff) container.getKey()).getStats().isGas() || ((Werkstoff) container.getKey()).hasItemType(cell)) { + FluidStack tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue()); + if (tmpFl == null || tmpFl.getFluid() == null) { + tmpFl = ((Werkstoff) container.getKey()).getFluidOrGas(1000 * container.getValue()); + } + flOutputs.add(tmpFl); + if (flOutputs.size() > 1) { + if (!tracker.containsKey(container.getKey())) { + stOutputs.add(((Werkstoff) container.getKey()).get(cell, container.getValue())); + tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); + } else { + stOutputs.add(((Werkstoff) container.getKey()).get(cell, tracker.get(container.getKey()).getKey() + container.getValue())); + stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); + } + cells += container.getValue(); + } + } else { + if (!((Werkstoff) container.getKey()).hasItemType(dust)) + continue; + if (!tracker.containsKey(container.getKey())) { + stOutputs.add(((Werkstoff) container.getKey()).get(dust, container.getValue())); + tracker.put(container.getKey(), new Pair<>(container.getValue(), stOutputs.size() - 1)); + } else { + stOutputs.add(((Werkstoff) container.getKey()).get(dust, (tracker.get(container.getKey()).getKey() + container.getValue()))); + stOutputs.remove(tracker.get(container.getKey()).getValue() + 1); + } + } + } + } + ItemStack input = werkstoff.get(dust); + input.stackSize = werkstoff.getContents().getKey(); + if (werkstoff.getStats().isElektrolysis()) + GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); + if (werkstoff.getStats().isCentrifuge()) + GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{input, cells > 0 ? Materials.Empty.getCells(cells) : null}, stOutputs.toArray(new ItemStack[0]), null, null, new FluidStack[]{null}, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, (int) Math.max(1L, Math.abs(werkstoff.getStats().getMass() / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); + if (werkstoff.getGenerationFeatures().hasChemicalRecipes()) { + if (cells > 0) + stOutputs.add(Materials.Empty.getCells(cells)); + GT_Recipe.GT_Recipe_Map.sChemicalRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0)); + GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().getProtons() / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 30, 0); + } + if (werkstoff.getGenerationFeatures().hasMixerRecipes()) { + if (cells > 0) + stOutputs.add(Materials.Empty.getCells(cells)); + GT_Recipe.GT_Recipe_Map.sMixerRecipes.add(new BWRecipes.DynamicGTRecipe(true, stOutputs.toArray(new ItemStack[0]), new ItemStack[]{input}, null, null, new FluidStack[]{flOutputs.size() > 0 ? flOutputs.get(0) : null}, null, (int) Math.max(1L, Math.abs(werkstoff.getStats().getMass() / werkstoff.getContents().getValue().size())), Math.min(4, werkstoff.getContents().getValue().size()) * 5, 0)); + } + } + + GT_ModHandler.addCraftingRecipe(werkstoff.get(dust), new Object[]{ + "TTT", "TTT", "TTT", 'T', + werkstoff.get(dustTiny) + }); + GT_ModHandler.addCraftingRecipe(werkstoff.get(dust), new Object[]{ + "TT ", "TT ", 'T', + WerkstoffLoader.getCorrespondingItemStack(dustSmall, werkstoff) + }); + GT_ModHandler.addCraftingRecipe(WerkstoffLoader.getCorrespondingItemStack(dustSmall, werkstoff, 4), new Object[]{ + " T ", 'T', werkstoff.get(dust) + }); + GT_ModHandler.addCraftingRecipe(WerkstoffLoader.getCorrespondingItemStack(dustTiny, werkstoff, 9), new Object[]{ + "T ", 'T', werkstoff.get(dust) + }); + + GT_Values.RA.addBoxingRecipe(werkstoff.get(dustTiny, 9), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4); + GT_Values.RA.addBoxingRecipe(werkstoff.get(dustSmall, 4), ItemList.Schematic_Dust.get(0L), werkstoff.get(dust), 100, 4); + GT_Values.RA.addBoxingRecipe(werkstoff.get(dustTiny, 9), ItemList.Schematic_3by3.get(0L), werkstoff.get(dust), 100, 4); + GT_Values.RA.addBoxingRecipe(werkstoff.get(dustSmall, 4), ItemList.Schematic_2by2.get(0L), werkstoff.get(dust), 100, 4); + + if (werkstoff.hasItemType(ingot) && !werkstoff.getStats().isBlastFurnace()) { + GT_ModHandler.addSmeltingRecipe(werkstoff.get(dust), werkstoff.get(ingot)); + GT_ModHandler.addSmeltingRecipe(werkstoff.get(dustTiny), werkstoff.get(nugget)); + } else if (werkstoff.hasItemType(ingot) && werkstoff.getStats().isBlastFurnace() && werkstoff.getStats().getMeltingPoint() != 0) { + if (werkstoff.contains(WerkstoffLoader.ANAEROBE_SMELTING)) { + GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11), Materials.Nitrogen.getGas(1000), null, werkstoff.getStats().getMeltingPoint() < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().getMeltingPoint(), 120, werkstoff.getStats().getMeltingPoint()); + } else if (werkstoff.contains(WerkstoffLoader.NOBLE_GAS_SMELTING)) { + GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(11), Materials.Argon.getGas(1000), null, werkstoff.getStats().getMeltingPoint() < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().getMeltingPoint(), 120, werkstoff.getStats().getMeltingPoint()); + } else { + GT_Values.RA.addBlastRecipe(werkstoff.get(dust), GT_Utility.getIntegratedCircuit(1), null, null, werkstoff.getStats().getMeltingPoint() < 1750 ? werkstoff.get(ingot) : werkstoff.get(ingotHot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().getMeltingPoint(), 120, werkstoff.getStats().getMeltingPoint()); + if (werkstoff.getStats().getMeltingPoint() <= 1000) { + GT_Values.RA.addPrimitiveBlastRecipe(werkstoff.get(dust), null, 9, werkstoff.get(ingot), null, (int) Math.max(werkstoff.getStats().getMass() / 40L, 1L) * werkstoff.getStats().getMeltingPoint()); + GT_ModHandler.addRCBlastFurnaceRecipe(werkstoff.get(ingot), werkstoff.get(dust), werkstoff.getStats().getMeltingPoint()); + } + } + } + + if (werkstoff.getStats().isBlastFurnace() && werkstoff.getStats().getMeltingPoint() > 1750) { + GT_Values.RA.addVacuumFreezerRecipe(werkstoff.get(ingotHot), werkstoff.get(ingot), (int) Math.max(werkstoff.getStats().getMass() * 3L, 1L)); + } + + if (werkstoff.hasItemType(ingot)) { + GT_ModHandler.addPulverisationRecipe(werkstoff.get(ingot), werkstoff.get(dust)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(nugget), werkstoff.get(dustTiny)); + } + if (werkstoff.hasItemType(ingot) || werkstoff.hasItemType(gem)) { + GT_ModHandler.addPulverisationRecipe(werkstoff.get(block), werkstoff.get(dust, 9)); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java new file mode 100644 index 0000000000..c020c3394d --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/GemLoader.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_MultiTexture; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +import static gregtech.api.enums.OrePrefixes.*; + +public class GemLoader implements IWerkstoffRunnable { + + @Override + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(gem)) { + if (werkstoff.getGenerationFeatures().hasSifterRecipes() || (werkstoff.hasItemType(ore) && werkstoff.hasItemType(dust))) { + + GT_ModHandler.addCompressionRecipe(werkstoff.get(gem, 9), werkstoff.get(block)); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(block), werkstoff.get(gem, 9), 100, 24); + GT_Values.RA.addSifterRecipe( + werkstoff.get(crushedPurified), + new ItemStack[]{ + werkstoff.get(gemExquisite), + werkstoff.get(gemFlawless), + werkstoff.get(gem), + werkstoff.get(gemFlawed), + werkstoff.get(gemChipped), + werkstoff.get(dust) + }, + new int[]{ + 200, 1000, 2500, 2000, 4000, 5000 + }, + 800, + 16 + ); + } + + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemExquisite), werkstoff.get(dust, 4)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemFlawless), werkstoff.get(dust, 2)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gem), werkstoff.get(dust)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemFlawed), werkstoff.get(dustSmall, 2)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(gemChipped), werkstoff.get(dustSmall)); + + GT_ModHandler.addCraftingRecipe(werkstoff.get(gemFlawless, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gemExquisite)}); + GT_ModHandler.addCraftingRecipe(werkstoff.get(gem, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gemFlawless)}); + GT_ModHandler.addCraftingRecipe(werkstoff.get(gemFlawed, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gem)}); + GT_ModHandler.addCraftingRecipe(werkstoff.get(gemChipped, 2), 0, new Object[]{"h ", "W ", 'W', werkstoff.get(gemFlawed)}); + + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemExquisite), werkstoff.get(gemFlawless, 2), 64, 16); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawless), werkstoff.get(gem, 2), 64, 16); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gem), werkstoff.get(gemFlawed, 2), 64, 16); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawed), werkstoff.get(gemChipped, 2), 64, 16); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemChipped), werkstoff.get(dustTiny), 64, 16); + + if (!werkstoff.contains(WerkstoffLoader.NO_BLAST)) { + GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawless, 3), 8, werkstoff.get(gemExquisite), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(gem, 3), 8, werkstoff.get(gemFlawless), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawed, 3), 8, werkstoff.get(gem), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(gemChipped, 3), 8, werkstoff.get(gemFlawed), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + + GT_Values.RA.addImplosionRecipe(werkstoff.get(dust, 4), 24, werkstoff.get(gem, 3), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 8)); + } + + if (werkstoff.hasItemType(plate)) { + GT_Values.RA.addLatheRecipe(werkstoff.get(plate), werkstoff.get(lens), werkstoff.get(dustSmall), 1200, 120); + } + + GT_Values.RA.addLatheRecipe(werkstoff.get(gemExquisite), werkstoff.get(lens), werkstoff.get(dust, 2), 2400, 30); + GregTech_API.registerCover(werkstoff.get(lens), new GT_MultiTexture(Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LENS, werkstoff.getRGBA(), false)), new gregtech.common.covers.GT_Cover_Lens(BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mIndex)); + GT_ModHandler.addPulverisationRecipe(werkstoff.get(lens), werkstoff.get(dustSmall, 3)); + + for (ItemStack is : OreDictionary.getOres("craftingLens" + BW_ColorUtil.getDyeFromColor(werkstoff.getRGBA()).mName.replace(" ", ""))) { + is.stackSize = 0; + GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemChipped, 3), is, werkstoff.get(gemFlawed, 1), 600, 30); + GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemFlawed, 3), is, werkstoff.get(gem, 1), 600, 120); + GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gem, 3), is, werkstoff.get(gemFlawless, 1), 1200, 480); + GT_Values.RA.addLaserEngraverRecipe(werkstoff.get(gemFlawless, 3), is, werkstoff.get(gemExquisite, 1), 2400, 2000); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java new file mode 100644 index 0000000000..9db7e8f26a --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MetalLoader.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_ModHandler; + +import static gregtech.api.enums.OrePrefixes.block; +import static gregtech.api.enums.OrePrefixes.ingot; + +public class MetalLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(ingot)) { + GT_ModHandler.addCompressionRecipe(werkstoff.get(ingot, 9), werkstoff.get(block)); + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 9), ItemList.Shape_Extruder_Block.get(0), werkstoff.get(block), (int) werkstoff.getStats().getMass(), 8 * werkstoff.getStats().getMeltingPoint() >= 2800 ? 60 : 15); + GT_Values.RA.addAlloySmelterRecipe(werkstoff.get(ingot, 9), ItemList.Shape_Mold_Block.get(0L), werkstoff.get(block), (int) (werkstoff.getStats().getMass() / 2), 4 * werkstoff.getStats().getMeltingPoint() >= 2800 ? 60 : 15); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java new file mode 100644 index 0000000000..68cca299c2 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MoltenCellLoader.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.API.LoaderReference; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; + +import java.util.Objects; + +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.capsuleMolten; +import static gregtech.api.enums.OrePrefixes.*; +import static gregtech.api.enums.OrePrefixes.dustTiny; + +public class MoltenCellLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (!werkstoff.hasItemType(WerkstoffLoader.cellMolten)) + return; + + //Tank "Recipe" + final FluidContainerRegistry.FluidContainerData data = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), werkstoff.get(WerkstoffLoader.cellMolten), Materials.Empty.getCells(1)); + FluidContainerRegistry.registerFluidContainer(werkstoff.getMolten(144), werkstoff.get(cell), Materials.Empty.getCells(1)); + GT_Utility.addFluidContainerData(data); + GT_Values.RA.addFluidCannerRecipe(Materials.Empty.getCells(1), werkstoff.get(WerkstoffLoader.cellMolten), new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), GT_Values.NF); + GT_Values.RA.addFluidCannerRecipe(werkstoff.get(WerkstoffLoader.cellMolten), Materials.Empty.getCells(1), GT_Values.NF, new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144)); + + if (LoaderReference.Forestry) { + final FluidContainerRegistry.FluidContainerData emptyData = new FluidContainerRegistry.FluidContainerData(new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144), werkstoff.get(capsuleMolten), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); + FluidContainerRegistry.registerFluidContainer(werkstoff.getMolten(144), werkstoff.get(capsuleMolten), GT_ModHandler.getModItem("Forestry", "refractoryEmpty", 1)); + GT_Utility.addFluidContainerData(emptyData); + GT_Values.RA.addFluidCannerRecipe(werkstoff.get(capsuleMolten), GT_Values.NI, GT_Values.NF, new FluidStack(Objects.requireNonNull(WerkstoffLoader.molten.get(werkstoff)), 144)); + } + + if (werkstoff.hasItemType(ingot)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(ingot), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + if (werkstoff.hasItemType(plate)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(stickLong), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(plate), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(stick), null, werkstoff.getMolten(72), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + } + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(nugget), null, werkstoff.getMolten(16), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), werkstoff.getMolten(144), werkstoff.get(ingot), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + //GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), werkstoff.getMolten(144), werkstoff.get(block), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0), werkstoff.getMolten(16), werkstoff.get(nugget), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), werkstoff.getMolten(1296), werkstoff.get(block), (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + } else { + if (werkstoff.hasItemType(dust)) { + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dust), null, werkstoff.getMolten(144), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dustSmall), null, werkstoff.getMolten(36), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + GT_Values.RA.addFluidExtractionRecipe(werkstoff.get(dustTiny), null, werkstoff.getMolten(16), 0, (int) werkstoff.getStats().getMass(), werkstoff.getStats().getMass() > 128 ? 64 : 30); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java new file mode 100644 index 0000000000..67e82dab29 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/MultipleMetalLoader.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.OrePrefixes.*; + +public class MultipleMetalLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(plateDense)) { + GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{werkstoff.get(ingot, 2), GT_Utility.getIntegratedCircuit(2)}, new ItemStack[]{werkstoff.get(plateDouble)}, null, null, null, null, (int) Math.max(werkstoff.getStats().getMass() * 2, 1L), 60, 0)); + GregTech_API.registerCover(werkstoff.get(plateDouble), new GT_RenderedTexture(werkstoff.getTexSet().mTextures[72], werkstoff.getRGBA(), false), null); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(plateDouble), new ItemStack[]{werkstoff.get(dust, 2)}, null, 2, 8); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java new file mode 100644 index 0000000000..7700ff74c6 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/OreLoader.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.SubTag; +import gregtech.api.util.GT_ModHandler; + +import static gregtech.api.enums.OrePrefixes.*; + +public class OreLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(ore) && werkstoff.hasItemType(ingot) && !werkstoff.getStats().isBlastFurnace()) + GT_ModHandler.addSmeltingRecipe(WerkstoffLoader.getCorrespondingItemStack(ore, werkstoff), werkstoff.get(ingot)); + + if (werkstoff.hasItemType(ore)) { + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(ore), werkstoff.hasItemType(gem) ? werkstoff.get(gem) : werkstoff.get(crushed), 16, 10); + GT_ModHandler.addPulverisationRecipe( + werkstoff.get(ore), + werkstoff.get(crushed, 2), + werkstoff.contains(SubTag.CRYSTAL) ? werkstoff.get(gem) : werkstoff.getOreByProduct(0, dust), + werkstoff.getNoOfByProducts() > 0 ? 10 : 0, + Materials.Stone.getDust(1), + 50, + true); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java new file mode 100644 index 0000000000..e4360f66ef --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/SimpleMetalLoader.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.API.SideReference; +import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import gregtech.api.GregTech_API; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.TextureSet; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.GT_Proxy; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.OrePrefixes.*; + +public class SimpleMetalLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + if (werkstoff.hasItemType(plate)) { + if (werkstoff.hasItemType(gem)) { + GT_Values.RA.addLatheRecipe(werkstoff.get(gem), werkstoff.get(stick), werkstoff.get(dustSmall, 2), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1L), 16); + GT_ModHandler.addCraftingRecipe(werkstoff.get(stick, 2), GT_Proxy.tBits, new Object[]{"s", "X", 'X', werkstoff.get(stickLong)}); + GT_ModHandler.addCraftingRecipe(werkstoff.get(stick), GT_Proxy.tBits, new Object[]{"f ", " X", 'X', werkstoff.get(gem)}); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(stick, 2), werkstoff.get(stickLong), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); + + TextureSet texSet = werkstoff.getTexSet(); + GT_RenderedTexture texture = SideReference.Side.Client ? + new GT_RenderedTexture(texSet.mTextures[PrefixTextureLinker.blockTexMap.getOrDefault(texSet, block.mTextureIndex)], werkstoff.getRGBA(), false) : + new GT_RenderedTexture(texSet.mTextures[block.mTextureIndex], werkstoff.getRGBA(), false); + GregTech_API.registerCover(werkstoff.get(plate),texture,null); + + GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); + return; + } + + GT_ModHandler.addCraftingRecipe(werkstoff.get(stick, 2), GT_Proxy.tBits, new Object[]{"s", "X", 'X', werkstoff.get(stickLong)}); + GT_ModHandler.addCraftingRecipe(werkstoff.get(stick), GT_Proxy.tBits, new Object[]{"f ", " X", 'X', werkstoff.get(ingot)}); + GT_ModHandler.addCraftingRecipe(werkstoff.get(plate), GT_Proxy.tBits, new Object[]{"h", "X", "X", 'X', werkstoff.get(ingot)}); + + GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true, new ItemStack[]{werkstoff.get(ingot), GT_Utility.getIntegratedCircuit(1)}, new ItemStack[]{werkstoff.get(plate)}, null, null, null, null, (int) Math.max(werkstoff.getStats().getMass(), 1L), 24, 0)); + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(ingot, 3), werkstoff.get(plate, 2), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); + GregTech_API.registerCover(werkstoff.get(plate), new GT_RenderedTexture(werkstoff.getTexSet().mTextures[71], werkstoff.getRGBA(), false), null); + + GT_Values.RA.addLatheRecipe(werkstoff.get(ingot), werkstoff.get(stick), werkstoff.get(dustSmall, 2), (int) Math.max(werkstoff.getStats().getMass() * 5L, 1L), 16); + + GT_Values.RA.addForgeHammerRecipe(werkstoff.get(stick, 2), werkstoff.get(stickLong), (int) Math.max(werkstoff.getStats().getMass(), 1L), 16); + + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Plate.get(0), werkstoff.get(plate), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 45); + GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Rod.get(0), werkstoff.get(stick, 2), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 45); + + GT_Values.RA.addPulveriserRecipe(werkstoff.get(ingot), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(plate), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(stickLong), new ItemStack[]{werkstoff.get(dust)}, null, 2, 8); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(stick), new ItemStack[]{werkstoff.get(dustSmall, 2)}, null, 2, 8); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java new file mode 100644 index 0000000000..9b14e0f334 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/ToolLoader.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.common.GT_Proxy; +import gregtech.common.items.GT_MetaGenerated_Tool_01; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.gtnhGT; +import static gregtech.api.enums.OrePrefixes.*; + +public class ToolLoader implements IWerkstoffRunnable { + + //GTNH-Specific + public static final short SCREWDRIVER_MV = 152; + public static final short SCREWDRIVER_HV = 154; + public static final short SOLDERING_IRON_MV = 162; + public static final short SOLDERING_IRON_HV = 164; + + public void run(Werkstoff werkstoff) { + if (werkstoff.getBridgeMaterial().mDurability == 0) + return; + + if (werkstoff.hasItemType(gem)) { + if (!werkstoff.getGenerationFeatures().isExtension()) + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HARDHAMMER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"XX ", "XXS", "XX ", 'X', gem.get(werkstoff.getBridgeMaterial()), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(toolHeadSaw, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"GGf", 'G', gem.get(werkstoff.getBridgeMaterial())}); + } + + if (!werkstoff.hasItemType(plate)) + return; + + //Disable recipe gen with handle Material for GT Materials + if (!werkstoff.getGenerationFeatures().isExtension()) { + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{" fS", " Sh", "W ", 'S', stick.get(werkstoff.getBridgeMaterial()), 'W', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(toolHeadWrench, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"hXW", "XRX", "WXd", 'X', plate.get(werkstoff.getBridgeMaterial()), 'S', plate.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'R', ring.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'W', screw.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HARDHAMMER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{toolHeadHammer.get(werkstoff.getBridgeMaterial()), stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.FILE, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P", "P", "S", 'P', plate.get(werkstoff.getBridgeMaterial()), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); + GT_ModHandler.addShapelessCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SAW, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), new Object[]{toolHeadSaw.get(werkstoff.getBridgeMaterial()), stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SOLDERING_IRON_LV, 1, werkstoff.getBridgeMaterial(), Materials.Rubber, new long[]{100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', bolt.get(werkstoff.getBridgeMaterial()), 'P', plate.get(Materials.AnyRubber), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'L', ItemList.Battery_RE_LV_Lithium.get(1L)}); + + if (gtnhGT) { + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SOLDERING_IRON_MV, 1, werkstoff.getBridgeMaterial(), Materials.Rubber, new long[]{400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', bolt.get(werkstoff.getBridgeMaterial()), 'P', plate.get(Materials.AnyRubber), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'L', ItemList.Battery_RE_MV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SOLDERING_IRON_HV, 1, werkstoff.getBridgeMaterial(), Materials.StyreneButadieneRubber, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"LBf", "Sd ", "P ", 'B', bolt.get(werkstoff.getBridgeMaterial()), 'P', plate.get(Materials.StyreneButadieneRubber), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial), 'L', ItemList.Battery_RE_HV_Lithium.get(1L)}); + } + + if (!werkstoff.hasItemType(gem)) { + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.HARDHAMMER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial().mHandleMaterial, null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"XX ", "XXS", "XX ", 'X', ingot.get(werkstoff.getBridgeMaterial()), 'S', stick.get(werkstoff.getBridgeMaterial().mHandleMaterial)}); + } + } + + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.PLUNGER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"xRR", " SR", "S f", 'S', stick.get(werkstoff.getBridgeMaterial()), 'R', plate.get(Materials.AnyRubber)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IhI", "III", " I ", 'I', ingot.get(werkstoff.getBridgeMaterial())}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.CROWBAR, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"hDS", "DSD", "SDf", 'S', stick.get(werkstoff.getBridgeMaterial()), 'D', Dyes.dyeBlue}); + + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WIRECUTTER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PfP", "hPd", "STS", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P', plate.get(werkstoff.getBridgeMaterial()), 'T', screw.get(werkstoff.getBridgeMaterial())}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCOOP, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SWS", "SSS", "xSh", 'S', stick.get(werkstoff.getBridgeMaterial()), 'W', new ItemStack(Blocks.wool, 1, 32767)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.BRANCHCUTTER, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PfP", "PdP", "STS", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P', plate.get(werkstoff.getBridgeMaterial()), 'T', screw.get(werkstoff.getBridgeMaterial())}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.KNIFE, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"fPh", " S ", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P', plate.get(werkstoff.getBridgeMaterial())}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.BUTCHERYKNIFE, 1, werkstoff.getBridgeMaterial(), werkstoff.getBridgeMaterial(), null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPf", "PP ", "Sh ", 'S', stick.get(werkstoff.getBridgeMaterial()), 'P', plate.get(werkstoff.getBridgeMaterial())}); + + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{75000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{300000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{200000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.WRENCH_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"SXd", "GMG", "PBP", 'X', toolHeadWrench.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); + + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{100000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{75000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Cadmium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, werkstoff.getBridgeMaterial(), Materials.StainlessSteel, new long[]{50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.StainlessSteel), 'P', plate.get(Materials.StainlessSteel), 'G', gearGtSmall.get(Materials.StainlessSteel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)}); + + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(toolHeadHammer, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"II ", "IIh", "II ", 'P', plate.get(werkstoff.getBridgeMaterial()), 'I', ingot.get(werkstoff.getBridgeMaterial())}); + + if (!werkstoff.hasItemType(gem)) { + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(toolHeadSaw, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"PP ", "fh ", 'P', plate.get(werkstoff.getBridgeMaterial()), 'I', ingot.get(werkstoff.getBridgeMaterial())}); + } + + if (gtnhGT) { + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SCREWDRIVER_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{400000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SCREWDRIVER_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{300000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Cadmium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SCREWDRIVER_MV, 1, werkstoff.getBridgeMaterial(), Materials.Titanium, new long[]{200000L, 128L, 2L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_MV.get(1L), 'S', screw.get(Materials.Titanium), 'P', plate.get(Materials.Titanium), 'G', gearGtSmall.get(Materials.Titanium), 'B', ItemList.Battery_RE_MV_Sodium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SCREWDRIVER_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{1600000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Lithium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SCREWDRIVER_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{1200000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Cadmium.get(1L)}); + GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(SCREWDRIVER_HV, 1, werkstoff.getBridgeMaterial(), Materials.TungstenSteel, new long[]{800000L, 512L, 3L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_HV.get(1L), 'S', screw.get(Materials.TungstenSteel), 'P', plate.get(Materials.TungstenSteel), 'G', gearGtSmall.get(Materials.TungstenSteel), 'B', ItemList.Battery_RE_HV_Sodium.get(1L)}); + } + + // GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(16,1, werkstoff.getBridgeMaterial(),werkstoff.getBridgeMaterial(),null), GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"IhI", "III", " I ", 'I', werkstoff.get(ingot)}); + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java new file mode 100644 index 0000000000..44c35c8543 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/AssociationLoader.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.registration; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; +import net.minecraft.item.ItemStack; + +public class AssociationLoader implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + for (OrePrefixes prefixes : OrePrefixes.values()) { + if (!werkstoff.hasItemType(prefixes)) + continue; + + Materials werkstoffBridgeMaterial = werkstoff.getBridgeMaterial(); + ItemStack stack = WerkstoffLoader.getCorrespondingItemStackUnsafe(prefixes, werkstoff, 1); + + if (stack != null && stack.getItem() != null) { + GT_OreDictUnificator.addAssociation(prefixes, werkstoffBridgeMaterial, stack, false); + GT_OreDictUnificator.set(prefixes, werkstoffBridgeMaterial, stack, true, true); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java new file mode 100644 index 0000000000..f61ce70c81 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/BridgeMaterialsLoader.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.registration; + +import com.github.bartimaeusnek.bartworks.API.LoaderReference; +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import gregtech.api.enchants.Enchantment_Radioactivity; +import gregtech.api.enums.*; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; +import gregtech.common.items.behaviors.Behaviour_DataOrb; +import net.minecraft.item.ItemStack; + +import java.lang.reflect.Field; +import java.util.ArrayList; + +import static gregtech.api.enums.OrePrefixes.*; + +public class BridgeMaterialsLoader implements IWerkstoffRunnable { + + @Override + public void run(Werkstoff werkstoff) { + //int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, String aConfigSection, boolean aCustomOre, String aCustomID + Materials werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null ? werkstoff.getBridgeMaterial() : Materials.get(werkstoff.getVarName()) != Materials._NULL ? Materials.get(werkstoff.getVarName()) : + new Materials(-1, werkstoff.getTexSet(), werkstoff.getToolSpeed(), werkstoff.getDurability(), werkstoff.getToolQuality(), 0, werkstoff.getRGBA()[0], werkstoff.getRGBA()[1], werkstoff.getRGBA()[2], werkstoff.getRGBA()[3], werkstoff.getVarName(), werkstoff.getDefaultName(), 0, 0, werkstoff.getStats().getMeltingPoint(), werkstoff.getStats().getMeltingPoint(), werkstoff.getStats().isBlastFurnace(), false, 0, 1, 1, null); + for (OrePrefixes prefixes : values()) { + if (!(prefixes == cell && werkstoff.getType().equals(Werkstoff.Types.ELEMENT))) { + if (prefixes == dust && werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { + if (werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { + boolean ElementSet = false; + for (Element e : Element.values()) { + if (e.toString().equals(werkstoff.getToolTip())) { + if (e.mLinkedMaterials.size() > 0) + break; + werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null ? werkstoff.getBridgeMaterial() : Materials.get(werkstoff.getVarName()) != Materials._NULL ? Materials.get(werkstoff.getVarName()) : + new Materials(-1, werkstoff.getTexSet(), werkstoff.getToolSpeed(), werkstoff.getDurability(), werkstoff.getToolQuality(), 0, werkstoff.getRGBA()[0], werkstoff.getRGBA()[1], werkstoff.getRGBA()[2], werkstoff.getRGBA()[3], werkstoff.getVarName(), werkstoff.getDefaultName(), 0, 0, werkstoff.getStats().getMeltingPoint(), werkstoff.getStats().getMeltingPoint(), werkstoff.getStats().isBlastFurnace(), false, 0, 1, 1, null); + werkstoffBridgeMaterial.mElement = e; + e.mLinkedMaterials = new ArrayList<>(); + e.mLinkedMaterials.add(werkstoffBridgeMaterial); + if (werkstoff.hasItemType(dust)) { + GT_OreDictUnificator.addAssociation(dust, werkstoffBridgeMaterial, werkstoff.get(dust), false); + GT_OreDictUnificator.set(dust, werkstoffBridgeMaterial, werkstoff.get(dust), true, true); + } + ElementSet = true; + break; + } + } + if (!ElementSet) + continue; +// try { +// Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); +// f.setAccessible(true); +// Map MATERIALS_MAP = (Map) f.get(null); +// MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); +// } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { +// e.printStackTrace(); +// } + if (werkstoff.hasItemType(dust)) { + ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); + Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); + Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(prefixes)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); + //GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, null, new ItemStack[]{werkstoff.get(prefixes)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); + } + } + } + + if (werkstoff.hasItemType(cell)) { + werkstoffBridgeMaterial.setHasCorrespondingFluid(true); + werkstoffBridgeMaterial.setHasCorrespondingGas(true); + werkstoffBridgeMaterial.mFluid = werkstoff.getFluidOrGas(1).getFluid(); + werkstoffBridgeMaterial.mGas = werkstoff.getFluidOrGas(1).getFluid(); + } + + if (werkstoff.hasItemType(WerkstoffLoader.cellMolten)) { + werkstoffBridgeMaterial.mStandardMoltenFluid = werkstoff.getMolten(1).getFluid(); + } + werkstoffBridgeMaterial.mName = werkstoff.getVarName(); + werkstoffBridgeMaterial.mDefaultLocalName = werkstoff.getDefaultName(); + try { + Field f = Materials.class.getField("mLocalizedName"); + f.set(werkstoffBridgeMaterial, werkstoff.getDefaultName()); + } catch (NoSuchFieldException | IllegalAccessException ignored) { + } + werkstoffBridgeMaterial.mChemicalFormula = werkstoff.getToolTip(); + if (LoaderReference.Thaumcraft) + werkstoffBridgeMaterial.mAspects = werkstoff.getGTWrappedTCAspects(); + werkstoffBridgeMaterial.mMaterialInto = werkstoffBridgeMaterial; + werkstoffBridgeMaterial.mHandleMaterial = werkstoff.contains(SubTag.BURNING) ? Materials.Blaze : werkstoff.contains(SubTag.MAGICAL) ? Materials.Thaumium : werkstoffBridgeMaterial.mDurability > 5120 ? Materials.TungstenSteel : werkstoffBridgeMaterial.mDurability > 1280 ? Materials.Steel : Materials.Wood; + if (werkstoff.getStats().isRadioactive()) { + werkstoffBridgeMaterial.setEnchantmentForArmors(Enchantment_Radioactivity.INSTANCE, werkstoff.getStats().getEnchantmentlvl()); + werkstoffBridgeMaterial.setEnchantmentForTools(Enchantment_Radioactivity.INSTANCE, werkstoff.getStats().getEnchantmentlvl()); + } + werkstoff.setBridgeMaterial(werkstoffBridgeMaterial); + //if (WerkstoffLoader.items.get(prefixes) != null) + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java new file mode 100644 index 0000000000..8ffd3ea552 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/registration/CasingRegistrator.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.registration; + +import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; +import gregtech.api.util.GT_OreDictUnificator; +import net.minecraft.item.ItemStack; + +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasing; +import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.blockCasingAdvanced; + +public class CasingRegistrator implements IWerkstoffRunnable { + @Override + public void run(Werkstoff werkstoff) { + GT_OreDictUnificator.addAssociation( + blockCasing, werkstoff.getBridgeMaterial(), + new ItemStack(WerkstoffLoader.BWBlockCasings, 1, werkstoff.getmID()), + false + ); + GT_OreDictUnificator.addAssociation( + blockCasingAdvanced, werkstoff.getBridgeMaterial(), + new ItemStack(WerkstoffLoader.BWBlockCasingsAdvanced, 1, werkstoff.getmID()), + false + ); + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java index 2aeb8cef35..8d4fe889cb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/object/AbstractedStack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java index 9269762a22..afa6aaa98a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictAdder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java index 9aa46ae3b2..bf077f47e1 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java index 3def3800d5..6677e6ab79 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WordGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java index b8fda6a8dc..87b1abdd4e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128b.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java index 6f32b0007b..f0682e53b4 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java index 6429cece69..f8b0aac053 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java @@ -58,7 +58,7 @@ import java.util.stream.Collectors; import static gregtech.api.enums.GT_Values.*; -@SuppressWarnings("unused") +@SuppressWarnings({"unused","RedundantSuppression"}) public class BW_Util { public static final int STANDART = 0; @@ -357,7 +357,11 @@ public class BW_Util { * @param aDuration - recipe Duration * @param mAmperage - should be 1 ? */ - public static void calculateOverclockedNessMulti(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, GT_MetaTileEntity_MultiBlockBase base) { + public static void calculateOverclockedNessMulti(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, @Nonnull GT_MetaTileEntity_MultiBlockBase base) { + calculateOverclockednessMultiInternal(aEUt, aDuration, mAmperage, maxInputVoltage, base, 2); + } + + private static void calculateOverclockednessMultiInternal(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, @Nonnull GT_MetaTileEntity_MultiBlockBase base, @Nonnegative int modifier){ byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage)); if (mTier == 0) { //Long time calculation @@ -367,7 +371,7 @@ public class BW_Util { base.mEUt = Integer.MAX_VALUE - 1; base.mMaxProgresstime = Integer.MAX_VALUE - 1; } else { - base.mEUt = aEUt >> 2; + base.mEUt = aEUt >> modifier; base.mMaxProgresstime = (int) xMaxProgresstime; } } else { @@ -379,62 +383,23 @@ public class BW_Util { base.mMaxProgresstime = aDuration; while (tempEUt <= V[mTier - 1] * mAmperage) { - tempEUt <<= 2;//this actually controls overclocking + tempEUt <<= modifier;//this actually controls overclocking //xEUt *= 4;//this is effect of everclocking base.mMaxProgresstime >>= 1;//this is effect of overclocking xEUt = base.mMaxProgresstime <= 0 ? xEUt >> 1 : xEUt << 2;//U know, if the time is less than 1 tick make the machine use less power } - while (xEUt > maxInputVoltage){ + while (xEUt > maxInputVoltage && xEUt >= aEUt){ //downclock one notch until we are good again, we have overshot. - xEUt >>=2; + xEUt >>= modifier; base.mMaxProgresstime <<= 1; } - if (xEUt > Integer.MAX_VALUE - 1) { - base.mEUt = Integer.MAX_VALUE - 1; - base.mMaxProgresstime = Integer.MAX_VALUE - 1; - } else { - base.mEUt = (int) xEUt; - if (base.mEUt == 0) - base.mEUt = 1; - if (base.mMaxProgresstime <= 0) - base.mMaxProgresstime = 1;//set time to 1 tick - } - } - } - - public static void calculateOverclockedNessMultiPefectOC(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, GT_MetaTileEntity_MultiBlockBase base){ - byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage)); - if (mTier == 0) { - //Long time calculation - long xMaxProgresstime = ((long) aDuration) << 1; - if (xMaxProgresstime > Integer.MAX_VALUE - 1) { - //make impossible if too long - base.mEUt = Integer.MAX_VALUE - 1; - base.mMaxProgresstime = Integer.MAX_VALUE - 1; - } else { - base.mEUt = aEUt >> 2; - base.mMaxProgresstime = (int) xMaxProgresstime; - } - } else { - long xEUt = aEUt; - //Isnt too low EUt check? - long tempEUt = Math.max(xEUt, V[1]); - - base.mMaxProgresstime = aDuration; - - while (tempEUt <= V[mTier - 1] * mAmperage) { - tempEUt <<= 1;//this actually controls overclocking - base.mMaxProgresstime >>= 1;//this is effect of overclocking - xEUt = base.mMaxProgresstime <= 0 ? xEUt >> 1 : xEUt << 1;//U know, if the time is less than 1 tick make the machine use less power + if (xEUt < aEUt){ + xEUt <<= modifier; + base.mMaxProgresstime >>= 1; } - while (xEUt > maxInputVoltage) { - //downclock one notch until we are good again, we have overshot. - xEUt >>= 1; - base.mMaxProgresstime <<= 1; - } if (xEUt > Integer.MAX_VALUE - 1) { base.mEUt = Integer.MAX_VALUE - 1; base.mMaxProgresstime = Integer.MAX_VALUE - 1; @@ -448,6 +413,10 @@ public class BW_Util { } } + public static void calculateOverclockedNessMultiPefectOC(@Nonnegative int aEUt, @Nonnegative int aDuration, @Nonnegative int mAmperage, @Nonnegative long maxInputVoltage, @Nonnull GT_MetaTileEntity_MultiBlockBase base){ + calculateOverclockednessMultiInternal(aEUt, aDuration, mAmperage, maxInputVoltage, base, 1); + } + public static long getnominalVoltage(GT_MetaTileEntity_MultiBlockBase base) { long rVoltage = 0L; long rAmperage = 0L; diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java index 5e1bb3e792..7045e27bd1 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/recipe/TCRecipeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java index db9b77ec91..dd0dc8f325 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/tileentities/multi/GT_Industrial_Alchemic_Construct.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java b/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java index b6cc37b451..b75a9fcd1a 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/emt/util/EMTHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java index fb0451d381..8f6f1f9164 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/PlanetsHelperClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java index c881e09317..5faa82b6e6 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/atmosphere/BWAtmosphereManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +36,7 @@ import micdoodle8.mods.galacticraft.api.world.IAtmosphericGas; import java.util.*; -@SuppressWarnings("unused") +@SuppressWarnings({"unused", "RedundantSuppression"}) public final class BWAtmosphereManager { private static final Map COEFFICIENT_MAP = new HashMap<>(); @@ -90,7 +90,7 @@ public final class BWAtmosphereManager { return true; } String name = gas.toString(); - name = name.substring(0,1)+name.substring(1).toLowerCase(Locale.US); + name = name.charAt(0)+name.substring(1).toLowerCase(Locale.US); ISubTagContainer mat = Materials.get(name); if (mat == Materials._NULL){ mat = WerkstoffLoader.getWerkstoff(name); diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java index 3a7e92f186..04d4e41cb8 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/blocks/UniversalSpaceBlocks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java index 7e082ba695..b44120bf34 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/creativetabs/SpaceTab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java index 47be16ce21..ecc243a3d0 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/AbstractWorldProviderSpace.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java index d096ba4962..ddb37b9941 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/SkyProviderRoss128b.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java index f6a5cfc3f3..2c8eac2cd9 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128b/WorldProviderRoss128b.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java index cf4c13f326..78cbd986ac 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticraft/planets/ross128ba/ChunkProviderRoss128ba.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java index cce24d22db..a2f3f78861 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/DysonSwarmSunReplacement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java index 609a718be2..1fbddb01b1 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galaxySpace/tileEntity/GalaxySpaceProxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java index 954364034a..7a01028a61 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/openComputers/GT_NBT_DataBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java index 8bfa8024d5..ffac1554d4 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TT_TileEntity_ManualTrafo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -33,7 +33,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energ import java.util.ArrayList; import java.util.Iterator; -@SuppressWarnings({"unused"}) +@SuppressWarnings({"unused","RedundantSuppression"}) public class TT_TileEntity_ManualTrafo extends GT_TileEntity_ManualTrafo { ArrayList mTTEnergyHatches = new ArrayList<>(); diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java index c6f9003d9d..bacd18c894 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/CustomAspects.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java index 67c0dfb15d..ee22ca8ab2 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_Multi_IndustrialCrucible.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java index 991b7ad1b5..08fc1d0e5c 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/tile/GT_WandBuffer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 bartimaeusnek + * Copyright (c) 2018-2020 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal -- cgit From 79b66b91fa6fd1530281fc0ac500180801effd48 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Tue, 13 Oct 2020 18:28:12 +0200 Subject: Various Develpoment Former-commit-id: e8ab11b5a3cdefe0c89bc82647010239795ddb62 --- ...ecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id | 1 - ...ch-1.7.10-4.8.3-9b640643-dev.jar.REMOVED.git-id | 1 + libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id | 1 - libs/gregtech-5.09.33.54-dev.jar.REMOVED.git-id | 1 + .../com/github/bartimaeusnek/ASM/ASMUtils.java | 4 +- .../ASM/BWCoreStaticReplacementMethodes.java | 38 +- .../bartworks/common/items/BW_ItemBlocks.java | 4 +- .../bartworks/common/items/BW_SimpleWindMeter.java | 4 +- .../bartworks/common/items/BW_Stonage_Rotors.java | 4 +- .../bartworks/common/items/Circuit_Programmer.java | 4 +- .../common/items/GT_Destructopack_Item.java | 5 +- .../bartworks/common/items/GT_Rockcutter_Item.java | 4 +- .../bartworks/common/items/GT_Teslastaff_Item.java | 4 +- .../bartworks/common/items/SimpleSubItemClass.java | 5 +- .../tileentities/multis/GT_TileEntity_BioVat.java | 2 +- .../multis/GT_TileEntity_CircuitAssemblyLine.java | 10 +- .../GT_TileEntity_ElectricImplosionCompressor.java | 11 +- .../tileentities/multis/GT_TileEntity_LESU.java | 3 +- .../multis/GT_TileEntity_ManualTrafo.java | 11 +- .../tileentities/multis/GT_TileEntity_THTR.java | 11 +- .../multis/GT_TileEntity_Windmill.java | 11 +- .../mega/GT_TileEntity_MegaBlastFurnace.java | 14 +- .../mega/GT_TileEntity_MegaDistillTower.java | 8 +- .../mega/GT_TileEntity_MegaVacuumFreezer.java | 13 +- .../tiered/GT_MetaTileEntity_AcidGenerator.java | 3 +- .../tiered/GT_MetaTileEntity_BioLab.java | 2 +- .../tiered/GT_MetaTileEntity_Diode.java | 3 +- .../GT_MetaTileEntity_EnergyDistributor.java | 3 +- .../tiered/GT_MetaTileEntity_RadioHatch.java | 5 +- .../bartworks/neiHandler/BW_NEI_OreHandler.java | 4 +- .../system/material/BW_GT_MaterialReference.java | 644 +++++++++++++++++++++ .../material/BW_MetaGeneratedBlock_Item.java | 2 + .../material/BW_MetaGeneratedBlocks_Casing.java | 18 +- .../system/material/BW_MetaGenerated_Blocks.java | 12 + .../system/material/BW_MetaGenerated_Items.java | 5 +- .../material/CircuitGeneration/BW_Meta_Items.java | 5 +- .../material/GT_Enhancement/BWGTMetaItems.java | 30 +- .../bartworks/system/material/Werkstoff.java | 44 +- .../bartworks/system/material/WerkstoffLoader.java | 8 +- .../werkstoff_loaders/recipe/CasingLoader.java | 41 +- .../bartworks/system/oredict/OreDictHandler.java | 3 +- .../bartworks/util/BW_Tooltip_Reference.java | 46 ++ .../accessprioritylist/AccessPriorityList.java | 21 +- .../AccessPriorityListIterators.java | 20 + .../bartimaeusnek/crossmod/BartWorksCrossmod.java | 11 + .../galacticgreg/GT_TileEntity_VoidMiner_Base.java | 5 +- .../crossmod/tectech/TecTechEnabledMulti.java | 4 +- .../crossmod/tectech/TecTechUtils.java | 148 ----- .../crossmod/tectech/helper/CoilAdder.java | 63 ++ .../crossmod/tectech/helper/IHasCoils.java | 28 + .../tectech/helper/StructureDefinitions.java | 52 ++ .../crossmod/tectech/helper/TecTechUtils.java | 149 +++++ .../GT_Replacement/TT_ElectronicBlastFurnace.java | 442 ++++++++++++++ .../GT_Replacement/TT_ImplosionCompressor.java | 261 +++++++++ .../multi/GT_Replacement/TT_OilCrackingUnit.java | 325 +++++++++++ .../multi/GT_Replacement/TT_VaccuumFreezer.java | 227 ++++++++ .../tiered/TT_MetaTileEntity_LowPowerLaserBox.java | 4 +- .../TT_MetaTileEntity_LowPowerLaserDynamo.java | 4 +- .../TT_MetaTileEntity_LowPowerLaserHatch.java | 4 +- .../TT_MetaTileEntity_Pipe_Energy_LowPower.java | 4 +- 60 files changed, 2494 insertions(+), 330 deletions(-) delete mode 100644 libs/TecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id create mode 100644 libs/TecTech-1.7.10-4.8.3-9b640643-dev.jar.REMOVED.git-id delete mode 100644 libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id create mode 100644 libs/gregtech-5.09.33.54-dev.jar.REMOVED.git-id create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java delete mode 100644 src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechUtils.java create mode 100644 src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/CoilAdder.java create mode 100644 src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/IHasCoils.java create mode 100644 src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/StructureDefinitions.java create mode 100644 src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/TecTechUtils.java create mode 100644 src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_ElectronicBlastFurnace.java create mode 100644 src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_ImplosionCompressor.java create mode 100644 src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_OilCrackingUnit.java create mode 100644 src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_VaccuumFreezer.java (limited to 'src') diff --git a/libs/TecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id b/libs/TecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id deleted file mode 100644 index 6a3cc6b00a..0000000000 --- a/libs/TecTech-1.7.10-4.8.3-4eb40295.jar.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -c13aa64170017f7dcbb833974f75d7a99d14ae80 \ No newline at end of file diff --git a/libs/TecTech-1.7.10-4.8.3-9b640643-dev.jar.REMOVED.git-id b/libs/TecTech-1.7.10-4.8.3-9b640643-dev.jar.REMOVED.git-id new file mode 100644 index 0000000000..46ee999944 --- /dev/null +++ b/libs/TecTech-1.7.10-4.8.3-9b640643-dev.jar.REMOVED.git-id @@ -0,0 +1 @@ +3049f86f84ddb13398789bfb1e1360c492fc0b5a \ No newline at end of file diff --git a/libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id b/libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id deleted file mode 100644 index 700ca28882..0000000000 --- a/libs/gregtech-5.09.33.52-dev.jar.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -14c31c860e0a098cc07a306c5a01997664b0604f \ No newline at end of file diff --git a/libs/gregtech-5.09.33.54-dev.jar.REMOVED.git-id b/libs/gregtech-5.09.33.54-dev.jar.REMOVED.git-id new file mode 100644 index 0000000000..396d628a54 --- /dev/null +++ b/libs/gregtech-5.09.33.54-dev.jar.REMOVED.git-id @@ -0,0 +1 @@ +fdcf1725ae123ce50af73ffbe38f8f0ec312f32b \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java b/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java index 4d9fe89836..9055909567 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java @@ -52,7 +52,9 @@ public class ASMUtils { public static boolean writeClassToDisk(byte[] towrite, String Classname, String Path) { try { - OutputStream os = new FileOutputStream(new File(Path + Classname + ".class")); + if (Path.charAt(Path.length()-1) == '/' || Path.charAt(Path.length()-1) == '\\') + Path = Path.substring(0,Path.length()-1); + OutputStream os = new FileOutputStream(new File(Path + '/' + Classname + ".class")); os.write(towrite); } catch (IOException e) { e.printStackTrace(); diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreStaticReplacementMethodes.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreStaticReplacementMethodes.java index 72a9477e59..6399a5119b 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreStaticReplacementMethodes.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreStaticReplacementMethodes.java @@ -24,6 +24,7 @@ package com.github.bartimaeusnek.ASM; import com.github.bartimaeusnek.bartworks.util.NonNullWrappedHashSet; import com.github.bartimaeusnek.bartworks.util.accessprioritylist.AccessPriorityList; +import com.github.bartimaeusnek.bartworks.util.accessprioritylist.AccessPriorityListNode; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -31,6 +32,7 @@ import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import net.minecraft.world.World; +import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -53,21 +55,16 @@ public class BWCoreStaticReplacementMethodes { if (itemstack2 != null) { if (i == 0) - { itemstack = itemstack2; - } if (i == 1) - { itemstack1 = itemstack2; - } ++i; } } - if (i == 2 && itemstack.getItem() == itemstack1.getItem() && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && itemstack.getItem().isRepairable()) - { + if (i == 2 && itemstack.getItem() == itemstack1.getItem() && itemstack.stackSize == 1 && itemstack1.stackSize == 1 && itemstack.getItem().isRepairable()) { Item item = itemstack.getItem(); int j1 = item.getMaxDamage() - itemstack.getItemDamageForDisplay(); int k = item.getMaxDamage() - itemstack1.getItemDamageForDisplay(); @@ -75,24 +72,23 @@ public class BWCoreStaticReplacementMethodes { int i1 = item.getMaxDamage() - l; if (i1 < 0) - { i1 = 0; - } return new ItemStack(itemstack.getItem(), 1, i1); + } else { + IRecipe iPossibleRecipe = null; - int index = 0; - for (Iterator it = RECENTLYUSEDRECIPES.iterator(); it.hasNext(); ++index) { - IRecipe RECENTLYUSEDRECIPE = it.next(); - if (RECENTLYUSEDRECIPE.matches(inventoryCrafting, world)) { - iPossibleRecipe = RECENTLYUSEDRECIPE; - break; - } - } + Iterator> it = RECENTLYUSEDRECIPES.nodeIterator(); + + while (it.hasNext()) { + AccessPriorityListNode recipeNode = it.next(); + iPossibleRecipe = recipeNode.getELEMENT(); + + if (!iPossibleRecipe.matches(inventoryCrafting, world)) + continue; - if (iPossibleRecipe != null) { - RECENTLYUSEDRECIPES.addPrioToNode(index); + RECENTLYUSEDRECIPES.addPrioToNode(recipeNode); return iPossibleRecipe.getCraftingResult(inventoryCrafting); } @@ -102,10 +98,12 @@ public class BWCoreStaticReplacementMethodes { List recipeList = CraftingManager.getInstance().getRecipeList(); for (int k = 0; k < recipeList.size(); k++) { - recipeSet.add((IRecipe) recipeList.get(k)); + IRecipe r = (IRecipe) recipeList.get(k); + if (r.matches(inventoryCrafting, world)) + recipeSet.add(r); } - Object[] arr = recipeSet.parallelStream().filter(r -> r.matches(inventoryCrafting, world)).toArray(); + Object[] arr = recipeSet.toArray(); if (arr.length == 0) return null; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java index a3a9fc26e0..e0c172f1cd 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_ItemBlocks.java @@ -26,8 +26,8 @@ import com.github.bartimaeusnek.bartworks.API.ITileAddsInformation; import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.common.blocks.BW_GlasBlocks; import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.GT_Values; @@ -78,7 +78,7 @@ public class BW_ItemBlocks extends ItemBlock { if (!(this.field_150939_a instanceof ITileEntityProvider)) aList.add(this.mNoTileEntityToolTip); - aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java index c5a6efd711..ff9f43cdbf 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java @@ -23,7 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ic2.core.WorldData; @@ -59,7 +59,7 @@ public class BW_SimpleWindMeter extends Item { super.addInformation(itemStack, entityPlayer, list, p_77624_4_); list.add(StatCollector.translateToLocal("tooltip.windmeter.0.name")); list.add(StatCollector.translateToLocal("tooltip.windmeter.1.name") + " " + (this.getMaxDamage() - this.getDamage(itemStack)) + "/" + this.getMaxDamage()); - list.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + list.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java index efe7f5c6ca..9731b4da3b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java @@ -23,7 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ic2.api.item.IKineticRotor; @@ -83,7 +83,7 @@ public class BW_Stonage_Rotors extends Item implements IKineticRotor { if (type != null) { info.add(StatCollector.translateToLocal(("ic2.itemrotor.fitsin." + this.isAcceptedType(itemStack, type)))); } - info.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + info.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java index 29c14101a6..b2f633c105 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java @@ -23,7 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.GT_Values; @@ -56,7 +56,7 @@ public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem super.addInformation(aStack, aPlayer, aList, aF3_H); if (aStack != null && aStack.getTagCompound() != null) aList.add(StatCollector.translateToLocal("tooltip.cp.0.name") + " " + (aStack.getTagCompound().getBoolean("HasChip") ? StatCollector.translateToLocal("tooltip.bw.yes.name") : StatCollector.translateToLocal("tooltip.bw.no.name"))); - aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java index c6a6782e34..15e16008ad 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java @@ -23,14 +23,13 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.items.GT_Generic_Item; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; @@ -49,7 +48,7 @@ public class GT_Destructopack_Item extends GT_Generic_Item { @SuppressWarnings("unchecked") public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { super.addInformation(aStack, aPlayer, aList, aF3_H); - aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java index 3c132cef88..a1b222f7c3 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java @@ -23,7 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.google.common.collect.Sets; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -76,7 +76,7 @@ public class GT_Rockcutter_Item extends ItemTool implements IElectricItem { @SuppressWarnings("unchecked") public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { aList.add(StatCollector.translateToLocal("tooltip.bw.tier.name") + " " + GT_Values.VN[this.mTier]); - aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } public void onUpdate(ItemStack aStack, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java index ba46ded1b2..9b4c1ba51c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java @@ -23,7 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.google.common.collect.Sets; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -69,7 +69,7 @@ public class GT_Teslastaff_Item extends ItemTool implements IElectricItem { @SuppressWarnings("unchecked") public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { aList.add(StatCollector.translateToLocal("tooltip.teslastaff.0.name")); - aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } public boolean hitEntity(ItemStack aStack, EntityLivingBase aTarget, EntityLivingBase aPlayer) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java index 34bf243c1b..a363ab6811 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/SimpleSubItemClass.java @@ -23,7 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; @@ -32,7 +32,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -import net.minecraft.util.StatCollector; import java.util.List; @@ -60,7 +59,7 @@ public class SimpleSubItemClass extends Item { @SuppressWarnings("unchecked") public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) { super.addInformation(p_77624_1_, p_77624_2_, aList, p_77624_4_); - aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java index 90b0c4ff7d..f13f11607c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java @@ -572,7 +572,7 @@ public class GT_TileEntity_BioVat extends GT_MetaTileEntity_MultiBlockBase { String[] fdsc = new String[dsc.length + 1]; for (int i = 0; i < dsc.length; i++) { fdsc[i] = dsc[i]; - fdsc[dsc.length] = StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"; + fdsc[dsc.length] = BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get(); } return fdsc; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java index 45bcd28218..9de9f736cb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java @@ -26,7 +26,6 @@ import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.BW_M import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.CircuitImprintLoader; import com.github.bartimaeusnek.bartworks.util.BWRecipes; import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; @@ -40,12 +39,13 @@ import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import java.util.Collection; import java.util.HashSet; +import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS; + public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBlockBase { public String getTypeForDisplay() { @@ -129,6 +129,7 @@ public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBl this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); this.mOutputItems = this.bufferedRecipe.mOutputs; this.mOutputFluids = this.bufferedRecipe.mFluidOutputs; + sendLoopStart((byte) 20); this.updateSlots(); return true; } @@ -217,9 +218,8 @@ public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBl --length; - if (length < -7){ + if (length < -7) return false; - } } @@ -361,7 +361,7 @@ public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBl "Imprint this machine with a Circuit Imprint,", "by putting the imprint in the controller.", "Every Circuit Assembly Line can only be imprinted ONCE.", - StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks" + ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() }; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java index bd45fe554a..18e6a43ebc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java @@ -22,7 +22,7 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.multis; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -33,7 +33,6 @@ import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_ImplosionCo import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; @@ -249,12 +248,6 @@ public class GT_TileEntity_ElectricImplosionCompressor extends GT_MetaTileEntity @Override public String[] getDescription() { - String[] dsc = StatCollector.translateToLocal("tooltip.tile.eic.0.name").split(";"); - String[] mDescription = new String[dsc.length + 1]; - for (int i = 0; i < dsc.length; i++) { - mDescription[i] = dsc[i]; - mDescription[dsc.length] = StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"; - } - return mDescription; + return BW_Tooltip_Reference.getTranslatedBrandedTooltip("tooltip.tile.eic.0.name"); } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java index 5f6dde9c7f..533cf24d70 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_LESU.java @@ -27,6 +27,7 @@ import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_LESU; import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; import com.github.bartimaeusnek.bartworks.server.container.GT_Container_LESU; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import com.github.bartimaeusnek.bartworks.util.ConnectedBlocksChecker; import cpw.mods.fml.common.FMLCommonHandler; @@ -163,7 +164,7 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase { dsc = StatCollector.translateToLocal("tooltip.tile.lesu.2.name").split(";"); Collections.addAll(e, dsc); e.add(ChatColorHelper.RED + StatCollector.translateToLocal("tooltip.tile.lesu.3.name")); - e.add(StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + e.add(BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()); return e.toArray(new String[0]); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java index 06c8324457..9c43cff7de 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ManualTrafo.java @@ -23,7 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.multis; import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; @@ -37,7 +37,6 @@ import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import static gregtech.api.enums.GT_Values.V; @@ -374,13 +373,7 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_MultiBlockBase @Override public String[] getDescription() { - String[] dsc = StatCollector.translateToLocal("tooltip.tile.manualtravo.0.name").split(";"); - String[] fdsc = new String[dsc.length + 1]; - for (int i = 0; i < dsc.length; i++) { - fdsc[i] = dsc[i]; - fdsc[dsc.length] = StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"; - } - return fdsc; + return BW_Tooltip_Reference.getTranslatedBrandedTooltip("tooltip.tile.manualtravo.0.name"); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java index dc85f9476d..d46754840d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_THTR.java @@ -24,8 +24,8 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.multis; import com.github.bartimaeusnek.bartworks.common.items.SimpleSubItemClass; import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import com.github.bartimaeusnek.bartworks.util.MathUtils; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; @@ -45,7 +45,6 @@ import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; @@ -319,13 +318,7 @@ public class GT_TileEntity_THTR extends GT_MetaTileEntity_MultiBlockBase { @Override public String[] getDescription() { - String[] dsc = StatCollector.translateToLocal("tooltip.tile.htr.0.name").split(";"); - String[] mDescription = new String[dsc.length + 1]; - for (int i = 0; i < dsc.length; i++) { - mDescription[i] = dsc[i]; - mDescription[dsc.length] = StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"; - } - return mDescription; + return BW_Tooltip_Reference.getTranslatedBrandedTooltip("tooltip.tile.htr.0.name"); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java index 69a20db22c..2bea093f2a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_Windmill.java @@ -26,8 +26,8 @@ import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.client.gui.BW_GUIContainer_Windmill; import com.github.bartimaeusnek.bartworks.common.tileentities.classic.BW_RotorBlock; import com.github.bartimaeusnek.bartworks.server.container.BW_Container_Windmill; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -55,7 +55,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityDispenser; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import java.util.Arrays; @@ -588,13 +587,7 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase { @Override public String[] getDescription() { - String[] dsc = StatCollector.translateToLocal("tooltip.tile.windmill.0.name").split(";"); - String[] fdsc = new String[dsc.length + 1]; - for (int i = 0; i < dsc.length; i++) { - fdsc[i] = dsc[i]; - fdsc[dsc.length] = StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"; - } - return fdsc; + return BW_Tooltip_Reference.getTranslatedBrandedTooltip("tooltip.tile.windmill.0.name"); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java index 86ac7fc73d..233810028f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java @@ -26,11 +26,11 @@ import com.github.bartimaeusnek.bartworks.API.LoaderReference; import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import com.github.bartimaeusnek.bartworks.util.MegaUtils; import com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti; -import com.github.bartimaeusnek.crossmod.tectech.TecTechUtils; +import com.github.bartimaeusnek.crossmod.tectech.helper.TecTechUtils; import com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered.LowPowerLaser; import cpw.mods.fml.common.Optional; import gregtech.api.GregTech_API; @@ -91,7 +91,7 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_MetaTileEntity_ElectricBl String[] fdsc = new String[dsc.length + 1]; for (int i = 0; i < dsc.length; i++) { fdsc[i] = dsc[i]; - fdsc[dsc.length] = StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"; + fdsc[dsc.length] = BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get(); } return fdsc; } @@ -448,7 +448,7 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_MetaTileEntity_ElectricBl return false; if (LoaderReference.tectech && this.glasTier != 8) - if (!areLazorsLowPowa() || !areThingsProperlyTiered(this.getTecTechEnergyTunnels()) || !areThingsProperlyTiered(this.getTecTechEnergyMultis())) + if (!areLazorsLowPowa() || areThingsNotProperlyTiered(this.getTecTechEnergyTunnels()) || areThingsNotProperlyTiered(this.getTecTechEnergyMultis())) return false; if (this.glasTier != 8 && !this.mEnergyHatches.isEmpty()) @@ -461,12 +461,12 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_MetaTileEntity_ElectricBl @SuppressWarnings("rawtypes") @Optional.Method(modid = "tectech") - private boolean areThingsProperlyTiered(Collection collection) { + private boolean areThingsNotProperlyTiered(Collection collection) { if (!collection.isEmpty()) for (Object tecTechEnergyMulti : collection) if (((GT_MetaTileEntity_TieredMachineBlock) tecTechEnergyMulti).mTier > this.glasTier) - return false; - return true; + return true; + return false; } @SuppressWarnings("rawtypes") diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java index 33434bb9d6..1d565567a5 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java @@ -23,10 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega; import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; -import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; -import com.github.bartimaeusnek.bartworks.util.MathUtils; -import com.github.bartimaeusnek.bartworks.util.MegaUtils; +import com.github.bartimaeusnek.bartworks.util.*; import com.google.common.collect.ArrayListMultimap; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; @@ -38,7 +35,6 @@ import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DistillationTower; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; @@ -76,7 +72,7 @@ public class GT_TileEntity_MegaDistillTower extends GT_MetaTileEntity_Distillati "Fluids are only put out at the correct height", "The correct height equals the slot number in the NEI recipe", "Clean Stainless Steel Machine Casings for the rest (15 x h - 5 at least!)", - StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks" + BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() }; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java index 2d553a506e..6a3c6ae7ae 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaVacuumFreezer.java @@ -24,11 +24,11 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.multis.mega; import com.github.bartimaeusnek.bartworks.API.LoaderReference; import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import com.github.bartimaeusnek.bartworks.util.MegaUtils; import com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti; -import com.github.bartimaeusnek.crossmod.tectech.TecTechUtils; +import com.github.bartimaeusnek.crossmod.tectech.helper.TecTechUtils; import cpw.mods.fml.common.Optional; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -39,7 +39,6 @@ import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_VacuumFreezer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; import java.util.ArrayList; import java.util.List; @@ -58,13 +57,7 @@ public class GT_TileEntity_MegaVacuumFreezer extends GT_MetaTileEntity_VacuumFre } public String[] getDescription() { - String[] dsc = StatCollector.translateToLocal("tooltip.tile.mvf.0.name").split(";"); - String[] fdsc = new String[dsc.length + 1]; - for (int i = 0; i < dsc.length; i++) { - fdsc[i] = dsc[i]; - fdsc[dsc.length] = StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"; - } - return fdsc; + return BW_Tooltip_Reference.getTranslatedBrandedTooltip("tooltip.tile.mvf.0.name"); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java index 9d17accb06..3188ce4aa1 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_AcidGenerator.java @@ -23,6 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.tiered; import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures; @@ -109,6 +110,6 @@ public class GT_MetaTileEntity_AcidGenerator extends GT_MetaTileEntity_BasicGene } public String[] getDescription() { - return new String[]{StatCollector.translateToLocal("tooltip.tile.acidgen.0.name"), StatCollector.translateToLocal("tooltip.tile.acidgen.1.name"), StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], StatCollector.translateToLocal("tooltip.rotor.2.name") + " " + ChatColorHelper.YELLOW + this.getEfficiency(), StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesOut(), StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"}; + return new String[]{StatCollector.translateToLocal("tooltip.tile.acidgen.0.name"), StatCollector.translateToLocal("tooltip.tile.acidgen.1.name"), StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], StatCollector.translateToLocal("tooltip.rotor.2.name") + " " + ChatColorHelper.YELLOW + this.getEfficiency(), StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesOut(), BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()}; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java index fccba2ae65..149c9e09fd 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_BioLab.java @@ -268,6 +268,6 @@ public class GT_MetaTileEntity_BioLab extends GT_MetaTileEntity_BasicMachine { @Override public String[] getDescription() { - return new String[]{StatCollector.translateToLocal("tooltip.tile.biolab.0.name"), StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"}; + return new String[]{StatCollector.translateToLocal("tooltip.tile.biolab.0.name"), BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()}; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java index 3d82290fac..28e4bd2d7f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_Diode.java @@ -23,6 +23,7 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.tiered; import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.ITexture; @@ -123,6 +124,6 @@ public class GT_MetaTileEntity_Diode extends GT_MetaTileEntity_BasicHull { @SuppressWarnings("deprecation") public String[] getDescription() { - return new String[]{this.mDescription, StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], StatCollector.translateToLocal("tooltip.tile.tiereddsc.1.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesIn(), StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesOut(), StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"}; + return new String[]{this.mDescription, StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], StatCollector.translateToLocal("tooltip.tile.tiereddsc.1.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesIn(), StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesOut(), BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()}; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java index eb19af2040..e011d08609 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_EnergyDistributor.java @@ -22,6 +22,7 @@ package com.github.bartimaeusnek.bartworks.common.tileentities.tiered; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.ITexture; @@ -70,7 +71,7 @@ public class GT_MetaTileEntity_EnergyDistributor extends GT_MetaTileEntity_Trans } public String[] getDescription() { - return new String[]{StatCollector.translateToLocal("tooltip.tile.energydistributor.0.name"), StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], StatCollector.translateToLocal("tooltip.tile.tiereddsc.1.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesIn(), StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesOut(), StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"}; + return new String[]{StatCollector.translateToLocal("tooltip.tile.energydistributor.0.name"), StatCollector.translateToLocal("tooltip.tile.tiereddsc.0.name") + " " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], StatCollector.translateToLocal("tooltip.tile.tiereddsc.1.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesIn(), StatCollector.translateToLocal("tooltip.tile.tiereddsc.2.name") + " " + ChatColorHelper.YELLOW + this.maxAmperesOut(), BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()}; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java index 9b6154b4aa..40b6904c02 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/tiered/GT_MetaTileEntity_RadioHatch.java @@ -29,10 +29,9 @@ import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_RadioHatch; import com.github.bartimaeusnek.bartworks.server.container.GT_Container_RadioHatch; import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.MathUtils; import com.github.bartimaeusnek.crossmod.GTpp.loader.RadioHatchCompat; -import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; @@ -62,7 +61,7 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch { private byte coverage; public GT_MetaTileEntity_RadioHatch(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, new String[]{StatCollector.translateToLocal("tooltip.tile.radhatch.0.name"), StatCollector.translateToLocal("tooltip.tile.tiereddsc.3.name") + " " + (aTier - 2) + " " + ((aTier - 2) >= 2 ? StatCollector.translateToLocal("tooltip.bw.kg.1.name") : StatCollector.translateToLocal("tooltip.bw.kg.0.name")), StatCollector.translateToLocal("tooltip.tile.radhatch.1.name"), StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"}); + super(aID, aName, aNameRegional, aTier, 1, new String[]{StatCollector.translateToLocal("tooltip.tile.radhatch.0.name"), StatCollector.translateToLocal("tooltip.tile.tiereddsc.3.name") + " " + (aTier - 2) + " " + ((aTier - 2) >= 2 ? StatCollector.translateToLocal("tooltip.bw.kg.1.name") : StatCollector.translateToLocal("tooltip.bw.kg.0.name")), StatCollector.translateToLocal("tooltip.tile.radhatch.1.name"), BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()}); this.cap = aTier - 2; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java index 677a9af5f7..c54667c431 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/neiHandler/BW_NEI_OreHandler.java @@ -74,10 +74,10 @@ public class BW_NEI_OreHandler extends TemplateRecipeHandler { public void loadCraftingRecipes(String outputId, Object... results) { if (outputId.equalsIgnoreCase("quickanddirtyneihandler")) { HashSet result = new HashSet<>(); - Werkstoff.werkstoffHashSet.stream().filter(w -> w.getGenerationFeatures().hasOres()).forEach(w -> result.add(w.get(OrePrefixes.ore))); + Werkstoff.werkstoffHashSet.stream().filter(w -> w.hasGenerationFeature(OrePrefixes.ore)).forEach(w -> result.add(w.get(OrePrefixes.ore))); result.forEach(this::loadCraftingRecipes); result.clear(); - Werkstoff.werkstoffHashSet.stream().filter(w -> w.getGenerationFeatures().hasOres()).forEach(w -> result.add(w.get(OrePrefixes.oreSmall))); + Werkstoff.werkstoffHashSet.stream().filter(w -> w.hasGenerationFeature(OrePrefixes.ore)).forEach(w -> result.add(w.get(OrePrefixes.oreSmall))); result.forEach(this::loadCraftingRecipes); result.clear(); HashSet hashSet = new HashSet<>(this.arecipes); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java new file mode 100644 index 0000000000..f22d9ac470 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_GT_MaterialReference.java @@ -0,0 +1,644 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package com.github.bartimaeusnek.bartworks.system.material; + +import com.github.bartimaeusnek.bartworks.MainMod; +import gregtech.api.enums.Materials; +import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.Types.*; + +public class BW_GT_MaterialReference { + private static final Werkstoff.GenerationFeatures ADD_CASINGS_ONLY = new Werkstoff.GenerationFeatures().disable().addCasings(); + + public static Werkstoff Aluminium = new Werkstoff(Materials.Aluminium, ADD_CASINGS_ONLY, ELEMENT,31_766+19); + public static Werkstoff Americium = new Werkstoff(Materials.Americium, ADD_CASINGS_ONLY, ELEMENT,31_766+103); + public static Werkstoff Antimony = new Werkstoff(Materials.Antimony, ADD_CASINGS_ONLY, ELEMENT, 31_766+58); +// public static Werkstoff Argon = new Werkstoff(Materials.Argon, ADD_CASINGS_ONLY, ELEMENT, 31_766+24); + public static Werkstoff Arsenic = new Werkstoff(Materials.Arsenic, ADD_CASINGS_ONLY, ELEMENT, 31_766+39); + public static Werkstoff Barium = new Werkstoff(Materials.Barium, ADD_CASINGS_ONLY, ELEMENT, 31_766+63); + public static Werkstoff Beryllium = new Werkstoff(Materials.Beryllium, ADD_CASINGS_ONLY, ELEMENT, 31_766+8); + public static Werkstoff Bismuth = new Werkstoff(Materials.Bismuth, ADD_CASINGS_ONLY, ELEMENT, 31_766+90); + public static Werkstoff Boron = new Werkstoff(Materials.Boron, ADD_CASINGS_ONLY, ELEMENT, 31_766+9); + public static Werkstoff Caesium = new Werkstoff(Materials.Caesium, ADD_CASINGS_ONLY, ELEMENT, 31_766+62); +// public static Werkstoff Calcium = new Werkstoff(Materials.Calcium, ADD_CASINGS_ONLY, ELEMENT, 31_766+26); + public static Werkstoff Carbon = new Werkstoff(Materials.Carbon, ADD_CASINGS_ONLY, ELEMENT, 31_766+10); + public static Werkstoff Cadmium = new Werkstoff(Materials.Cadmium, ADD_CASINGS_ONLY, ELEMENT, 31_766+55); + public static Werkstoff Cerium = new Werkstoff(Materials.Cerium, ADD_CASINGS_ONLY, ELEMENT, 31_766+65); +// public static Werkstoff Chlorine = new Werkstoff(Materials.Chlorine, ADD_CASINGS_ONLY, ELEMENT, 31_766+23); + public static Werkstoff Chrome = new Werkstoff(Materials.Chrome, ADD_CASINGS_ONLY, ELEMENT, 31_766+30); + public static Werkstoff Cobalt = new Werkstoff(Materials.Cobalt, ADD_CASINGS_ONLY, ELEMENT, 31_766+33); + public static Werkstoff Copper = new Werkstoff(Materials.Copper, ADD_CASINGS_ONLY, ELEMENT, 31_766+35); +// public static Werkstoff Deuterium = new Werkstoff(Materials.Deuterium, ADD_CASINGS_ONLY, ELEMENT, 31_766+2); + public static Werkstoff Dysprosium = new Werkstoff(Materials.Dysprosium, ADD_CASINGS_ONLY, ELEMENT, 31_766+73); +// public static Werkstoff Empty = new Werkstoff(Materials.Empty, ADD_CASINGS_ONLY, ELEMENT, 31_766+0); + public static Werkstoff Erbium = new Werkstoff(Materials.Erbium, ADD_CASINGS_ONLY, ELEMENT, 31_766+75); + public static Werkstoff Europium = new Werkstoff(Materials.Europium, ADD_CASINGS_ONLY, ELEMENT, 31_766+70); +// public static Werkstoff Fluorine = new Werkstoff(Materials.Fluorine, ADD_CASINGS_ONLY, ELEMENT, 31_766+14); + public static Werkstoff Gadolinium = new Werkstoff(Materials.Gadolinium, ADD_CASINGS_ONLY, ELEMENT, 31_766+71); + public static Werkstoff Gallium = new Werkstoff(Materials.Gallium, ADD_CASINGS_ONLY, ELEMENT, 31_766+37); + public static Werkstoff Gold = new Werkstoff(Materials.Gold, ADD_CASINGS_ONLY, ELEMENT, 31_766+86); + public static Werkstoff Holmium = new Werkstoff(Materials.Holmium, ADD_CASINGS_ONLY, ELEMENT, 31_766+74); +// public static Werkstoff Hydrogen = new Werkstoff(Materials.Hydrogen, ADD_CASINGS_ONLY, ELEMENT, 31_766+1); +// public static Werkstoff Helium = new Werkstoff(Materials.Helium, ADD_CASINGS_ONLY, ELEMENT, 31_766+4); +// public static Werkstoff Helium_3 = new Werkstoff(Materials.Helium_3, ADD_CASINGS_ONLY, ELEMENT, 31_766+5); + public static Werkstoff Indium = new Werkstoff(Materials.Indium, ADD_CASINGS_ONLY, ELEMENT, 31_766+56); + public static Werkstoff Iridium = new Werkstoff(Materials.Iridium, ADD_CASINGS_ONLY, ELEMENT, 31_766+84); + public static Werkstoff Iron = new Werkstoff(Materials.Iron, ADD_CASINGS_ONLY, ELEMENT, 31_766+32); + public static Werkstoff Lanthanum = new Werkstoff(Materials.Lanthanum, ADD_CASINGS_ONLY, ELEMENT, 31_766+64); + public static Werkstoff Lead = new Werkstoff(Materials.Lead, ADD_CASINGS_ONLY, ELEMENT, 31_766+89); + public static Werkstoff Lithium = new Werkstoff(Materials.Lithium, ADD_CASINGS_ONLY, ELEMENT, 31_766+6); + public static Werkstoff Lutetium = new Werkstoff(Materials.Lutetium, ADD_CASINGS_ONLY, ELEMENT, 31_766+78); + public static Werkstoff Magnesium = new Werkstoff(Materials.Magnesium, ADD_CASINGS_ONLY, ELEMENT, 31_766+18); + public static Werkstoff Manganese = new Werkstoff(Materials.Manganese, ADD_CASINGS_ONLY, ELEMENT, 31_766+31); +// public static Werkstoff Mercury = new Werkstoff(Materials.Mercury, ADD_CASINGS_ONLY, ELEMENT, 31_766+87); + public static Werkstoff Molybdenum = new Werkstoff(Materials.Molybdenum, ADD_CASINGS_ONLY, ELEMENT, 31_766+48); + public static Werkstoff Neodymium = new Werkstoff(Materials.Neodymium, ADD_CASINGS_ONLY, ELEMENT, 31_766+67); + public static Werkstoff Neutronium = new Werkstoff(Materials.Neutronium, ADD_CASINGS_ONLY, ELEMENT,31_766+129); + public static Werkstoff Nickel = new Werkstoff(Materials.Nickel, ADD_CASINGS_ONLY, ELEMENT, 31_766+34); + public static Werkstoff Niobium = new Werkstoff(Materials.Niobium, ADD_CASINGS_ONLY, ELEMENT, 31_766+47); +// public static Werkstoff Nitrogen = new Werkstoff(Materials.Nitrogen, ADD_CASINGS_ONLY, ELEMENT, 31_766+12); + public static Werkstoff Osmium = new Werkstoff(Materials.Osmium, ADD_CASINGS_ONLY, ELEMENT, 31_766+83); +// public static Werkstoff Oxygen = new Werkstoff(Materials.Oxygen, ADD_CASINGS_ONLY, ELEMENT, 31_766+13); + public static Werkstoff Palladium = new Werkstoff(Materials.Palladium, ADD_CASINGS_ONLY, ELEMENT, 31_766+52); + public static Werkstoff Phosphorus = new Werkstoff(Materials.Phosphorus, ADD_CASINGS_ONLY, ELEMENT, 31_766+21); + public static Werkstoff Platinum = new Werkstoff(Materials.Platinum, ADD_CASINGS_ONLY, ELEMENT, 31_766+85); + public static Werkstoff Plutonium = new Werkstoff(Materials.Plutonium, ADD_CASINGS_ONLY, ELEMENT,31_766+100); + public static Werkstoff Plutonium241 = new Werkstoff(Materials.Plutonium241, ADD_CASINGS_ONLY, ISOTOPE,31_766+101); + public static Werkstoff Potassium = new Werkstoff(Materials.Potassium, ADD_CASINGS_ONLY, ELEMENT, 31_766+25); + public static Werkstoff Praseodymium = new Werkstoff(Materials.Praseodymium, ADD_CASINGS_ONLY, ELEMENT, 31_766+66); + public static Werkstoff Promethium = new Werkstoff(Materials.Promethium, ADD_CASINGS_ONLY, ELEMENT, 31_766+68); +// public static Werkstoff Radon = new Werkstoff(Materials.Radon, ADD_CASINGS_ONLY, ELEMENT, 31_766+93); + public static Werkstoff Rubidium = new Werkstoff(Materials.Rubidium, ADD_CASINGS_ONLY, ELEMENT, 31_766+43); + public static Werkstoff Samarium = new Werkstoff(Materials.Samarium, ADD_CASINGS_ONLY, ELEMENT, 31_766+69); + public static Werkstoff Scandium = new Werkstoff(Materials.Scandium, ADD_CASINGS_ONLY, ELEMENT, 31_766+27); + public static Werkstoff Silicon = new Werkstoff(Materials.Silicon, ADD_CASINGS_ONLY, ELEMENT, 31_766+20); + public static Werkstoff Silver = new Werkstoff(Materials.Silver, ADD_CASINGS_ONLY, ELEMENT, 31_766+54); + public static Werkstoff Sodium = new Werkstoff(Materials.Sodium, ADD_CASINGS_ONLY, ELEMENT, 31_766+17); + public static Werkstoff Strontium = new Werkstoff(Materials.Strontium, ADD_CASINGS_ONLY, ELEMENT, 31_766+44); + public static Werkstoff Sulfur = new Werkstoff(Materials.Sulfur, ADD_CASINGS_ONLY, ELEMENT, 31_766+22); + public static Werkstoff Tantalum = new Werkstoff(Materials.Tantalum, ADD_CASINGS_ONLY, ELEMENT, 31_766+80); +// public static Werkstoff Tellurium = new Werkstoff(Materials.Tellurium, ADD_CASINGS_ONLY, ELEMENT, 31_766+59); + public static Werkstoff Terbium = new Werkstoff(Materials.Terbium, ADD_CASINGS_ONLY, ELEMENT, 31_766+72); + public static Werkstoff Thorium = new Werkstoff(Materials.Thorium, ADD_CASINGS_ONLY, ELEMENT, 31_766+96); + public static Werkstoff Thulium = new Werkstoff(Materials.Thulium, ADD_CASINGS_ONLY, ELEMENT, 31_766+76); + public static Werkstoff Tin = new Werkstoff(Materials.Tin, ADD_CASINGS_ONLY, ELEMENT, 31_766+57); + public static Werkstoff Titanium = new Werkstoff(Materials.Titanium, ADD_CASINGS_ONLY, ELEMENT, 31_766+28); + public static Werkstoff Tritanium = new Werkstoff(Materials.Tritanium, ADD_CASINGS_ONLY, ELEMENT,31_766+329); + public static Werkstoff Tritium = new Werkstoff(Materials.Tritium, ADD_CASINGS_ONLY, ELEMENT, 31_766+3); + public static Werkstoff Tungsten = new Werkstoff(Materials.Tungsten, ADD_CASINGS_ONLY, ELEMENT, 31_766+81); + public static Werkstoff Uranium = new Werkstoff(Materials.Uranium, ADD_CASINGS_ONLY, ELEMENT, 31_766+98); + public static Werkstoff Uranium235 = new Werkstoff(Materials.Uranium235, ADD_CASINGS_ONLY, ISOTOPE, 31_766+97); + public static Werkstoff Vanadium = new Werkstoff(Materials.Vanadium, ADD_CASINGS_ONLY, ELEMENT, 31_766+29); + public static Werkstoff Ytterbium = new Werkstoff(Materials.Ytterbium, ADD_CASINGS_ONLY, ELEMENT, 31_766+77); + public static Werkstoff Yttrium = new Werkstoff(Materials.Yttrium, ADD_CASINGS_ONLY, ELEMENT, 31_766+45); + public static Werkstoff Zinc = new Werkstoff(Materials.Zinc, ADD_CASINGS_ONLY, ELEMENT, 31_766+36); + public static Werkstoff Ardite = new Werkstoff(Materials.Ardite, ADD_CASINGS_ONLY, ELEMENT,31_766+382); + public static Werkstoff Naquadah = new Werkstoff(Materials.Naquadah, ADD_CASINGS_ONLY, ELEMENT,31_766+324); + public static Werkstoff NaquadahAlloy = new Werkstoff(Materials.NaquadahAlloy, ADD_CASINGS_ONLY, COMPOUND,31_766+325); + public static Werkstoff NaquadahEnriched = new Werkstoff(Materials.NaquadahEnriched, ADD_CASINGS_ONLY, ISOTOPE,31_766+326); + public static Werkstoff Naquadria = new Werkstoff(Materials.Naquadria, ADD_CASINGS_ONLY, ELEMENT,31_766+327); + public static Werkstoff WroughtIron = new Werkstoff(Materials.WroughtIron, ADD_CASINGS_ONLY, ISOTOPE,31_766+304); + public static Werkstoff AnnealedCopper = new Werkstoff(Materials.AnnealedCopper, ADD_CASINGS_ONLY, ISOTOPE,31_766+345); + + public static Werkstoff Osmiridium = new Werkstoff(Materials.Osmiridium, ADD_CASINGS_ONLY, MIXTURE,31_766+317); + public static Werkstoff SterlingSilver = new Werkstoff(Materials.SterlingSilver, ADD_CASINGS_ONLY, MIXTURE,31_766+350); + public static Werkstoff RoseGold = new Werkstoff(Materials.RoseGold, ADD_CASINGS_ONLY, MIXTURE,31_766+351); + public static Werkstoff BlackBronze = new Werkstoff(Materials.BlackBronze, ADD_CASINGS_ONLY, MIXTURE,31_766+352); + public static Werkstoff BismuthBronze = new Werkstoff(Materials.BismuthBronze, ADD_CASINGS_ONLY, MIXTURE,31_766+353); + public static Werkstoff BlackSteel = new Werkstoff(Materials.BlackSteel, ADD_CASINGS_ONLY, MIXTURE,31_766+334); + public static Werkstoff RedSteel = new Werkstoff(Materials.RedSteel, ADD_CASINGS_ONLY, MIXTURE,31_766+348); + public static Werkstoff BlueSteel = new Werkstoff(Materials.BlueSteel, ADD_CASINGS_ONLY, MIXTURE,31_766+349); + public static Werkstoff DamascusSteel = new Werkstoff(Materials.DamascusSteel, ADD_CASINGS_ONLY, MIXTURE,31_766+335); + public static Werkstoff TungstenSteel = new Werkstoff(Materials.TungstenSteel, ADD_CASINGS_ONLY, MIXTURE,31_766+316); + public static Werkstoff Ultimet = new Werkstoff(Materials.Ultimet, ADD_CASINGS_ONLY, MIXTURE,31_766+344); + public static Werkstoff TungstenCarbide = new Werkstoff(Materials.TungstenCarbide, ADD_CASINGS_ONLY, MIXTURE,31_766+370); + public static Werkstoff VanadiumSteel = new Werkstoff(Materials.VanadiumSteel, ADD_CASINGS_ONLY, MIXTURE,31_766+371); + public static Werkstoff HSSG = new Werkstoff(Materials.HSSG, ADD_CASINGS_ONLY, MIXTURE,31_766+372); + public static Werkstoff HSSE = new Werkstoff(Materials.HSSE, ADD_CASINGS_ONLY, MIXTURE,31_766+373); + public static Werkstoff HSSS = new Werkstoff(Materials.HSSS, ADD_CASINGS_ONLY, MIXTURE,31_766+374); + public static Werkstoff StainlessSteel = new Werkstoff(Materials.StainlessSteel, ADD_CASINGS_ONLY, MIXTURE,31_766+306); + public static Werkstoff Brass = new Werkstoff(Materials.Brass, ADD_CASINGS_ONLY, MIXTURE,31_766+301); + public static Werkstoff Bronze = new Werkstoff(Materials.Bronze, ADD_CASINGS_ONLY, MIXTURE,31_766+300); + + public static Werkstoff Wood = new Werkstoff(Materials.Wood, ADD_CASINGS_ONLY, BIOLOGICAL,31_766+809); + // public static Werkstoff WoodSealed = new Werkstoff(Materials.WoodSealed, ADD_CASINGS_ONLY, BIOLOGICAL,31_766+889); + public static Werkstoff Cheese = new Werkstoff(Materials.Cheese, new Werkstoff.GenerationFeatures().addCasings().addMetalItems().addMultipleIngotMetalWorkingItems().enforceUnification(), BIOLOGICAL,31_766+894); + + public static Werkstoff Steel = new Werkstoff(Materials.Steel, ADD_CASINGS_ONLY, COMPOUND,31_766+305); + public static Werkstoff Polytetrafluoroethylene = new Werkstoff(Materials.Polytetrafluoroethylene, ADD_CASINGS_ONLY, COMPOUND,31_766+473); + public static Werkstoff Plastic = new Werkstoff(Materials.Plastic, ADD_CASINGS_ONLY, COMPOUND,31_766+874); + public static Werkstoff Epoxid = new Werkstoff(Materials.Epoxid, ADD_CASINGS_ONLY, COMPOUND,31_766+470); + + public static void init() { + MainMod.LOGGER.info("Load Elements from GT"); + } + +// TODO: GT++ only? + +// public static Werkstoff Flerovium = new Werkstoff(Materials.Flerovium, , ,31_766+984); + +// public static Werkstoff HeeEndium = new Werkstoff(Materials.HeeEndium, , ,31_766+770); +// public static Werkstoff PlatinumGroupSludge = new Werkstoff(Materials.PlatinumGroupSludge, , ,31_766+241); +// public static Werkstoff Draconium = new Werkstoff(Materials.Draconium, , ,31_766+975); +// public static Werkstoff DraconiumAwakened = new Werkstoff(Materials.DraconiumAwakened, , ,31_766+976); +// public static Werkstoff Adamantium = new Werkstoff(Materials.Adamantium, , ,31_766+319); +// public static Werkstoff Alduorite = new Werkstoff(Materials.Alduorite, , ,31_766+485); +// public static Werkstoff Amber = new Werkstoff(Materials.Amber, , ,31_766+514); +// public static Werkstoff Angmallen = new Werkstoff(Materials.Angmallen, , ,31_766+958); + +// public static Werkstoff Atlarus = new Werkstoff(Materials.Atlarus, , ,31_766+965); +// public static Werkstoff Blizz = new Werkstoff(Materials.Blizz, , ,31_766+851); +// public static Werkstoff Blueschist = new Werkstoff(Materials.Blueschist, , ,31_766+852); +// public static Werkstoff Bluestone = new Werkstoff(Materials.Bluestone, , ,31_766+813); +// public static Werkstoff Carmot = new Werkstoff(Materials.Carmot, , ,31_766+962); +// public static Werkstoff Celenegil = new Werkstoff(Materials.Celenegil, , ,31_766+964); +// public static Werkstoff CertusQuartz = new Werkstoff(Materials.CertusQuartz, , ,31_766+516); +// public static Werkstoff Ceruclase = new Werkstoff(Materials.Ceruclase, , ,31_766+952); +// public static Werkstoff CobaltHexahydrate = new Werkstoff(Materials.CobaltHexahydrate, , ,31_766+853); +// public static Werkstoff ConstructionFoam = new Werkstoff(Materials.ConstructionFoam, , ,31_766+854); +// public static Werkstoff Chert = new Werkstoff(Materials.Chert, , ,31_766+857); +// public static Werkstoff CrudeOil = new Werkstoff(Materials.CrudeOil, , ,31_766+858); +// public static Werkstoff Dacite = new Werkstoff(Materials.Dacite, , ,31_766+859); +// public static Werkstoff DarkIron = new Werkstoff(Materials.DarkIron, , ,31_766+342); +// public static Werkstoff Desh = new Werkstoff(Materials.Desh, , ,31_766+884); +// public static Werkstoff Dilithium = new Werkstoff(Materials.Dilithium, , ,31_766+515); +// public static Werkstoff Duranium = new Werkstoff(Materials.Duranium, , ,31_766+328); +// public static Werkstoff Eclogite = new Werkstoff(Materials.Eclogite, , ,31_766+860); +// public static Werkstoff ElectrumFlux = new Werkstoff(Materials.ElectrumFlux, , ,31_766+320); +// public static Werkstoff Emery = new Werkstoff(Materials.Emery, , ,31_766+861); +// public static Werkstoff EnderiumBase = new Werkstoff(Materials.EnderiumBase, , ,31_766+380); +// public static Werkstoff Epidote = new Werkstoff(Materials.Epidote, , ,31_766+862); +// public static Werkstoff Eximite = new Werkstoff(Materials.Eximite, , ,31_766+959); +// public static Werkstoff FierySteel = new Werkstoff(Materials.FierySteel, , ,31_766+346); +// public static Werkstoff Firestone = new Werkstoff(Materials.Firestone, , ,31_766+347); +// public static Werkstoff FoolsRuby = new Werkstoff(Materials.FoolsRuby, , ,31_766+512); +// public static Werkstoff Force = new Werkstoff(Materials.Force, , ,31_766+521); +// public static Werkstoff Forcicium = new Werkstoff(Materials.Forcicium, , ,31_766+518); +// public static Werkstoff Forcillium = new Werkstoff(Materials.Forcillium, , ,31_766+519); +// public static Werkstoff Gabbro = new Werkstoff(Materials.Gabbro, , ,31_766+863); +// public static Werkstoff Glowstone = new Werkstoff(Materials.Glowstone, , ,31_766+811); +// public static Werkstoff Gneiss = new Werkstoff(Materials.Gneiss, , ,31_766+864); +// public static Werkstoff Graphite = new Werkstoff(Materials.Graphite, , ,31_766+865); +// public static Werkstoff Graphene = new Werkstoff(Materials.Graphene, , ,31_766+819); +// public static Werkstoff Greenschist = new Werkstoff(Materials.Greenschist, , ,31_766+866); +// public static Werkstoff Greenstone = new Werkstoff(Materials.Greenstone, , ,31_766+867); +// public static Werkstoff Greywacke = new Werkstoff(Materials.Greywacke, , ,31_766+897); +// public static Werkstoff Haderoth = new Werkstoff(Materials.Haderoth, , ,31_766+963); +// public static Werkstoff Hepatizon = new Werkstoff(Materials.Hepatizon, , ,31_766+957); +// public static Werkstoff HSLA = new Werkstoff(Materials.HSLA, , ,31_766+322); +// public static Werkstoff Ignatius = new Werkstoff(Materials.Ignatius, , ,31_766+950); +// public static Werkstoff Infuscolium = new Werkstoff(Materials.Infuscolium, , ,31_766+490); +// public static Werkstoff InfusedGold = new Werkstoff(Materials.InfusedGold, , ,31_766+323); +// public static Werkstoff InfusedAir = new Werkstoff(Materials.InfusedAir, , ,31_766+540); +// public static Werkstoff InfusedFire = new Werkstoff(Materials.InfusedFire, , ,31_766+541); +// public static Werkstoff InfusedEarth = new Werkstoff(Materials.InfusedEarth, , ,31_766+542); +// public static Werkstoff InfusedWater = new Werkstoff(Materials.InfusedWater, , ,31_766+543); +// public static Werkstoff InfusedEntropy = new Werkstoff(Materials.InfusedEntropy, , ,31_766+544); +// public static Werkstoff InfusedOrder = new Werkstoff(Materials.InfusedOrder, , ,31_766+545); +// public static Werkstoff Inolashite = new Werkstoff(Materials.Inolashite, , ,31_766+954); +// public static Werkstoff Jade = new Werkstoff(Materials.Jade, , ,31_766+537); +// public static Werkstoff Jasper = new Werkstoff(Materials.Jasper, , ,31_766+511); +// public static Werkstoff Kalendrite = new Werkstoff(Materials.Kalendrite, , ,31_766+953); +// public static Werkstoff Komatiite = new Werkstoff(Materials.Komatiite, , ,31_766+869); +// public static Werkstoff Lava = new Werkstoff(Materials.Lava, , ,31_766+700); +// public static Werkstoff Lemurite = new Werkstoff(Materials.Lemurite, , ,31_766+486); +// public static Werkstoff MeteoricIron = new Werkstoff(Materials.MeteoricIron, , ,31_766+340); +// public static Werkstoff MeteoricSteel = new Werkstoff(Materials.MeteoricSteel, , ,31_766+341); +// public static Werkstoff Meutoite = new Werkstoff(Materials.Meutoite, , ,31_766+487); +// public static Werkstoff Migmatite = new Werkstoff(Materials.Migmatite, , ,31_766+872); + +// public static Werkstoff NetherBrick = new Werkstoff(Materials.NetherBrick, , ,31_766+814); +// public static Werkstoff NetherQuartz = new Werkstoff(Materials.NetherQuartz, , ,31_766+522); +// public static Werkstoff NetherStar = new Werkstoff(Materials.NetherStar, , ,31_766+506); +// public static Werkstoff Oilsands = new Werkstoff(Materials.Oilsands, , ,31_766+878); +// public static Werkstoff Orichalcum = new Werkstoff(Materials.Orichalcum, , ,31_766+966); +// public static Werkstoff Oureclase = new Werkstoff(Materials.Oureclase, , ,31_766+961); +// public static Werkstoff Prometheum = new Werkstoff(Materials.Prometheum, , ,31_766+960); +// public static Werkstoff Quartzite = new Werkstoff(Materials.Quartzite, , ,31_766+523); +// public static Werkstoff Rhyolite = new Werkstoff(Materials.Rhyolite, , ,31_766+875); +// public static Werkstoff Rubracium = new Werkstoff(Materials.Rubracium, , ,31_766+488); +// public static Werkstoff Sanguinite = new Werkstoff(Materials.Sanguinite, , ,31_766+955); +// public static Werkstoff Siltstone = new Werkstoff(Materials.Siltstone, , ,31_766+876); +// public static Werkstoff Tartarite = new Werkstoff(Materials.Tartarite, , ,31_766+956); +// public static Werkstoff UUAmplifier = new Werkstoff(Materials.UUAmplifier, , ,31_766+721); +// public static Werkstoff UUMatter = new Werkstoff(Materials.UUMatter, , ,31_766+703); +// public static Werkstoff Void = new Werkstoff(Materials.Void, , ,31_766+970); +// public static Werkstoff Vulcanite = new Werkstoff(Materials.Vulcanite, , ,31_766+489); +// public static Werkstoff Vyroxeres = new Werkstoff(Materials.Vyroxeres, , ,31_766+951); +// public static Werkstoff BioFuel = new Werkstoff(Materials.BioFuel, , ,31_766+705); +// public static Werkstoff Biomass = new Werkstoff(Materials.Biomass, , ,31_766+704); +// public static CharcoalByproducts = new MaterialBuilder + +// public static Werkstoff Chili = new Werkstoff(Materials.Chili, , ,31_766+895); +// public static Werkstoff Chocolate = new Werkstoff(Materials.Chocolate, , ,31_766+886); +// public static Werkstoff CoalFuel = new Werkstoff(Materials.CoalFuel, , ,31_766+710); +// public static Werkstoff Cocoa = new Werkstoff(Materials.Cocoa, , ,31_766+887); +// public static Werkstoff Coffee = new Werkstoff(Materials.Coffee, , ,31_766+888); +// public static Werkstoff Creosote = new Werkstoff(Materials.Creosote, , ,31_766+712); +// public static Werkstoff Ethanol = new Werkstoff(Materials.Ethanol, , ,31_766+706); +// public static FermentedBiomass = new MaterialBuilder +// public static Werkstoff Fuel = new Werkstoff(Materials.Fuel, , ,31_766+708); +// public static Werkstoff Glue = new Werkstoff(Materials.Glue, , ,31_766+726); +// public static Werkstoff Gunpowder = new Werkstoff(Materials.Gunpowder, , ,31_766+800); +// public static Werkstoff FryingOilHot = new Werkstoff(Materials.FryingOilHot, , ,31_766+727); +// public static Werkstoff Honey = new Werkstoff(Materials.Honey, , ,31_766+725); +// public static Werkstoff Lubricant = new Werkstoff(Materials.Lubricant, , ,31_766+724); +// public static Werkstoff McGuffium239 = new Werkstoff(Materials.McGuffium239, , ,31_766+999); +// public static Werkstoff MeatRaw = new Werkstoff(Materials.MeatRaw, , ,31_766+892); +// public static Werkstoff MeatCooked = new Werkstoff(Materials.MeatCooked, , ,31_766+893); +// public static Werkstoff Milk = new Werkstoff(Materials.Milk, , ,31_766+885); +// public static Werkstoff Oil = new Werkstoff(Materials.Oil, , ,31_766+707); +// public static Werkstoff Paper = new Werkstoff(Materials.Paper, , ,31_766+879); +// public static Werkstoff RareEarth = new Werkstoff(Materials.RareEarth, , ,31_766+891); +// public static Werkstoff Reinforced = new Werkstoff(Materials.Reinforced, , ,31_766+383); +// public static Werkstoff SeedOil = new Werkstoff(Materials.SeedOil, , ,31_766+713); +// public static Werkstoff SeedOilHemp = new Werkstoff(Materials.SeedOilHemp, , ,31_766+722); +// public static Werkstoff SeedOilLin = new Werkstoff(Materials.SeedOilLin, , ,31_766+723); +// public static Werkstoff Stone = new Werkstoff(Materials.Stone, , ,31_766+299); +// public static Werkstoff Unstable = new Werkstoff(Materials.Unstable, , ,31_766+396); +// public static Vinegar = new MaterialBuilder +// public static Werkstoff Wheat = new Werkstoff(Materials.Wheat, , ,31_766+881); +// public static WoodGas = new MaterialBuilder +// public static WoodTar = new MaterialBuilder +// public static WoodVinegar = new MaterialBuilder + +// public static Werkstoff Sunnarium = new Werkstoff(Materials.Sunnarium, , ,31_766+318); +// public static Werkstoff Endstone = new Werkstoff(Materials.Endstone, , ,31_766+808); +// public static Werkstoff Netherrack = new Werkstoff(Materials.Netherrack, , ,31_766+807); +// public static Werkstoff Methane = new Werkstoff(Materials.Methane, , ,31_766+715); +// public static Werkstoff CarbonDioxide = new Werkstoff(Materials.CarbonDioxide, , ,31_766+497); +// public static Werkstoff NobleGases = new Werkstoff(Materials.NobleGases, , ,31_766+496); +// public static Werkstoff LiquidAir = new Werkstoff(Materials.LiquidAir, , ,31_766+495); +// public static Werkstoff LiquidNitrogen = new Werkstoff(Materials.LiquidNitrogen, , ,31_766+494); +// public static Werkstoff LiquidOxygen = new Werkstoff(Materials.LiquidOxygen, , ,31_766+493); +// public static Werkstoff Almandine = new Werkstoff(Materials.Almandine, , ,31_766+820); +// public static Werkstoff Andradite = new Werkstoff(Materials.Andradite, , ,31_766+821); + +// public static Werkstoff Asbestos = new Werkstoff(Materials.Asbestos, , ,31_766+946); +// public static Werkstoff Ash = new Werkstoff(Materials.Ash, , ,31_766+815); +// public static Werkstoff BandedIron = new Werkstoff(Materials.BandedIron, , ,31_766+917); +// public static Werkstoff BatteryAlloy = new Werkstoff(Materials.BatteryAlloy, , ,31_766+315); +// public static Werkstoff BlueTopaz = new Werkstoff(Materials.BlueTopaz, , ,31_766+513); +// public static Werkstoff Bone = new Werkstoff(Materials.Bone, , ,31_766+806); + +// public static Werkstoff BrownLimonite = new Werkstoff(Materials.BrownLimonite, , ,31_766+930); +// public static Werkstoff Calcite = new Werkstoff(Materials.Calcite, , ,31_766+823); +// public static Werkstoff Cassiterite = new Werkstoff(Materials.Cassiterite, , ,31_766+824); +// public static Werkstoff CassiteriteSand = new Werkstoff(Materials.CassiteriteSand, , ,31_766+937); +// public static Werkstoff Chalcopyrite = new Werkstoff(Materials.Chalcopyrite, , ,31_766+855); +// public static Werkstoff Charcoal = new Werkstoff(Materials.Charcoal, , ,31_766+536); +// public static Werkstoff Chromite = new Werkstoff(Materials.Chromite, , ,31_766+825); +// public static Werkstoff ChromiumDioxide = new Werkstoff(Materials.ChromiumDioxide, , ,31_766+361); +// public static Werkstoff Cinnabar = new Werkstoff(Materials.Cinnabar, , ,31_766+826); +// public static Werkstoff Water = new Werkstoff(Materials.Water, , ,31_766+701); +// public static Werkstoff Clay = new Werkstoff(Materials.Clay, , ,31_766+805); +// public static Werkstoff Coal = new Werkstoff(Materials.Coal, , ,31_766+535); +// public static Werkstoff Cobaltite = new Werkstoff(Materials.Cobaltite, , ,31_766+827); +// public static Werkstoff Cooperite = new Werkstoff(Materials.Cooperite, , ,31_766+828); +// public static Werkstoff Cupronickel = new Werkstoff(Materials.Cupronickel, , ,31_766+310); +// public static Werkstoff DarkAsh = new Werkstoff(Materials.DarkAsh, , ,31_766+816); +// public static Werkstoff DeepIron = new Werkstoff(Materials.DeepIron, , ,31_766+829); +// public static Werkstoff Diamond = new Werkstoff(Materials.Diamond, , ,31_766+500); +// public static Werkstoff Electrum = new Werkstoff(Materials.Electrum, , ,31_766+303); +// public static Werkstoff Emerald = new Werkstoff(Materials.Emerald, , ,31_766+501); +// public static Werkstoff Galena = new Werkstoff(Materials.Galena, , ,31_766+830); +// public static Werkstoff Garnierite = new Werkstoff(Materials.Garnierite, , ,31_766+906); +// public static Werkstoff Glyceryl = new Werkstoff(Materials.Glyceryl, , ,31_766+714); +// public static Werkstoff GreenSapphire = new Werkstoff(Materials.GreenSapphire, , ,31_766+504); +// public static Werkstoff Grossular = new Werkstoff(Materials.Grossular, , ,31_766+831); +// public static Werkstoff HolyWater = new Werkstoff(Materials.HolyWater, , ,31_766+729); +// public static Werkstoff Ice = new Werkstoff(Materials.Ice, , ,31_766+702); +// public static Werkstoff Ilmenite = new Werkstoff(Materials.Ilmenite, , ,31_766+918); +// public static Werkstoff Rutile = new Werkstoff(Materials.Rutile, , ,31_766+375); +// public static Werkstoff Bauxite = new Werkstoff(Materials.Bauxite, , ,31_766+822); +// public static Werkstoff Titaniumtetrachloride = new Werkstoff(Materials.Titaniumtetrachloride, , ,31_766+376); +// public static Werkstoff Magnesiumchloride = new Werkstoff(Materials.Magnesiumchloride, , ,31_766+377); +// public static Werkstoff Invar = new Werkstoff(Materials.Invar, , ,31_766+302); +// public static Werkstoff Kanthal = new Werkstoff(Materials.Kanthal, , ,31_766+312); +// public static Werkstoff Lazurite = new Werkstoff(Materials.Lazurite, , ,31_766+524); +// public static Werkstoff Magnalium = new Werkstoff(Materials.Magnalium, , ,31_766+313); +// public static Werkstoff Magnesite = new Werkstoff(Materials.Magnesite, , ,31_766+908); +// public static Werkstoff Magnetite = new Werkstoff(Materials.Magnetite, , ,31_766+870); +// public static Werkstoff Molybdenite = new Werkstoff(Materials.Molybdenite, , ,31_766+942); +// public static Werkstoff Nichrome = new Werkstoff(Materials.Nichrome, , ,31_766+311); +// public static Werkstoff NiobiumNitride = new Werkstoff(Materials.NiobiumNitride, , ,31_766+359); +// public static Werkstoff NiobiumTitanium = new Werkstoff(Materials.NiobiumTitanium, , ,31_766+360); +// public static Werkstoff NitroCarbon = new Werkstoff(Materials.NitroCarbon, , ,31_766+716); +// public static Werkstoff NitrogenDioxide = new Werkstoff(Materials.NitrogenDioxide, , ,31_766+717); +// public static Werkstoff Obsidian = new Werkstoff(Materials.Obsidian, , ,31_766+804); +// public static Werkstoff Phosphate = new Werkstoff(Materials.Phosphate, , ,31_766+833); +// public static Werkstoff PigIron = new Werkstoff(Materials.PigIron, , ,31_766+307); + +// public static Polydimethylsiloxane = new MaterialBuilder +// public static Werkstoff Silicone = new Werkstoff(Materials.Silicone, , ,31_766+471); +// public static Werkstoff Polycaprolactam = new Werkstoff(Materials.Polycaprolactam, , ,31_766+472); + +// public static Werkstoff Powellite = new Werkstoff(Materials.Powellite, , ,31_766+883); +// public static Werkstoff Pumice = new Werkstoff(Materials.Pumice, , ,31_766+926); +// public static Werkstoff Pyrite = new Werkstoff(Materials.Pyrite, , ,31_766+834); +// public static Werkstoff Pyrolusite = new Werkstoff(Materials.Pyrolusite, , ,31_766+943); +// public static Werkstoff Pyrope = new Werkstoff(Materials.Pyrope, , ,31_766+835); +// public static Werkstoff RockSalt = new Werkstoff(Materials.RockSalt, , ,31_766+944); +// public static Werkstoff Rubber = new Werkstoff(Materials.Rubber, , ,31_766+880); +// public static Werkstoff RawRubber = new Werkstoff(Materials.RawRubber, , ,31_766+896); +// public static Werkstoff Ruby = new Werkstoff(Materials.Ruby, , ,31_766+502); +// public static Werkstoff Salt = new Werkstoff(Materials.Salt, , ,31_766+817); +// public static Werkstoff Saltpeter = new Werkstoff(Materials.Saltpeter, , ,31_766+836); +// public static Werkstoff Sapphire = new Werkstoff(Materials.Sapphire, , ,31_766+503); +// public static Werkstoff Scheelite = new Werkstoff(Materials.Scheelite, , ,31_766+910); +// public static Werkstoff SiliconDioxide = new Werkstoff(Materials.SiliconDioxide, , ,31_766+837); +// public static Werkstoff Snow = new Werkstoff(Materials.Snow, , ,31_766+728); +// public static Werkstoff Sodalite = new Werkstoff(Materials.Sodalite, , ,31_766+525); +// public static Werkstoff SodiumPersulfate = new Werkstoff(Materials.SodiumPersulfate, , ,31_766+718); +// public static Werkstoff SodiumSulfide = new Werkstoff(Materials.SodiumSulfide, , ,31_766+719); +// public static Werkstoff HydricSulfide = new Werkstoff(Materials.HydricSulfide, , ,31_766+460); +// public static Werkstoff OilHeavy = new Werkstoff(Materials.OilHeavy, , ,31_766+730); +// public static Werkstoff OilMedium = new Werkstoff(Materials.OilMedium, , ,31_766+731); +// public static Werkstoff OilLight = new Werkstoff(Materials.OilLight, , ,31_766+732); +// public static Werkstoff NatruralGas = new Werkstoff(Materials.NatruralGas, , ,31_766+733); +// public static Werkstoff SulfuricGas = new Werkstoff(Materials.SulfuricGas, , ,31_766+734); +// public static Werkstoff Gas = new Werkstoff(Materials.Gas, , ,31_766+735); +// public static Werkstoff SulfuricNaphtha = new Werkstoff(Materials.SulfuricNaphtha, , ,31_766+736); +// public static Werkstoff SulfuricLightFuel = new Werkstoff(Materials.SulfuricLightFuel, , ,31_766+737); +// public static Werkstoff SulfuricHeavyFuel = new Werkstoff(Materials.SulfuricHeavyFuel, , ,31_766+738); +// public static Werkstoff Naphtha = new Werkstoff(Materials.Naphtha, , ,31_766+739); +// public static Werkstoff LightFuel = new Werkstoff(Materials.LightFuel, , ,31_766+740); +// public static Werkstoff HeavyFuel = new Werkstoff(Materials.HeavyFuel, , ,31_766+741); +// public static Werkstoff LPG = new Werkstoff(Materials.LPG, , ,31_766+742); +// public static FluidNaquadahFuel = new MaterialBuilder +// public static EnrichedNaquadria = new MaterialBuilder +// public static ReinforceGlass = new MaterialBuilder +// public static BioMediumRaw = new MaterialBuilder +// public static BioMediumSterilized = new MaterialBuilder +// public static Chlorobenzene = new MaterialBuild +// public static DilutedHydrochloricAcid = new MaterialBuild +// public static Pyrochlore = new MaterialBuild +// public static GrowthMediumRaw = new MaterialBuild +// public static GrowthMediumSterilized = new MaterialBuild +// public static FerriteMixture = new MaterialBuild +// public static NickelZincFerrite = new MaterialBuild +// public static Massicot = new MaterialBuild +// public static ArsenicTrioxide = new MaterialBuild +// public static CobaltOxide = new MaterialBuild +// public static Zincite = new MaterialBuild +// public static AntimonyTrioxide = new MaterialBuild +// public static CupricOxide = new MaterialBuild +// public static Ferrosilite = new MaterialBuild +// public static Magnesia = new MaterialBuild +// public static Quicklime = new MaterialBuild +// public static Potash = new MaterialBuild +// public static SodaAsh = new MaterialBuild +// public static Brick = new MaterialBuild +// public static Fireclay = new MaterialBuild +// public static BioDiesel = new MaterialBuild +// public static NitrationMixture = new MaterialBuild +// public static Glycerol = new MaterialBuild +// public static SodiumBisulfate = new MaterialBuild +// public static PolyphenyleneSulfide = new MaterialBuild +// public static Dichlorobenzene = new MaterialBuild +// public static Polystyrene = new MaterialBuild +// public static Styrene = new MaterialBuild +// public static Isoprene = new MaterialBuild +// public static Tetranitromethane = new MaterialBuild +// public static Ethenone = new MaterialBuild +// public static Ethane = new MaterialBuild +// public static Propane = new MaterialBuild +// public static Butane = new MaterialBuild +// public static Butene = new MaterialBuild +// public static Butadiene = new MaterialBuild +// public static RawStyreneButadieneRubber = new MaterialBuild +// public static StyreneButadieneRubber = new MaterialBuild +// public static Toluene = new MaterialBuild +// public static Epichlorohydrin = new MaterialBuild +// public static PolyvinylChloride = new MaterialBuild +// public static VinylChloride = new MaterialBuild +// public static SulfurDioxide = new MaterialBuild +// public static SulfurTrioxide = new MaterialBuild +// public static NitricAcid = new MaterialBuild +// public static Dimethylhydrazine = new MaterialBuild +// public static Chloramine = new MaterialBuild +// public static Dimethylamine = new MaterialBuild +// public static DinitrogenTetroxide = new MaterialBuild +// public static NitricOxide = new MaterialBuild +// public static Ammonia = new MaterialBuild +// public static Dimethyldichlorosilane = new MaterialBuild +// public static Chloromethane = new MaterialBuild +// public static PhosphorousPentoxide = new MaterialBuild +// public static Tetrafluoroethylene = new MaterialBuild +// public static HydrofluoricAcid = new MaterialBuild +// public static Chloroform = new MaterialBuild +// public static BisphenolA = new MaterialBuild +// public static AceticAcid = new MaterialBuild +// public static CalciumAcetateSolution = new MaterialBuild +// public static Acetone = new MaterialBuild +// public static Methanol = new MaterialBuild +// public static CarbonMonoxide = new MaterialBuild +// public static MetalMixture = new MaterialBuild +// public static Ethylene = new MaterialBuild +// public static Propene = new MaterialBuild +// public static VinylAcetate = new MaterialBuild +// public static PolyvinylAcetate = new MaterialBuild +// public static MethylAcetate = new MaterialBuild +// public static AllylChloride = new MaterialBuild +// public static HydrochloricAcid = new MaterialBuild +// public static HypochlorousAcid = new MaterialBuild +// public static SodiumHydroxide = new MaterialBuild +// public static Benzene = new MaterialBuild +// public static Phenol = new MaterialBuild +// public static Cumene = new MaterialBuild +// public static PhosphoricAcid = new MaterialBuild +// public static SaltWater = new MaterialBuild +// public static IronIIIChloride = new MaterialBuild +// public static LifeEssence = new MaterialBuild +// public static Werkstoff SolderingAlloy = new Werkstoff(Materials.SolderingAlloy, , ,31_766+314); +// public static Werkstoff GalliumArsenide = new Werkstoff(Materials.GalliumArsenide, , ,31_766+980); +// public static Werkstoff IndiumGalliumPhosphide = new Werkstoff(Materials.IndiumGalliumPhosphide, , ,31_766+981); +// public static Werkstoff Spessartine = new Werkstoff(Materials.Spessartine, , ,31_766+838); +// public static Werkstoff Sphalerite = new Werkstoff(Materials.Sphalerite, , ,31_766+839); + +// public static Werkstoff Stibnite = new Werkstoff(Materials.Stibnite, , ,31_766+945); +// public static Werkstoff SulfuricAcid = new Werkstoff(Materials.SulfuricAcid, , ,31_766+720); +// public static Werkstoff Tanzanite = new Werkstoff(Materials.Tanzanite, , ,31_766+508); +// public static Werkstoff Tetrahedrite = new Werkstoff(Materials.Tetrahedrite, , ,31_766+840); +// public static Werkstoff TinAlloy = new Werkstoff(Materials.TinAlloy, , ,31_766+363); +// public static Werkstoff Topaz = new Werkstoff(Materials.Topaz, , ,31_766+507); +// public static Werkstoff Tungstate = new Werkstoff(Materials.Tungstate, , ,31_766+841); + +// public static Werkstoff Uraninite = new Werkstoff(Materials.Uraninite, , ,31_766+922); +// public static Werkstoff Uvarovite = new Werkstoff(Materials.Uvarovite, , ,31_766+842); +// public static Werkstoff VanadiumGallium = new Werkstoff(Materials.VanadiumGallium, , ,31_766+357); + +// public static Werkstoff Wulfenite = new Werkstoff(Materials.Wulfenite, , ,31_766+882); +// public static Werkstoff YellowLimonite = new Werkstoff(Materials.YellowLimonite, , ,31_766+931); +// public static Werkstoff YttriumBariumCuprate = new Werkstoff(Materials.YttriumBariumCuprate, , ,31_766+358); + +// public static Werkstoff LiveRoot = new Werkstoff(Materials.LiveRoot, , ,31_766+832); +// public static Werkstoff IronWood = new Werkstoff(Materials.IronWood, , ,31_766+338); +// public static Werkstoff Glass = new Werkstoff(Materials.Glass, , ,31_766+890); +// public static Werkstoff BorosilicateGlass = new Werkstoff(Materials.BorosilicateGlass, Werkstoff.GenerationFeatures.DISABLED, Werkstoff.Types.COMPOUND, 31_766+611); +// public static Werkstoff Perlite = new Werkstoff(Materials.Perlite, , ,31_766+925); +// public static Werkstoff Borax = new Werkstoff(Materials.Borax, , ,31_766+941); +// public static Werkstoff Lignite = new Werkstoff(Materials.Lignite, , ,31_766+538); +// public static Werkstoff Olivine = new Werkstoff(Materials.Olivine, , ,31_766+505); +// public static Werkstoff Opal = new Werkstoff(Materials.Opal, , ,31_766+510); +// public static Werkstoff Amethyst = new Werkstoff(Materials.Amethyst, , ,31_766+509); +// public static Werkstoff Redstone = new Werkstoff(Materials.Redstone, , ,31_766+810); +// public static Werkstoff Lapis = new Werkstoff(Materials.Lapis, , ,31_766+526); +// public static Werkstoff Blaze = new Werkstoff(Materials.Blaze, , ,31_766+801); +// public static Werkstoff EnderPearl = new Werkstoff(Materials.EnderPearl, , ,31_766+532); +// public static Werkstoff EnderEye = new Werkstoff(Materials.EnderEye, , ,31_766+533); +// public static Werkstoff Flint = new Werkstoff(Materials.Flint, , ,31_766+802); +// public static Werkstoff Diatomite = new Werkstoff(Materials.Diatomite, , ,31_766+948); +// public static Werkstoff VolcanicAsh = new Werkstoff(Materials.VolcanicAsh, , ,31_766+940); +// public static Werkstoff Niter = new Werkstoff(Materials.Niter, , ,31_766+531); +// public static Werkstoff Pyrotheum = new Werkstoff(Materials.Pyrotheum, , ,31_766+843); +// public static Werkstoff Cryotheum = new Werkstoff(Materials.Cryotheum, , ,31_766+898); +// public static Werkstoff HydratedCoal = new Werkstoff(Materials.HydratedCoal, , ,31_766+818); +// public static Werkstoff Apatite = new Werkstoff(Materials.Apatite, , ,31_766+530); +// public static Werkstoff Alumite = new Werkstoff(Materials.Alumite, , ,31_766+400); +// public static Werkstoff Manyullyn = new Werkstoff(Materials.Manyullyn, , ,31_766+386); +// public static Werkstoff Steeleaf = new Werkstoff(Materials.Steeleaf, , ,31_766+339); +// public static Werkstoff Knightmetal = new Werkstoff(Materials.Knightmetal, , ,31_766+362); + +// public static Werkstoff NitroFuel = new Werkstoff(Materials.NitroFuel, , ,31_766+709); +// public static Werkstoff RedAlloy = new Werkstoff(Materials.RedAlloy, , ,31_766+308); +// public static Werkstoff CobaltBrass = new Werkstoff(Materials.CobaltBrass, , ,31_766+343); +// public static Werkstoff TricalciumPhosphate = new Werkstoff(Materials.TricalciumPhosphate, , ,31_766+534); +// public static Werkstoff Basalt = new Werkstoff(Materials.Basalt, , ,31_766+844); +// public static Werkstoff GarnetRed = new Werkstoff(Materials.GarnetRed, , ,31_766+527); +// public static Werkstoff GarnetYellow = new Werkstoff(Materials.GarnetYellow, , ,31_766+528); +// public static Werkstoff Marble = new Werkstoff(Materials.Marble, , ,31_766+845); +// public static Werkstoff Sugar = new Werkstoff(Materials.Sugar, , ,31_766+803); +// public static Werkstoff Thaumium = new Werkstoff(Materials.Thaumium, , ,31_766+330); +// public static Werkstoff Vinteum = new Werkstoff(Materials.Vinteum, , ,31_766+529); +// public static Werkstoff Redrock = new Werkstoff(Materials.Redrock, , ,31_766+846); +// public static Werkstoff PotassiumFeldspar = new Werkstoff(Materials.PotassiumFeldspar, , ,31_766+847); +// public static Werkstoff Biotite = new Werkstoff(Materials.Biotite, , ,31_766+848); +// public static Werkstoff GraniteBlack = new Werkstoff(Materials.GraniteBlack, , ,31_766+849); +// public static Werkstoff GraniteRed = new Werkstoff(Materials.GraniteRed, , ,31_766+850); +// public static Werkstoff Chrysotile = new Werkstoff(Materials.Chrysotile, , ,31_766+912); +// public static Werkstoff Realgar = new Werkstoff(Materials.Realgar, , ,31_766+913); +// public static Werkstoff VanadiumMagnetite = new Werkstoff(Materials.VanadiumMagnetite, , ,31_766+923); +// public static Werkstoff BasalticMineralSand = new Werkstoff(Materials.BasalticMineralSand, , ,31_766+935); +// public static Werkstoff GraniticMineralSand = new Werkstoff(Materials.GraniticMineralSand, , ,31_766+936); +// public static Werkstoff GarnetSand = new Werkstoff(Materials.GarnetSand, , ,31_766+938); +// public static Werkstoff QuartzSand = new Werkstoff(Materials.QuartzSand, , ,31_766+939); +// public static Werkstoff Bastnasite = new Werkstoff(Materials.Bastnasite, , ,31_766+905); +// public static Werkstoff Pentlandite = new Werkstoff(Materials.Pentlandite, , ,31_766+909); +// public static Werkstoff Spodumene = new Werkstoff(Materials.Spodumene, , ,31_766+920); +// public static Werkstoff Pollucite = new Werkstoff(Materials.Pollucite, , ,31_766+919); +// public static Werkstoff Tantalite = new Werkstoff(Materials.Tantalite, , ,31_766+921); +// public static Werkstoff Lepidolite = new Werkstoff(Materials.Lepidolite, , ,31_766+907); +// public static Werkstoff Glauconite = new Werkstoff(Materials.Glauconite, , ,31_766+933); +// public static Werkstoff GlauconiteSand = new Werkstoff(Materials.GlauconiteSand, , ,31_766+949); +// public static Werkstoff Vermiculite = new Werkstoff(Materials.Vermiculite, , ,31_766+932); +// public static Werkstoff Bentonite = new Werkstoff(Materials.Bentonite, , ,31_766+927); +// public static Werkstoff FullersEarth = new Werkstoff(Materials.FullersEarth, , ,31_766+928); +// public static Werkstoff Pitchblende = new Werkstoff(Materials.Pitchblende, , ,31_766+873); +// public static Werkstoff Monazite = new Werkstoff(Materials.Monazite, , ,31_766+520); +// public static Werkstoff Malachite = new Werkstoff(Materials.Malachite, , ,31_766+871); +// public static Werkstoff Mirabilite = new Werkstoff(Materials.Mirabilite, , ,31_766+900); +// public static Werkstoff Mica = new Werkstoff(Materials.Mica, , ,31_766+901); +// public static Werkstoff Trona = new Werkstoff(Materials.Trona, , ,31_766+903); +// public static Werkstoff Barite = new Werkstoff(Materials.Barite, , ,31_766+904); +// public static Werkstoff Gypsum = new Werkstoff(Materials.Gypsum, , ,31_766+934); +// public static Werkstoff Alunite = new Werkstoff(Materials.Alunite, , ,31_766+911); +// public static Werkstoff Dolomite = new Werkstoff(Materials.Dolomite, , ,31_766+914); +// public static Werkstoff Wollastonite = new Werkstoff(Materials.Wollastonite, , ,31_766+915); +// public static Werkstoff Zeolite = new Werkstoff(Materials.Zeolite, , ,31_766+916); +// public static Werkstoff Kyanite = new Werkstoff(Materials.Kyanite, , ,31_766+924); +// public static Werkstoff Kaolinite = new Werkstoff(Materials.Kaolinite, , ,31_766+929); +// public static Werkstoff Talc = new Werkstoff(Materials.Talc, , ,31_766+902); +// public static Werkstoff Soapstone = new Werkstoff(Materials.Soapstone, , ,31_766+877); +// public static Werkstoff Concrete = new Werkstoff(Materials.Concrete, , ,31_766+947); +// public static Werkstoff IronMagnetic = new Werkstoff(Materials.IronMagnetic, , ,31_766+354); +// public static Werkstoff SteelMagnetic = new Werkstoff(Materials.SteelMagnetic, , ,31_766+355); +// public static Werkstoff NeodymiumMagnetic = new Werkstoff(Materials.NeodymiumMagnetic, , ,31_766+356); +// public static Werkstoff SamariumMagnetic = new Werkstoff(Materials.SamariumMagnetic, , ,31_766+399); + +// public static DilutedSulfuricAcid = new MaterialBuilder(31_766+640) +// public static Werkstoff EpoxidFiberReinforced = new Werkstoff(Materials.EpoxidFiberReinforced, , ,31_766+610); +// public static PotassiumNitrade = new MaterialBuilder(59 +// public static ChromiumTrioxide = new MaterialBuilder(31_766+591) +// public static Nitrochlorobenzene = new MaterialBuilder(31_766+592) +// public static Dimethylbenzene = new MaterialBuilder(31_766+593) +// public static Potassiumdichromate = new MaterialBuilder(594 +// public static PhthalicAcid = new MaterialBuilder(31_766+595) +// public static Dichlorobenzidine = new MaterialBuilder(31_766+596) +// public static Diaminobenzidin = new MaterialBuilder(31_766+597) +// public static Diphenylisophthalate = new MaterialBuilder(59 +// public static Werkstoff Polybenzimidazole = new Werkstoff(Materials.Polybenzimidazole, , , 31_766+599); +// public static NitrousOxide = new MaterialBuilder(31_766+993) +// public static AntiKnock = new MaterialBuilder(31_766+994) +// public static Octane = new MaterialBuilder(31_766+995) +// public static GasolineRaw = new MaterialBuilder(31_766+996) +// public static GasolineRegular = new MaterialBuilder(31_766+997) +// public static GasolinePremium = new MaterialBuilder(31_766+998) +// public static Werkstoff Electrotine = new Werkstoff(Materials.Electrotine, , ,31_766+812); +// public static Galgadorian = new Werkstoff(Materials.Galgadorian, , ,31_766+384); +// public static Werkstoff EnhancedGalgadorian = new Werkstoff(Materials.EnhancedGalgadorian, , ,31_766+385); +// public static Werkstoff BloodInfusedIron = new Werkstoff(Materials.BloodInfusedIron, , ,31_766+977); +// public static Werkstoff Shadow = new Werkstoff(Materials.Shadow, , ,31_766+368); +// public static Werkstoff Ledox = new Werkstoff(Materials.Ledox, , ,31_766+390); +// public static Werkstoff Quantium = new Werkstoff(Materials.Quantium, , ,31_766+391); +// public static Werkstoff Mytryl = new Werkstoff(Materials.Mytryl, , ,31_766+387); +// public static Werkstoff BlackPlutonium = new Werkstoff(Materials.BlackPlutonium, , ,31_766+388); +// public static Werkstoff CallistoIce = new Werkstoff(Materials.CallistoIce, , ,31_766+389); +// public static Werkstoff Duralumin = new Werkstoff(Materials.Duralumin, , ,31_766+392); +// public static Werkstoff Oriharukon = new Werkstoff(Materials.Oriharukon, , ,31_766+393); +// public static Werkstoff MysteriousCrystal = new Werkstoff(Materials.MysteriousCrystal, , ,31_766+398); +// public static Werkstoff RedstoneAlloy = new Werkstoff(Materials.RedstoneAlloy, , ,31_766+381); +// public static Werkstoff Soularium = new Werkstoff(Materials.Soularium, , ,31_766+379); +// public static Werkstoff ConductiveIron = new Werkstoff(Materials.ConductiveIron, , ,31_766+369); +// public static Werkstoff ElectricalSteel = new Werkstoff(Materials.ElectricalSteel, , ,31_766+365); +// public static Werkstoff EnergeticAlloy = new Werkstoff(Materials.EnergeticAlloy, , ,31_766+366); +// public static Werkstoff VibrantAlloy = new Werkstoff(Materials.VibrantAlloy, , ,31_766+367); +// public static Werkstoff PulsatingIron = new Werkstoff(Materials.PulsatingIron, , ,31_766+378); +// public static Werkstoff DarkSteel = new Werkstoff(Materials.DarkSteel, , ,31_766+364); +// public static Werkstoff EndSteel = new Werkstoff(Materials.EndSteel, , ,31_766+401); +// public static Werkstoff CrudeSteel = new Werkstoff(Materials.CrudeSteel, , ,31_766+402); +// public static Werkstoff CrystallineAlloy = new Werkstoff(Materials.CrystallineAlloy, , ,31_766+403); +// public static Werkstoff MelodicAlloy = new Werkstoff(Materials.MelodicAlloy, , ,31_766+404); +// public static Werkstoff StellarAlloy = new Werkstoff(Materials.StellarAlloy, , ,31_766+405); +// public static Werkstoff CrystallinePinkSlime = new Werkstoff(Materials.CrystallinePinkSlime, , ,31_766+406); +// public static Werkstoff EnergeticSilver = new Werkstoff(Materials.EnergeticSilver, , ,31_766+407); +// public static Werkstoff VividAlloy = new Werkstoff(Materials.VividAlloy, , ,31_766+408); +// public static Werkstoff Enderium = new Werkstoff(Materials.Enderium, , ,31_766+321); +// public static Werkstoff Mithril = new Werkstoff(Materials.Mithril, , ,31_766+331); +// public static Werkstoff BlueAlloy = new Werkstoff(Materials.BlueAlloy, , ,31_766+309); +// public static Werkstoff ShadowIron = new Werkstoff(Materials.ShadowIron, , ,31_766+336); +// public static Werkstoff ShadowSteel = new Werkstoff(Materials.ShadowSteel, , ,31_766+337); +// public static Werkstoff AstralSilver = new Werkstoff(Materials.AstralSilver, , ,31_766+333); +// public static Werkstoff InfinityCatalyst = new Werkstoff(Materials.InfinityCatalyst, , , 31_766 + 394); +// public static Werkstoff Infinity = new Werkstoff(Materials.Infinity, , , 31_766 + 397); +// public static Werkstoff Bedrockium = new Werkstoff(Materials.Bedrockium, , , 31_766 + 395); +// public static Werkstoff Trinium = new Werkstoff(Materials.Trinium, , , 31_766 + 868); +// public static Werkstoff Ichorium = new Werkstoff(Materials.Ichorium, , , 31_766 + 978); +// public static Werkstoff CosmicNeutronium = new Werkstoff(Materials.CosmicNeutronium, , , 31_766 + 982); +// public static Werkstoff Pentacadmiummagnesiumhexaoxid = new Werkstoff(Materials.Pentacadmiummagnesiumhexaoxid, , , 31_766 + 987); +// public static Werkstoff Titaniumonabariumdecacoppereikosaoxid = new Werkstoff(Materials.Titaniumonabariumdecacoppereikosaoxid, , , 31_766 + 988); +// public static Werkstoff Uraniumtriplatinid = new Werkstoff(Materials.Uraniumtriplatinid, , , 31_766 + 989); +// public static Werkstoff Vanadiumtriindinid = new Werkstoff(Materials.Vanadiumtriindinid, , , 31_766 + 990); +// public static Werkstoff Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid = new Werkstoff(Materials.Tetraindiumditindibariumtitaniumheptacoppertetrakaidekaoxid, , , 31_766 + 991); +// public static Werkstoff Tetranaquadahdiindiumhexaplatiumosminid = new Werkstoff(Materials.Tetranaquadahdiindiumhexaplatiumosminid, , , 31_766 + 992); +// public static Werkstoff Longasssuperconductornameforuvwire = new Werkstoff(Materials.Longasssuperconductornameforuvwire, , , 31_766 + 986); +// public static Werkstoff Longasssuperconductornameforuhvwire = new Werkstoff(Materials.Longasssuperconductornameforuhvwire, , , 31_766 + 985); +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java index 18748c8e5c..d612fa211a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlock_Item.java @@ -23,6 +23,7 @@ package com.github.bartimaeusnek.bartworks.system.material; import com.github.bartimaeusnek.bartworks.common.items.BW_ItemBlocks; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.util.GT_LanguageManager; @@ -62,6 +63,7 @@ public class BW_MetaGeneratedBlock_Item extends BW_ItemBlocks { if (aList == null) aList = new ArrayList(); aList.add(Werkstoff.werkstoffHashMap.get((short) aStack.getItemDamage()).getToolTip()); + aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, float hitX, float hitY, float hitZ, int aMeta) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java index adeeea4928..af87faf775 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGeneratedBlocks_Casing.java @@ -23,6 +23,8 @@ package com.github.bartimaeusnek.bartworks.system.material; import com.github.technus.tectech.mechanics.structure.ICustomBlockSetting; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_LanguageManager; @@ -78,6 +80,7 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks imple @Override public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { + super.onBlockAdded(aWorld,aX,aY,aZ); GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); } @@ -85,7 +88,6 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks imple protected void doRegistrationStuff(Werkstoff tMaterial) { GregTech_API.registerMachineBlock(this, -1); Optional.ofNullable(tMaterial) - .filter(pMaterial -> pMaterial.hasItemType(OrePrefixes.plate) && pMaterial.hasItemType(OrePrefixes.screw) && pMaterial.hasItemType(OrePrefixes.plateDouble) ) .ifPresent(pMaterial -> GT_LanguageManager.addStringLocalization( this.getUnlocalizedName() + "." + pMaterial.getmID() + ".name", @@ -104,13 +106,19 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks imple } @Override + @SideOnly(Side.CLIENT) @SuppressWarnings("unchecked") public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) { Werkstoff.werkstoffHashSet.stream() .filter(pMaterial -> - pMaterial.hasItemType(OrePrefixes.plate) - && pMaterial.hasItemType(OrePrefixes.screw) - && pMaterial.hasItemType(OrePrefixes.plateDouble) + pMaterial.getType().equals(Werkstoff.Types.BIOLOGICAL) + && pMaterial.hasGenerationFeature(WerkstoffLoader.blockCasing) + || + pMaterial.doesOreDictedItemExists(OrePrefixes.plate) + && pMaterial.doesOreDictedItemExists(OrePrefixes.screw) + && pMaterial.doesOreDictedItemExists(OrePrefixes.plateDouble) + && pMaterial.doesOreDictedItemExists(OrePrefixes.gearGt) + && pMaterial.doesOreDictedItemExists(OrePrefixes.gearGtSmall) ) .map(pMaterial -> new ItemStack(aItem, 1, pMaterial.getmID())) .forEach(aList::add); @@ -131,4 +139,4 @@ public class BW_MetaGeneratedBlocks_Casing extends BW_MetaGenerated_Blocks imple .map(te -> (BW_MetaGeneratedBlocks_Casing_TE) te) .ifPresent(te -> te.mMetaData = (short) meta); } -} +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java index 87eaf7038d..0d6bfbc9d3 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Blocks.java @@ -22,6 +22,7 @@ package com.github.bartimaeusnek.bartworks.system.material; +import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.client.renderer.BW_Renderer_Block_Ores; import com.github.bartimaeusnek.bartworks.common.blocks.BW_TileEntityContainer; import cpw.mods.fml.relauncher.Side; @@ -57,6 +58,17 @@ public abstract class BW_MetaGenerated_Blocks extends BW_TileEntityContainer { Werkstoff.werkstoffHashSet.forEach(this::doRegistrationStuff); } + @Override + public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { + super.onBlockAdded(aWorld, aX, aY, aZ); + try { + //TODO: Unsleep this, is here because TE isnt set yet. + Thread.sleep(1); + } catch (InterruptedException e) { + MainMod.LOGGER.catching(e); + } + } + @SideOnly(Side.CLIENT) public final BW_MetaGenerated_Block_TE getProperTileEntityForRendering() { return (BW_MetaGenerated_Block_TE) createNewTileEntity(null,0); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java index ab84e7fd0b..ab38546756 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java @@ -25,7 +25,7 @@ package com.github.bartimaeusnek.bartworks.system.material; import com.github.bartimaeusnek.bartworks.API.IRadMaterial; import com.github.bartimaeusnek.bartworks.API.SideReference; import com.github.bartimaeusnek.bartworks.client.textures.PrefixTextureLinker; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Materials; @@ -49,7 +49,6 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; -import net.minecraft.util.StatCollector; import net.minecraft.world.World; import java.util.List; @@ -134,7 +133,7 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa if (aStack != null && aStack.getItem() instanceof BW_MetaGenerated_Items && aStack.getItemDamage() == WerkstoffLoader.Tiberium.getmID()) aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.nqgen")); - aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } public String getDefaultLocalization(Werkstoff werkstoff) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java index 7870b820e8..1747471adf 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/CircuitGeneration/BW_Meta_Items.java @@ -26,8 +26,8 @@ import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; import com.github.bartimaeusnek.bartworks.util.BWRecipes; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.BW_Util; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; @@ -44,7 +44,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.IIcon; -import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; import java.util.*; @@ -289,7 +288,7 @@ public class BW_Meta_Items { @SuppressWarnings("unchecked") protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); - aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); + aList.add(BW_Tooltip_Reference.ADDED_BY_BARTWORKS.get()); } @Override diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java index 8838d9dc3d..efc29dc129 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/BWGTMetaItems.java @@ -55,36 +55,36 @@ public class BWGTMetaItems extends BW_MetaGenerated_Items { public BWGTMetaItems(OrePrefixes orePrefixes, List noSubIDMaterials) { super(orePrefixes,null); - materialloop: + //materialloop: for (int i = 0; i < Materials.values().length; i++) { ItemStack tStack = new ItemStack(this, 1, i); - Materials w = Materials.values()[i]; - if (((w.getMolten(1) == null && orePrefixes == WerkstoffLoader.capsuleMolten) || ((w.getFluid(1) == null && w.getGas(1) == null) && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle)))) + Materials material = Materials.values()[i]; + if (((material.getMolten(1) == null && orePrefixes == WerkstoffLoader.capsuleMolten) || ((material.getFluid(1) == null && material.getGas(1) == null) && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle)))) continue; - for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) - if (w.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName())) - continue materialloop; - if (OreDictionary.doesOreNameExist(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ",""))){ + //for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) + // if (material.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName())) + // continue materialloop; + if (OreDictionary.doesOreNameExist(this.orePrefixes.name() + material.mDefaultLocalName.replaceAll(" ",""))){ hiddenThings.add(i); continue; } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".name", getDefaultLocalization(w)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".tooltip", w.getToolTip()); - GT_OreDictUnificator.registerOre(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ",""), tStack); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".name", getDefaultLocalization(material)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(tStack) + ".tooltip", material.getToolTip()); + GT_OreDictUnificator.registerOre(this.orePrefixes.name() + material.mDefaultLocalName.replaceAll(" ",""), tStack); } - if (noSubIDMaterials != null){ + if (noSubIDMaterials != null) { hasList = true; - materialloop: + //materialloop: for (int i = 0; i < noSubIDMaterials.size(); i++) { ItemStack tStack = new ItemStack(this, 1, i+1001); Materials w = noSubIDMaterials.get(i); if (((w.getMolten(1) == null && orePrefixes == WerkstoffLoader.capsuleMolten) || ((w.getFluid(1) == null && w.getGas(1) == null) && (orePrefixes == OrePrefixes.capsule || orePrefixes == OrePrefixes.bottle)))) continue; - for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) - if (w.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName())) - continue materialloop; + //for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) + // if (w.mDefaultLocalName.equalsIgnoreCase(werkstoff.getDefaultName())) + // continue materialloop; if (OreDictionary.doesOreNameExist(this.orePrefixes.name() + w.mDefaultLocalName.replaceAll(" ",""))){ hiddenThings.add(i); continue; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java index 0713ddf102..e99c32d110 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java @@ -22,8 +22,10 @@ package com.github.bartimaeusnek.bartworks.system.material; +import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler; import com.github.bartimaeusnek.bartworks.util.*; import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler; +import com.google.common.base.Verify; import gregtech.api.enums.*; import gregtech.api.interfaces.IColorModulationContainer; import gregtech.api.interfaces.ISubTagContainer; @@ -34,7 +36,6 @@ import net.minecraftforge.fluids.FluidStack; import java.lang.reflect.InvocationTargetException; import java.nio.ByteBuffer; import java.util.*; -import java.util.stream.Collectors; @SuppressWarnings("ALL") public class Werkstoff implements IColorModulationContainer, ISubTagContainer { @@ -76,21 +77,25 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { Werkstoff.default_null_Werkstoff = new Werkstoff(new short[3], "_NULL", "Default null Werkstoff", Werkstoff.DEFAULT_NULL_STATS, Werkstoff.Types.UNDEFINED, Werkstoff.DEFAULT_NULL_GENERATION_FEATURES, -1, TextureSet.SET_NONE); } + /** + * GT Materials Bridge Constructor + * @param materials a GT Materials + * @param generationFeatures the new Types you want to add + * @param type - self explainatory + * @param mID > 31_766 && <= 32_767 + */ public Werkstoff(Materials materials, Werkstoff.GenerationFeatures generationFeatures, Types type, int mID){ this( materials.mRGBa, - materials.getToolTip(), materials.mDefaultLocalName, + materials.getToolTip(), type == null ? materials.mElement != null ? Types.ELEMENT : Types.UNDEFINED : type, generationFeatures, mID, materials.mIconSet, (List) materials.mOreByProducts, - materials.mMaterialList - .stream() - .map(ml -> new Pair(ml.mMaterial, (int) ml.mAmount)) - .collect(Collectors.toList()) - .>toArray(new Pair[0]) + new Pair<>(materials, 1) ); + Verify.verify(mID > 31_766 && mID <= 32_767); this.stats.mass = materials.getMass(); this.stats.protons = materials.getProtons(); this.stats.meltingPoint = materials.mMeltingPoint; @@ -102,11 +107,11 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { this.stats.setRadioactive(materials.isRadioactive()); this.stats.setBlastFurnace(materials.mBlastFurnaceRequired); if (type == Types.COMPOUND){ - this.stats.setElektrolysis(type == Types.COMPOUND); + this.stats.setElektrolysis(true); this.generationFeatures.addChemicalRecipes(); } else if (type == Types.MIXTURE) { - this.stats.setCentrifuge(type == Types.MIXTURE); + this.stats.setCentrifuge(true); this.generationFeatures.addMixerRecipes(); } } @@ -452,11 +457,29 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { return this.stats.getDurOverride() > 0 ? this.stats.getDurOverride() : (int) (this.stats.durMod * ((0.01f * (float) this.getStats().getMeltingPoint() * (float) this.getStats().getMass()) / (float) this.getContents().getKey())); } + /** + * Checks if the generation feature is enabled and if its not in the blacklist + */ public boolean hasItemType(OrePrefixes prefixes) { int unpacked = Werkstoff.GenerationFeatures.getPrefixDataRaw(prefixes); return (this.getGenerationFeatures().toGenerate & unpacked) != 0 && (this.getGenerationFeatures().blacklist & unpacked) == 0; } + /** + * DOES NOT CHECK BLACKLIST! + */ + public boolean hasGenerationFeature(OrePrefixes prefixes){ + int unpacked = Werkstoff.GenerationFeatures.getPrefixDataRaw(prefixes); + return (this.getGenerationFeatures().toGenerate & unpacked) != 0; + } + + /** + * Checks if the Actual Stack exists in the OreDict + */ + public boolean doesOreDictedItemExists(OrePrefixes prefixes) { + return OreDictHandler.getItemStack(this.getDefaultName(), prefixes,1) != null; + } + public enum Types { MATERIAL, COMPOUND, MIXTURE, BIOLOGICAL, ELEMENT, ISOTOPE, UNDEFINED; @@ -474,6 +497,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { } public static class GenerationFeatures { + public static final GenerationFeatures DISABLED = new GenerationFeatures().disable(); long toGenerate = 0b0001001; //logic gate shit /* @@ -712,7 +736,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { } public Werkstoff.GenerationFeatures addCasings() { - this.toGenerate = (long) (this.toGenerate | 0x380); + this.toGenerate = (long) (this.toGenerate | 0x382); return this; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java index 5e12e2e7a9..ccc8966bcf 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java @@ -187,6 +187,7 @@ public class WerkstoffLoader { bottle.mDefaultStackSize = 1; Werkstoff.GenerationFeatures.initPrefixLogic(); + BW_GT_MaterialReference.init(); } //TODO: @@ -474,6 +475,8 @@ public class WerkstoffLoader { Arrays.asList(Materials.RockSalt, Materials.Borax), new Pair<>(Materials.RockSalt, 1) ); + + //More NonGT Stuff public static final Werkstoff Fayalit = new Werkstoff( new short[]{50, 50, 50, 0}, "Fayalite", @@ -1426,7 +1429,10 @@ public class WerkstoffLoader { public static ItemStack getCorrespondingItemStackUnsafe(OrePrefixes orePrefixes, Werkstoff werkstoff, int amount) { if (!werkstoff.getGenerationFeatures().enforceUnification) { - ItemStack ret = OreDictHandler.getItemStack(werkstoff.getVarName(), orePrefixes, amount); + ItemStack ret = GT_OreDictUnificator.get(orePrefixes, werkstoff.getBridgeMaterial(), 1); + if (ret != null) + return ret; + ret = OreDictHandler.getItemStack(werkstoff.getVarName(), orePrefixes, amount); if (ret != null) return ret; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java index cc1f7650a3..a1db413dca 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/werkstoff_loaders/recipe/CasingLoader.java @@ -22,9 +22,11 @@ package com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.recipe; +import com.github.bartimaeusnek.bartworks.system.material.BW_GT_MaterialReference; import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; import com.github.bartimaeusnek.bartworks.system.material.werkstoff_loaders.IWerkstoffRunnable; import gregtech.api.enums.GT_Values; +import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import net.minecraft.item.ItemStack; @@ -35,10 +37,27 @@ import static gregtech.api.enums.OrePrefixes.*; public class CasingLoader implements IWerkstoffRunnable { @Override public void run(Werkstoff werkstoff) { - if (!(werkstoff.hasItemType(blockCasing) || werkstoff.hasItemType(plate) || werkstoff.hasItemType(screw) || werkstoff.hasItemType(gearGt) )) - return; + if (werkstoff == BW_GT_MaterialReference.Wood /*|| werkstoff == BW_GT_MaterialReference.WoodSealed*/) { + addCasingRecipes(werkstoff, plank); + } else { + if (! + ( + werkstoff.hasGenerationFeature(blockCasing) && + werkstoff.doesOreDictedItemExists(plate) && + werkstoff.doesOreDictedItemExists(screw) && + werkstoff.doesOreDictedItemExists(gearGtSmall) && + werkstoff.doesOreDictedItemExists(gearGt) && + werkstoff.doesOreDictedItemExists(plateDouble) + ) + ) + return; - GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasing),new Object[]{ + addCasingRecipes(werkstoff, plateDouble); + } + } + + private static void addCasingRecipes(Werkstoff werkstoff, OrePrefixes reboltedCasingsOuterStuff){ + GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasing), new Object[]{ "PSP", "PGP", "PSP", @@ -47,23 +66,23 @@ public class CasingLoader implements IWerkstoffRunnable { 'G', werkstoff.get(gearGtSmall) }); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - werkstoff.get(plate,6), - werkstoff.get(screw,2), + werkstoff.get(plate, 6), + werkstoff.get(screw, 2), werkstoff.get(gearGtSmall) - }, GT_Values.NF,werkstoff.get(blockCasing), 200, 30); + }, GT_Values.NF, werkstoff.get(blockCasing), 200, 30); - GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasingAdvanced),new Object[]{ + GT_ModHandler.addCraftingRecipe(werkstoff.get(blockCasingAdvanced), new Object[]{ "PSP", "PGP", "PSP", - 'P', werkstoff.get(plateDouble), + 'P', werkstoff.get(reboltedCasingsOuterStuff), 'S', werkstoff.get(screw), 'G', werkstoff.get(gearGt) }); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ - werkstoff.get(plateDouble,6), - werkstoff.get(screw,2), + werkstoff.get(reboltedCasingsOuterStuff, 6), + werkstoff.get(screw, 2), werkstoff.get(gearGt) - }, GT_Values.NF,werkstoff.get(blockCasingAdvanced), 200, 30); + }, GT_Values.NF, werkstoff.get(blockCasingAdvanced), 200, 30); } } \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java index bf077f47e1..3e5984df6d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oredict/OreDictHandler.java @@ -27,6 +27,7 @@ import com.github.bartimaeusnek.bartworks.util.Pair; import com.github.bartimaeusnek.crossmod.BartWorksCrossmod; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -76,7 +77,7 @@ public class OreDictHandler { Pair p = OreDictHandler.cache.get(prefixes+elementName.replaceAll(" ","")); return new ItemStack(Item.getItemById(p.getKey()),amount,p.getValue()); } else if (!OreDictionary.getOres(prefixes+elementName.replaceAll(" ","")).isEmpty()){ - ItemStack tmp = OreDictionary.getOres(prefixes+elementName.replaceAll(" ","")).get(0).copy(); + ItemStack tmp = GT_OreDictUnificator.get(OreDictionary.getOres(prefixes+elementName.replaceAll(" ","")).get(0).copy()).copy(); OreDictHandler.cache.put(prefixes+elementName.replaceAll(" ",""),new Pair<>(Item.getIdFromItem(tmp.getItem()), (short) tmp.getItemDamage())); tmp.stackSize=amount; return tmp; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java new file mode 100644 index 0000000000..9eb8e70d77 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Tooltip_Reference.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.util; + +import static net.minecraft.util.EnumChatFormatting.*; +import net.minecraft.util.StatCollector; + +import java.util.function.Supplier; + +public class BW_Tooltip_Reference { + public static final String BW_NO_RESET = ChatColorHelper.DARKGREEN + "BartWorks"; + public static final String TT_NO_RESET = BLUE + "Tec" + DARK_BLUE + "Tech"; + public static final String BW = BW_NO_RESET + GRAY; + public static final String TT = TT_NO_RESET + GRAY; + public static final Supplier ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS = () -> StatCollector.translateToLocal("tooltip.bw.1.name") + " " + BW; + public static final Supplier ADDED_BY_BARTWORKS = () -> StatCollector.translateToLocal("tooltip.bw.0.name") + " " + BW; + public static final String ADV_STR_CHECK = "Uses an advanced "+ TT +" structure check, due to "+ BW; + + public static String[] getTranslatedBrandedTooltip(String key){ + String[] dsc = StatCollector.translateToLocal(key).split(";"); + String[] fdsc = new String[dsc.length + 1]; + System.arraycopy(dsc, 0, fdsc, 0, dsc.length); + fdsc[dsc.length] = ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get(); + return fdsc; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java index 4cbb55c278..4529aa5202 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityList.java @@ -158,6 +158,11 @@ public class AccessPriorityList implements List, Deque, Set { return new AccessPriorityListIterators.AccessPriorityListIterator<>(head); } + public Iterator> nodeIterator() { + return new AccessPriorityListIterators.AccessPriorityListNodeIterator<>(head); + } + + @Override public Iterator descendingIterator() { return new AccessPriorityListIterators.AccessPriorityListReverseIterator<>(tail); @@ -329,10 +334,11 @@ public class AccessPriorityList implements List, Deque, Set { } } - public void addPrioToNode(int index, long prio) { - if (!isValidIndex(index)) - return; - AccessPriorityListNode node = getNode(index); + public void addPrioToNode(AccessPriorityListNode node) { + addPrioToNode(node, 1L); + } + + public void addPrioToNode(AccessPriorityListNode node, long prio){ long current = node.getPriority(); if (current == Long.MAX_VALUE || (current > 0 && prio > 0 && prio + current < 0)) node.setPriority(Long.MAX_VALUE); @@ -343,6 +349,13 @@ public class AccessPriorityList implements List, Deque, Set { } } + public void addPrioToNode(int index, long prio) { + if (!isValidIndex(index)) + return; + AccessPriorityListNode node = getNode(index); + addPrioToNode(node, prio); + } + public void addPrioToNode(int index) { addPrioToNode(index, 1L); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java index 3b85030d1e..ec842ede30 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/accessprioritylist/AccessPriorityListIterators.java @@ -143,4 +143,24 @@ public class AccessPriorityListIterators { } } + public static class AccessPriorityListNodeIterator implements Iterator> { + final AccessPriorityListNode head; + AccessPriorityListNode current; + public AccessPriorityListNodeIterator(AccessPriorityListNode head) { + this.head = this.current = head; + } + + @Override + public boolean hasNext() { + return current != null; + } + + @Override + public AccessPriorityListNode next() { + AccessPriorityListNode ret = current; + current = current.getNext(); + return ret; + } + } + } diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java b/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java index 526a9f6be7..d20f191dd7 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java @@ -27,6 +27,10 @@ import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.crossmod.GTpp.loader.RadioHatchCompat; import com.github.bartimaeusnek.crossmod.galacticraft.GalacticraftProxy; import com.github.bartimaeusnek.crossmod.tectech.TecTechResearchLoader; +import com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement.TT_ElectronicBlastFurnace; +import com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement.TT_ImplosionCompressor; +import com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement.TT_OilCrackingUnit; +import com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement.TT_VaccuumFreezer; import com.github.bartimaeusnek.crossmod.thaumcraft.CustomAspects; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.event.FMLInitializationEvent; @@ -75,6 +79,13 @@ public class BartWorksCrossmod { public void init(FMLInitializationEvent init) { if (LoaderReference.GalacticraftCore) GalacticraftProxy.init(init); + //Base GT -> TT Replacement + //if (LoaderReference.tectech) { + // new TT_VaccuumFreezer(null); + // new TT_OilCrackingUnit(null); + // new TT_ImplosionCompressor(null); + // new TT_ElectronicBlastFurnace(null); + //} } @Mod.EventHandler diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java b/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java index bc81b2026c..f4400fab11 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/galacticgreg/GT_TileEntity_VoidMiner_Base.java @@ -34,7 +34,7 @@ import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; import com.github.bartimaeusnek.bartworks.system.oregen.BW_OreLayer; import com.github.bartimaeusnek.bartworks.system.oregen.BW_WorldGenRoss128b; import com.github.bartimaeusnek.bartworks.system.oregen.BW_WorldGenRoss128ba; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.Pair; import com.google.common.collect.ArrayListMultimap; import gregtech.api.GregTech_API; @@ -48,7 +48,6 @@ import gregtech.common.GT_Worldgen_GT_Ore_SmallPieces; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.StatCollector; import net.minecraft.world.gen.ChunkProviderServer; import net.minecraftforge.fluids.FluidStack; @@ -160,7 +159,7 @@ public abstract class GT_TileEntity_VoidMiner_Base extends GT_MetaTileEntity_Dri "Can be supplied with 2L/s of Neon(x4), Krypton(x8), Xenon(x16) or Oganesson(x64)", "for higher outputs.", "Will output "+(2*TIER_MULTIPLIER)+" Ores per Second depending on the Dimension it is build in", - StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks" + BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() }; } diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechEnabledMulti.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechEnabledMulti.java index 9f78d02d5a..bda1ae72ca 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechEnabledMulti.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechEnabledMulti.java @@ -22,7 +22,7 @@ package com.github.bartimaeusnek.crossmod.tectech; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel; import gregtech.api.enums.GT_Values; @@ -83,7 +83,7 @@ public interface TecTechEnabledMulti { return new String[]{ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " - + EnumChatFormatting.GREEN + multiBlockBase.mProgresstime / 20 + EnumChatFormatting.RESET + " s / " + EnumChatFormatting.YELLOW + multiBlockBase.mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + storedEnergy + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED + -multiBlockBase.mEUt + EnumChatFormatting.RESET + " EU/t", StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + multiBlockBase.getMaxInputVoltage() + EnumChatFormatting.RESET + " EU/t(*2A) " + StatCollector.translateToLocal("GT5U.machines.tier") + ": " + EnumChatFormatting.YELLOW + GT_Values.VN[GT_Utility.getTier(multiBlockBase.getMaxInputVoltage())] + EnumChatFormatting.RESET, StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED + (multiBlockBase.getIdealStatus() - multiBlockBase.getRepairStatus()) + EnumChatFormatting.RESET + " " + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + ": " + EnumChatFormatting.YELLOW + (float) multiBlockBase.mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %", StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"}; + + EnumChatFormatting.GREEN + multiBlockBase.mProgresstime / 20 + EnumChatFormatting.RESET + " s / " + EnumChatFormatting.YELLOW + multiBlockBase.mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + storedEnergy + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED + -multiBlockBase.mEUt + EnumChatFormatting.RESET + " EU/t", StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + multiBlockBase.getMaxInputVoltage() + EnumChatFormatting.RESET + " EU/t(*2A) " + StatCollector.translateToLocal("GT5U.machines.tier") + ": " + EnumChatFormatting.YELLOW + GT_Values.VN[GT_Utility.getTier(multiBlockBase.getMaxInputVoltage())] + EnumChatFormatting.RESET, StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED + (multiBlockBase.getIdealStatus() - multiBlockBase.getRepairStatus()) + EnumChatFormatting.RESET + " " + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + ": " + EnumChatFormatting.YELLOW + (float) multiBlockBase.mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %", BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()}; } } diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechUtils.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechUtils.java deleted file mode 100644 index 7759eddfd5..0000000000 --- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/TecTechUtils.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2018-2020 bartimaeusnek - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package com.github.bartimaeusnek.crossmod.tectech; - -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; - -public class TecTechUtils { - - public static boolean addEnergyInputToMachineList(TecTechEnabledMulti baseTE, IGregTechTileEntity te, int aBaseCasingIndex) { - if (te == null || !(te.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch)) - return false; - else { - GT_MetaTileEntity_Hatch mte = (GT_MetaTileEntity_Hatch) te.getMetaTileEntity(); - - if (mte instanceof GT_MetaTileEntity_Hatch_Energy) - baseTE.getVanillaEnergyHatches().add((GT_MetaTileEntity_Hatch_Energy) mte); - else if (mte instanceof GT_MetaTileEntity_Hatch_EnergyTunnel) - baseTE.getTecTechEnergyTunnels().add((GT_MetaTileEntity_Hatch_EnergyTunnel) mte); - else if (mte instanceof GT_MetaTileEntity_Hatch_EnergyMulti) - baseTE.getTecTechEnergyMultis().add((GT_MetaTileEntity_Hatch_EnergyMulti) mte); - else - return false; - - mte.updateTexture(aBaseCasingIndex); - return true; - } - } - - public static boolean drainEnergyMEBFTecTech(TecTechEnabledMulti multi, long aEU) { - if (aEU <= 0) - return true; - - long allTheEu = 0; - int hatches = 0; - for (GT_MetaTileEntity_Hatch_Energy tHatch : multi.getVanillaEnergyHatches()) - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - allTheEu += tHatch.getEUVar(); - hatches++; - } - - for (GT_MetaTileEntity_Hatch_EnergyTunnel tHatch : multi.getTecTechEnergyTunnels()) - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - allTheEu += tHatch.getEUVar(); - hatches++; - } - - for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : multi.getTecTechEnergyMultis()) - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - allTheEu += tHatch.getEUVar(); - hatches++; - } - - if (allTheEu < aEU) - return false; - - long euperhatch = aEU / hatches; - - boolean hasDrained = false; - - for (GT_MetaTileEntity_Hatch_Energy tHatch : multi.getVanillaEnergyHatches()) - hasDrained |= tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euperhatch, false); - - for (GT_MetaTileEntity_Hatch_EnergyTunnel tHatch : multi.getTecTechEnergyTunnels()) - hasDrained |= tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euperhatch, false); - - for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : multi.getTecTechEnergyMultis()) - hasDrained |= tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euperhatch, false); - - return hasDrained && (multi.getVanillaEnergyHatches().size() > 0 || multi.getTecTechEnergyTunnels().size() > 0 || multi.getTecTechEnergyMultis().size() > 0); - } - - public static long getnominalVoltageTT(TecTechEnabledMulti base) { - long rVoltage = 0L; - long rAmperage = 0L; - - for (GT_MetaTileEntity_Hatch_Energy tHatch : base.getVanillaEnergyHatches()) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - rVoltage = Math.max(tHatch.getBaseMetaTileEntity().getInputVoltage(), rVoltage); - rAmperage += tHatch.getBaseMetaTileEntity().getInputAmperage(); - } - } - - for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : base.getTecTechEnergyMultis()) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - rVoltage = Math.max(tHatch.getBaseMetaTileEntity().getInputVoltage(), rVoltage); - rAmperage += tHatch.Amperes; - } - } - - for (GT_MetaTileEntity_Hatch_EnergyTunnel tHatch : base.getTecTechEnergyTunnels()) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - rVoltage = Math.max(getEUPerTickFromLaser(tHatch), rVoltage); - rAmperage += 1; - } - } - - return rVoltage * rAmperage; - } - - public static long getMaxInputVoltage(TecTechEnabledMulti base) { - long rVoltage = 0L; - for (GT_MetaTileEntity_Hatch_Energy tHatch : base.getVanillaEnergyHatches()) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); - } - } - for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : base.getTecTechEnergyMultis()) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); - } - } - for (GT_MetaTileEntity_Hatch_EnergyTunnel tHatch : base.getTecTechEnergyTunnels()) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - rVoltage += getEUPerTickFromLaser(tHatch); - } - } - return rVoltage; - } - - public static long getEUPerTickFromLaser(GT_MetaTileEntity_Hatch_EnergyTunnel tHatch) { - return tHatch.Amperes * tHatch.maxEUInput() - (tHatch.Amperes / 20); - } -} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/CoilAdder.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/CoilAdder.java new file mode 100644 index 0000000000..8cec3450a7 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/CoilAdder.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.crossmod.tectech.helper; + +import com.github.technus.tectech.TecTech; +import com.github.technus.tectech.mechanics.structure.IStructureElement; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import gregtech.api.GregTech_API; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class CoilAdder implements IStructureElement { + + private CoilAdder(){} + + @SuppressWarnings("rawtypes") + private static final CoilAdder INSTANCE = new CoilAdder(); + + @SuppressWarnings("unchecked") + public static CoilAdder getINSTANCE() { + return INSTANCE; + } + + @Override + public boolean check(MultiBlock multiBlock, World world, int x, int y, int z) { + if (multiBlock.getCoilMeta() == -1) + multiBlock.setCoilMeta((short) world.getBlockMetadata(x, y, z)); + return multiBlock.getCoilMeta() == (short) world.getBlockMetadata(x, y, z) + && GregTech_API.sBlockCasings5 == world.getBlock(x, y, z); + } + + @Override + public boolean placeBlock(MultiBlock MultiBlock, World world, int x, int y, int z, ItemStack trigger) { + world.setBlock(x, y, z, GregTech_API.sBlockCasings5, 0, 2); + return true; + } + + @Override + public boolean spawnHint(MultiBlock MultiBlock, World world, int x, int y, int z, ItemStack trigger) { + TecTech.proxy.hint_particle(world, x, y, z, GregTech_API.sBlockCasings5, 0); + return true; + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/IHasCoils.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/IHasCoils.java new file mode 100644 index 0000000000..ea987e2426 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/IHasCoils.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.crossmod.tectech.helper; + +public interface IHasCoils { + void setCoilMeta(short coilMeta); + short getCoilMeta(); +} diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/StructureDefinitions.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/StructureDefinitions.java new file mode 100644 index 0000000000..7e1b225a2a --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/StructureDefinitions.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.crossmod.tectech.helper; + +import static com.github.technus.tectech.mechanics.structure.StructureUtility.transpose; + +public enum StructureDefinitions { + CUBE_NO_MUFFLER(transpose( + new String[][]{ + {"VVV", "VVV", "VVV"}, + {"V~V", "V-V", "VVV"}, + {"VVV", "VVV", "VVV"} + })) + , + CUBE_MUFFLER(transpose( + new String[][]{ + {"VVV", "VMV", "VVV"}, + {"V~V", "V-V", "VVV"}, + {"VVV", "VVV", "VVV"} + })) + ; + + private final String[][] definition; + + public String[][] getDefinition() { + return definition; + } + + StructureDefinitions(String[][] definition) { + this.definition = definition; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/TecTechUtils.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/TecTechUtils.java new file mode 100644 index 0000000000..bc28090155 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/helper/TecTechUtils.java @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.crossmod.tectech.helper; + +import com.github.bartimaeusnek.crossmod.tectech.TecTechEnabledMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; + +public class TecTechUtils { + + public static boolean addEnergyInputToMachineList(TecTechEnabledMulti baseTE, IGregTechTileEntity te, int aBaseCasingIndex) { + if (te == null || !(te.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch)) + return false; + else { + GT_MetaTileEntity_Hatch mte = (GT_MetaTileEntity_Hatch) te.getMetaTileEntity(); + + if (mte instanceof GT_MetaTileEntity_Hatch_Energy) + baseTE.getVanillaEnergyHatches().add((GT_MetaTileEntity_Hatch_Energy) mte); + else if (mte instanceof GT_MetaTileEntity_Hatch_EnergyTunnel) + baseTE.getTecTechEnergyTunnels().add((GT_MetaTileEntity_Hatch_EnergyTunnel) mte); + else if (mte instanceof GT_MetaTileEntity_Hatch_EnergyMulti) + baseTE.getTecTechEnergyMultis().add((GT_MetaTileEntity_Hatch_EnergyMulti) mte); + else + return false; + + mte.updateTexture(aBaseCasingIndex); + return true; + } + } + + public static boolean drainEnergyMEBFTecTech(TecTechEnabledMulti multi, long aEU) { + if (aEU <= 0) + return true; + + long allTheEu = 0; + int hatches = 0; + for (GT_MetaTileEntity_Hatch_Energy tHatch : multi.getVanillaEnergyHatches()) + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + allTheEu += tHatch.getEUVar(); + hatches++; + } + + for (GT_MetaTileEntity_Hatch_EnergyTunnel tHatch : multi.getTecTechEnergyTunnels()) + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + allTheEu += tHatch.getEUVar(); + hatches++; + } + + for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : multi.getTecTechEnergyMultis()) + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + allTheEu += tHatch.getEUVar(); + hatches++; + } + + if (allTheEu < aEU) + return false; + + long euperhatch = aEU / hatches; + + boolean hasDrained = false; + + for (GT_MetaTileEntity_Hatch_Energy tHatch : multi.getVanillaEnergyHatches()) + hasDrained |= tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euperhatch, false); + + for (GT_MetaTileEntity_Hatch_EnergyTunnel tHatch : multi.getTecTechEnergyTunnels()) + hasDrained |= tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euperhatch, false); + + for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : multi.getTecTechEnergyMultis()) + hasDrained |= tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(euperhatch, false); + + return hasDrained && (multi.getVanillaEnergyHatches().size() > 0 || multi.getTecTechEnergyTunnels().size() > 0 || multi.getTecTechEnergyMultis().size() > 0); + } + + public static long getnominalVoltageTT(TecTechEnabledMulti base) { + long rVoltage = 0L; + long rAmperage = 0L; + + for (GT_MetaTileEntity_Hatch_Energy tHatch : base.getVanillaEnergyHatches()) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + rVoltage = Math.max(tHatch.getBaseMetaTileEntity().getInputVoltage(), rVoltage); + rAmperage += tHatch.getBaseMetaTileEntity().getInputAmperage(); + } + } + + for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : base.getTecTechEnergyMultis()) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + rVoltage = Math.max(tHatch.getBaseMetaTileEntity().getInputVoltage(), rVoltage); + rAmperage += tHatch.Amperes; + } + } + + for (GT_MetaTileEntity_Hatch_EnergyTunnel tHatch : base.getTecTechEnergyTunnels()) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + rVoltage = Math.max(getEUPerTickFromLaser(tHatch), rVoltage); + rAmperage += 1; + } + } + + return rVoltage * rAmperage; + } + + public static long getMaxInputVoltage(TecTechEnabledMulti base) { + long rVoltage = 0L; + for (GT_MetaTileEntity_Hatch_Energy tHatch : base.getVanillaEnergyHatches()) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); + } + } + for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : base.getTecTechEnergyMultis()) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage(); + } + } + for (GT_MetaTileEntity_Hatch_EnergyTunnel tHatch : base.getTecTechEnergyTunnels()) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { + rVoltage += getEUPerTickFromLaser(tHatch); + } + } + return rVoltage; + } + + public static long getEUPerTickFromLaser(GT_MetaTileEntity_Hatch_EnergyTunnel tHatch) { + return tHatch.Amperes * tHatch.maxEUInput() - (tHatch.Amperes / 20); + } +} \ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_ElectronicBlastFurnace.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_ElectronicBlastFurnace.java new file mode 100644 index 0000000000..ab6eaca7a0 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_ElectronicBlastFurnace.java @@ -0,0 +1,442 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement; + +import com.github.bartimaeusnek.crossmod.tectech.helper.CoilAdder; +import com.github.bartimaeusnek.crossmod.tectech.helper.IHasCoils; +import com.github.technus.tectech.mechanics.constructable.IConstructable; +import com.github.technus.tectech.mechanics.structure.IStructureDefinition; +import com.github.technus.tectech.mechanics.structure.StructureDefinition; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; +import com.google.common.collect.ImmutableSet; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_MultiMachine; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.interfaces.tileentity.ITurnable; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import java.util.ArrayList; +import java.util.Set; + +import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.ADV_STR_CHECK; +import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; +import static gregtech.api.enums.GT_Values.V; + +public class TT_ElectronicBlastFurnace extends GT_MetaTileEntity_MultiblockBase_EM implements IHasCoils, IConstructable { + + public TT_ElectronicBlastFurnace(Object unused) { + super(32765, "multimachine.blastfurnace", "Electric Blast Furnace"); + GregTech_API.METATILEENTITIES[32765] = null; + GregTech_API.METATILEENTITIES[1000] = this; + } + + private TT_ElectronicBlastFurnace(String aName) { + super(aName); + } + + private short coilMeta = -1; + private static final byte TEXTURE_INDEX = 11; + private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition + .builder() + .addShape("main", + transpose(new String[][]{ + {"AAA", "AMA", "AAA"}, + {"CCC", "C-C", "CCC"}, + {"CCC", "C-C", "CCC"}, + {"B~B", "BBB", "BBB"} + }) + ).addElement( + 'C', + CoilAdder.getINSTANCE() + ).addElement( + 'M', + ofHatchAdder( + GT_MetaTileEntity_MultiblockBase_EM::addClassicMufflerToMachineList, TEXTURE_INDEX, + 1 + ) + ).addElement( + 'A', + ofHatchAdderOptional( + TT_ElectronicBlastFurnace::addEBFInputsTop, TEXTURE_INDEX, + GregTech_API.sBlockCasings1, TEXTURE_INDEX, + GregTech_API.sBlockCasings1, TEXTURE_INDEX + ) + ).addElement( + 'B', + ofHatchAdderOptional( + TT_ElectronicBlastFurnace::addEBFInputsBottom, TEXTURE_INDEX, + GregTech_API.sBlockCasings1, TEXTURE_INDEX, + GregTech_API.sBlockCasings1, TEXTURE_INDEX + ) + ) + .build(); + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; + } + + @Override + protected boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + this.setCoilMeta((short) -1); + boolean ret = this.structureCheck_EM("main", 1, 3, 0) && this.getHeatingCapacity() > -1; + if (this.mMufflerHatches.stream() + .map(MetaTileEntity::getBaseMetaTileEntity) + .mapToInt(ITurnable::getFrontFacing) + .noneMatch(x -> x == this.getExtendedFacing().getRelativeUpInWorld().ordinal())) + return false; + return ret; + } + + @Override + public void construct(ItemStack itemStack, boolean b) { + this.structureBuild_EM("main", 1,3,0, b, itemStack); + } + + @Override + protected boolean cyclicUpdate_EM() { + return false; + } + + public final boolean addEBFInputsTop(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) + return false; + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + else + return false; + + return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); + } + + private static final Set POLLUTION_FLUID_STACKS = ImmutableSet.of( + Materials.CarbonDioxide.getGas(1000), + Materials.CarbonMonoxide.getGas(1000), + Materials.SulfurDioxide.getGas(1000) + ); + + @Override + public boolean addOutput(FluidStack aLiquid) { + if (aLiquid == null) + return false; + FluidStack tLiquid = aLiquid.copy(); + + if (POLLUTION_FLUID_STACKS.stream().anyMatch(tLiquid::isFluidEqual)) { + tLiquid.amount = tLiquid.amount * (mMufflerHatches.stream() + .filter(GT_MetaTileEntity_MultiBlockBase::isValidMetaTileEntity) + .findFirst() + .map(tHatch -> 100 - tHatch.calculatePollutionReduction(100)) + .orElse(0) + 5) / 100; + } + + for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { + if ( + (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) + ? !tHatch.outputsSteam() + : !tHatch.outputsLiquids()) + || tHatch.getBaseMetaTileEntity().getYCoord() <= this.getBaseMetaTileEntity().getYCoord()) + continue; + int tAmount = tHatch.fill(tLiquid, false); + if (tAmount >= tLiquid.amount) + return tHatch.fill(tLiquid, true) >= tLiquid.amount; + else if (tAmount > 0) + tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true); + } + return false; + } + + public final boolean addEBFInputsBottom(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) + return false; + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + else + return false; + + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) + return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) + return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) + return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) + return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) + return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) + return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyMulti) + return this.eEnergyMulti.add((GT_MetaTileEntity_Hatch_EnergyMulti) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DynamoMulti) + return this.eDynamoMulti.add((GT_MetaTileEntity_Hatch_DynamoMulti) aMetaTileEntity); + return false; + } + + public String[] getDescription() { + return new String[]{ + "Controller Block for the Blast Furnace", + "Size(WxHxD): 3x4x3 (Hollow), Controller (Front middle bottom)", + "16x Heating Coils (Two middle Layers, hollow)", + "1x Input Hatch/Bus (Any bottom layer casing)", + "1x Output Hatch/Bus (Any bottom layer casing)", + "1x Energy Hatch (Any bottom layer casing)", + "1x Maintenance Hatch (Any bottom layer casing)", + "1x Muffler Hatch (Top middle)", + "1x Output Hatch to recover CO2/CO/SO2 (optional, any top layer casing),", + " Recovery scales with Muffler Hatch tier", + "Heat Proof Machine Casings for the rest", + "Each 900K over the min. Heat Capacity multiplies eu/t by 0.95", + "Each 1800K over the min. Heat Capacity allows for one upgraded overclock", + "Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%", + "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second", + ADV_STR_CHECK + }; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][11], new TT_RenderedExtendedFacingTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][11]}; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ElectricBlastFurnace.png"); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public void setCoilMeta(short coilMeta) { + this.coilMeta = coilMeta; + } + + @Override + public short getCoilMeta() { + return coilMeta; + } + + private int getHeatingCapacity() { + switch (coilMeta) { + case 0: + return 1801; + case 1: + return 2701; + case 2: + return 3601; + case 3: + return 4501; + case 4: + return 5401; + case 5: + return 7201; + case 6: + return 9001; + case 7: + return 9901; + case 8: + return 10801; + default: + return -1; + } + } + + @Override + public String[] getStructureDescription(ItemStack itemStack) { + return new String[0]; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { + return new TT_ElectronicBlastFurnace(this.mName); + } + + public boolean checkRecipe_EM(ItemStack aStack) { + ArrayList tInputList = getStoredInputs(); + int tInputList_sS = tInputList.size(); + for (int i = 0; i < tInputList_sS - 1; i++) { + for (int j = i + 1; j < tInputList_sS; j++) { + if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { + if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { + tInputList.remove(j--); + tInputList_sS = tInputList.size(); + } else { + tInputList.remove(i--); + tInputList_sS = tInputList.size(); + break; + } + } + } + } + ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]); + + ArrayList tFluidList = getStoredFluids(); + int tFluidList_sS = tFluidList.size(); + for (int i = 0; i < tFluidList_sS - 1; i++) { + for (int j = i + 1; j < tFluidList_sS; j++) { + if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) { + if (tFluidList.get(i).amount >= tFluidList.get(j).amount) { + tFluidList.remove(j--); + tFluidList_sS = tFluidList.size(); + } else { + tFluidList.remove(i--); + tFluidList_sS = tFluidList.size(); + break; + } + } + } + } + FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]); + if (tInputList.size() > 0) { + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs); + if (tRecipe == null + || (this.getHeatingCapacity() < tRecipe.mSpecialValue) + || (!tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) { + return false; + } + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + int tHeatCapacityDivTiers = (this.getHeatingCapacity() - tRecipe.mSpecialValue) / 900; + byte overclockCount = calculateOverclockednessEBF(tRecipe.mEUt, tRecipe.mDuration, tVoltage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + if (this.mEUt > 0) + this.mEUt = (-this.mEUt); + + if (tHeatCapacityDivTiers > 0) { + this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); + this.mMaxProgresstime >>= Math.min(tHeatCapacityDivTiers / 2, overclockCount);//extra free overclocking if possible + if (this.mMaxProgresstime < 1) + this.mMaxProgresstime = 1;//no eu efficiency correction + } + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)}; + this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; + updateSlots(); + return true; + } + return false; + } + + /** + * Calcualtes overclocked ness using long integers + * + * @param aEUt - recipe EUt + * @param aDuration - recipe Duration + */ + protected byte calculateOverclockednessEBF(int aEUt, int aDuration, long maxInputVoltage) { + byte mTier = (byte) Math.max(0, GT_Utility.getTier(maxInputVoltage)), timesOverclocked = 0; + if (mTier == 0) { + //Long time calculation + long xMaxProgresstime = ((long) aDuration) << 1; + if (xMaxProgresstime > Integer.MAX_VALUE - 1) { + //make impossible if too long + mEUt = Integer.MAX_VALUE - 1; + mMaxProgresstime = Integer.MAX_VALUE - 1; + } else { + mEUt = aEUt >> 2; + mMaxProgresstime = (int) xMaxProgresstime; + } + //return 0; + } else { + //Long EUt calculation + long xEUt = aEUt; + //Isnt too low EUt check? + long tempEUt = Math.max(xEUt, V[1]); + + mMaxProgresstime = aDuration; + + while (tempEUt <= V[mTier - 1]) { + tempEUt <<= 2;//this actually controls overclocking + //xEUt *= 4;//this is effect of everclocking + mMaxProgresstime >>= 1;//this is effect of overclocking + xEUt = mMaxProgresstime == 0 ? xEUt >> 1 : xEUt << 2;//U know, if the time is less than 1 tick make the machine use less power + timesOverclocked++; + } + if (xEUt > Integer.MAX_VALUE - 1) { + mEUt = Integer.MAX_VALUE - 1; + mMaxProgresstime = Integer.MAX_VALUE - 1; + } else { + mEUt = (int) xEUt; + if (mEUt == 0) + mEUt = 1; + if (mMaxProgresstime == 0) + mMaxProgresstime = 1;//set time to 1 tick + } + } + return timesOverclocked; + } + + @Override + public boolean isMachineBlockUpdateRecursive() { + return true; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 20; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_ImplosionCompressor.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_ImplosionCompressor.java new file mode 100644 index 0000000000..387540cfb1 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_ImplosionCompressor.java @@ -0,0 +1,261 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement; + +import com.github.bartimaeusnek.crossmod.tectech.helper.StructureDefinitions; +import com.github.technus.tectech.mechanics.constructable.IConstructable; +import com.github.technus.tectech.mechanics.structure.IStructureDefinition; +import com.github.technus.tectech.mechanics.structure.StructureDefinition; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; +import com.google.common.collect.ArrayListMultimap; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_MultiMachine; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +import java.util.List; + +import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.*; +import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; + +public class TT_ImplosionCompressor extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + + public TT_ImplosionCompressor(Object unused) { + super(32765, "multimachine.implosioncompressor", "Implosion Compressor"); + GregTech_API.METATILEENTITIES[32765] = null; + GregTech_API.METATILEENTITIES[1001] = this; + } + + private TT_ImplosionCompressor(String aName) { + super(aName); + } + + @Override + protected boolean cyclicUpdate_EM() { + return false; + } + + private byte blocks = 0; + + private static final byte TEXTURE_INDEX = 16; + private static final byte SOUND_INDEX = 20; + + private static final ArrayListMultimap BLOCKS = ArrayListMultimap.create(); + + static { + BLOCKS.put(GregTech_API.sBlockCasings2,0); + BLOCKS.put(GregTech_API.sBlockCasings3,4); + } + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder().addShape("main", + StructureDefinitions.CUBE_NO_MUFFLER.getDefinition() + ).addElement( + 'V', + ofChain( + ofHatchAdder( + TT_ImplosionCompressor::addImplosionHatches, + TEXTURE_INDEX, + 1 + ), + onElementPass( + x -> ++x.blocks, + ofBlocksMap( + BLOCKS.asMap(),GregTech_API.sBlockCasings2, + 0 + ) + ) + ) + ).build(); + + public final boolean addImplosionHatches(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity != null) { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + else + return false; + + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) + return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) + return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) + return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) + return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyMulti) + return this.eEnergyMulti.add((GT_MetaTileEntity_Hatch_EnergyMulti) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DynamoMulti) + return this.eDynamoMulti.add((GT_MetaTileEntity_Hatch_DynamoMulti) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) + return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity); + } + return false; + } + + @Override + protected boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + this.blocks = 0; + return this.structureCheck_EM("main", 1,1,0) + && this.blocks >= 16; + } + + @Override + public void construct(ItemStack itemStack, boolean b) { + this.structureBuild_EM("main", 1,1,0, b, itemStack); + } + + @Override + public String[] getStructureDescription(ItemStack itemStack) { + return new String[0]; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { + return new TT_ImplosionCompressor(this.mName); + } + + @Override + public String[] getDescription() { + return new String[]{ + "Controller Block for the Implosion Compressor", + "Size(WxHxD): 3x3x3 (Hollow), Controller (Front centered)", + "1x Input Bus (Any casing)", + "1x Output Bus (Any casing)", + "1x Maintenance Hatch (Any casing)", + "1x Muffler Hatch (Any casing)", + "1x Energy Hatch (Any casing)", + "Solid Steel Machine Casings for the rest (16 at least!)", + "Casings can be replaced with Explosion Warning Signs", + "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second", + ADV_STR_CHECK + }; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][TEXTURE_INDEX], new TT_RenderedExtendedFacingTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][TEXTURE_INDEX]}; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ImplosionCompressor.png"); + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; + } + + @Override + public boolean checkRecipe_EM(ItemStack aStack) { + List tInputList = getStoredInputs(); + int tInputList_sS=tInputList.size(); + for (int i = 0; i < tInputList_sS - 1; i++) { + for (int j = i + 1; j < tInputList_sS; j++) { + if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { + if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { + tInputList.remove(j--); + tInputList_sS=tInputList.size(); + } else { + tInputList.remove(i--); + tInputList_sS=tInputList.size(); + break; + } + } + } + } + ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]); + if (tInputList.size() > 0) { + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes.findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs); + if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) { + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + //OC THAT EXPLOSIVE SHIT!!! + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, getMaxInputVoltage()); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)}; + sendLoopStart(SOUND_INDEX); + updateSlots(); + return true; + } + } + return false; + } + + @Override + public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) { + super.startSoundLoop(aIndex, aX, aY, aZ); + if (aIndex == SOUND_INDEX) { + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(5), 10, 1.0F, aX, aY, aZ); + } + } + + + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 500; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_OilCrackingUnit.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_OilCrackingUnit.java new file mode 100644 index 0000000000..e35782eaf0 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_OilCrackingUnit.java @@ -0,0 +1,325 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement; + +import com.github.bartimaeusnek.crossmod.tectech.helper.CoilAdder; +import com.github.bartimaeusnek.crossmod.tectech.helper.IHasCoils; +import com.github.technus.tectech.mechanics.constructable.IConstructable; +import com.github.technus.tectech.mechanics.structure.IStructureDefinition; +import com.github.technus.tectech.mechanics.structure.StructureDefinition; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_MultiMachine; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import java.util.ArrayList; + +import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.ADV_STR_CHECK; +import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; + +public class TT_OilCrackingUnit extends GT_MetaTileEntity_MultiblockBase_EM implements IHasCoils, IConstructable { + + public TT_OilCrackingUnit(Object unused) { + super(32765, "multimachine.cracker", "Oil Cracking Unit"); + GregTech_API.METATILEENTITIES[32765] = null; + GregTech_API.METATILEENTITIES[1160] = this; + } + + private TT_OilCrackingUnit(String aName) { + super(aName); + } + + private short coilMeta = -1; + + @Override + public void setCoilMeta(short coilMeta) { + this.coilMeta = coilMeta; + } + + @Override + public short getCoilMeta() { + return coilMeta; + } + + private byte blocks = 0; + + private static final byte TEXTURE_INDEX = 49; + + @Override + protected boolean cyclicUpdate_EM() { + return false; + } + + private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder().addShape("main", + transpose(new String[][]{ + {"ABABA","ABGBA","ABABA"}, + {"AB~BA","E---F","ABABA"}, + {"ABCBA","ABABA","ABABA"} + }) + ).addElement( + 'A', + onElementPass( + x -> ++x.blocks,ofBlock( + GregTech_API.sBlockCasings4, + 1 + ) + ) + ).addElement( + 'B', + CoilAdder.getINSTANCE() + ).addElement( + 'C', + ofHatchAdder( + GT_MetaTileEntity_MultiblockBase_EM::addClassicMaintenanceToMachineList, + TEXTURE_INDEX, + 1 + ) + ).addElement( + 'E', + ofHatchAdder( + TT_OilCrackingUnit::addInputFluidHatch, + TEXTURE_INDEX, + 2 + ) + ).addElement( + 'F', + ofHatchAdder( + TT_OilCrackingUnit::addOutputFluidHatch, + TEXTURE_INDEX, + 3 + ) + ).addElement( + 'G', + ofHatchAdder( + TT_OilCrackingUnit::addMiddleFluidHatch, + TEXTURE_INDEX, + 4 + ) + ).build(); + + GT_MetaTileEntity_Hatch_Input middleFluidHatch; + + public final boolean addMiddleFluidHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) + return false; + else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); + ((GT_MetaTileEntity_Hatch_Input)aMetaTileEntity).mRecipeMap = this.getRecipeMap(); + this.middleFluidHatch = (GT_MetaTileEntity_Hatch_Input)aMetaTileEntity; + return true; + } else + return false; + } + } + + @Override + protected boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + this.coilMeta = -1; + this.blocks = 0; + return this.structureCheck_EM("main", 2,1,0) + && this.blocks >= 18; + } + + public final boolean addOutputFluidHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) + return false; + else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)aMetaTileEntity); + } else + return false; + } + } + + public final boolean addInputFluidHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) + return false; + else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); + ((GT_MetaTileEntity_Hatch_Input)aMetaTileEntity).mRecipeMap = this.getRecipeMap(); + return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input)aMetaTileEntity); + } else + return false; + } + } + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { + return new TT_OilCrackingUnit(this.mName); + } + + @Override + public String[] getDescription() { + return new String[]{ + "Controller Block for the Oil Cracking Unit", + "Thermally cracks heavy hydrocarbons into lighter fractions", + "Size(WxHxD): 5x3x3 (Hollow), Controller (Front center)", + "Ring of 8 Coils (Each side of Controller)", + "Gets 5% energy cost reduction per coil tier", + "1x Hydrocarbon Input Bus/Hatch (Any left/right side casing)", + "1x Steam/Hydrogen Input Hatch (Any middle ring casing)", + "1x Cracked Hydrocarbon Output Hatch (Any left/right side casing)", + "1x Maintenance Hatch (Any casing)", + "1x Energy Hatch (Any casing)", + "Clean Stainless Steel Machine Casings for the rest (18 at least!)", + "Input/Output Hatches must be on opposite sides", + ADV_STR_CHECK + }; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][TEXTURE_INDEX], + new TT_RenderedExtendedFacingTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][TEXTURE_INDEX]}; + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OilCrackingUnit.png"); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public boolean checkRecipe_EM(ItemStack aStack) { + ArrayList tInputList = getStoredFluids(); + FluidStack[] tFluidInputs = tInputList.toArray(new FluidStack[0]); + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCrakingRecipes.findRecipe( + getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluidInputs , mInventory[1]); + if (tRecipe != null && tRecipe.isRecipeInputEqual(true, tFluidInputs, mInventory[1])) { + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, getMaxInputVoltage()); + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + this.mEUt *= Math.pow(0.95D, this.coilMeta); + + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)}; + return true; + } + return false; + } + + @Override + public boolean isMachineBlockUpdateRecursive() { + return true; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public ArrayList getStoredFluids() { + ArrayList rList = new ArrayList<>(); + + for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { + tHatch.mRecipeMap = getRecipeMap(); + if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) { + FluidStack tStack = tHatch.getFillableStack(); + if (!tStack.isFluidEqual(GT_ModHandler.getSteam(1000)) && !tStack.isFluidEqual(Materials.Hydrogen.getGas(1000))) + rList.add(tStack); + } + } + + if (this.middleFluidHatch != null && isValidMetaTileEntity(this.middleFluidHatch) && this.middleFluidHatch.getFillableStack() != null) { + this.middleFluidHatch.mRecipeMap = getRecipeMap(); + FluidStack tStack = this.middleFluidHatch.getFillableStack(); + if (tStack.isFluidEqual(GT_ModHandler.getSteam(1000)) || tStack.isFluidEqual(Materials.Hydrogen.getGas(1000))) + rList.add(tStack); + } + + return rList; + } + + @Override + public void construct(ItemStack itemStack, boolean b) { + this.structureBuild_EM("main", 2,1,0, b, itemStack); + } + + @Override + public String[] getStructureDescription(ItemStack itemStack) { + return new String[0]; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_VaccuumFreezer.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_VaccuumFreezer.java new file mode 100644 index 0000000000..4e07db5605 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/multi/GT_Replacement/TT_VaccuumFreezer.java @@ -0,0 +1,227 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.crossmod.tectech.tileentites.multi.GT_Replacement; + +import com.github.bartimaeusnek.crossmod.tectech.helper.StructureDefinitions; +import com.github.technus.tectech.mechanics.constructable.IConstructable; +import com.github.technus.tectech.mechanics.structure.IStructureDefinition; +import com.github.technus.tectech.mechanics.structure.StructureDefinition; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_MultiMachine; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; + +import java.util.ArrayList; + +import static com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference.ADV_STR_CHECK; +import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; + +public class TT_VaccuumFreezer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + public TT_VaccuumFreezer(Object unused) { + super(32765, "multimachine.vacuumfreezer", "Vacuum Freezer"); + GregTech_API.METATILEENTITIES[32765] = null; + GregTech_API.METATILEENTITIES[1002] = this; + } + + @Override + protected boolean cyclicUpdate_EM() { + return false; + } + + private TT_VaccuumFreezer(String aName) { + super(aName); + } + + private static final byte TEXTURE_INDEX = 17; + + private byte blocks = 0; + + private static final IStructureDefinition STRUCTURE_DEFINITION = + StructureDefinition.builder().addShape("main", + StructureDefinitions.CUBE_NO_MUFFLER.getDefinition() + ).addElement( + 'V', + ofChain( + ofHatchAdder( + TT_VaccuumFreezer::addVaccumFreezerHatches, + TEXTURE_INDEX, + 1 + ), + onElementPass( + x -> ++x.blocks, + ofBlock( + GregTech_API.sBlockCasings2, + 1 + ) + ) + ) + ).build(); + + @Override + public IStructureDefinition getStructure_EM() { + return STRUCTURE_DEFINITION; + } + + public String[] getDescription() { + return new String[]{ + "Controller Block for the Vacuum Freezer", + "Super cools hot ingots and cells", + "Size(WxHxD): 3x3x3 (Hollow), Controller (Front centered)", + "1x Input Bus (Any casing)", + "1x Output Bus (Any casing)", + "1x Maintenance Hatch (Any casing)", + "1x Energy Hatch (Any casing)", + "Frost Proof Machine Casings for the rest (16 at least!)", + ADV_STR_CHECK + }; + } + + @Override + protected boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + this.blocks = 0; + return this.structureCheck_EM("main", 1,1,0) + && this.blocks >= 16; + } + + @SideOnly(Side.CLIENT) + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][TEXTURE_INDEX], new TT_RenderedExtendedFacingTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][TEXTURE_INDEX]}; + } + + @Override + public boolean checkRecipe_EM(ItemStack itemStack) { + ArrayList tInputList = getStoredInputs(); + for (ItemStack tInput : tInputList) { + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); + + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sVacuumRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, tInput); + if (tRecipe != null) { + if (tRecipe.isRecipeInputEqual(true, null, tInput)) { + this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); + this.mEfficiencyIncrease = 10000; + + calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage); + //In case recipe is too OP for that machine + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) + return false; + if (this.mEUt > 0) { + this.mEUt = (-this.mEUt); + } + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); + this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)}; + updateSlots(); + return true; + } + } + } + return false; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { + return new TT_VaccuumFreezer(this.mName); + } + + @Override + public boolean isMachineBlockUpdateRecursive() { + return true; + } + + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public void construct(ItemStack itemStack, boolean b) { + this.structureBuild_EM("main", 1,1,0, b, itemStack); + } + + @Override + public String[] getStructureDescription(ItemStack itemStack) { + return new String[0]; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "VacuumFreezer.png"); + } + + public final boolean addVaccumFreezerHatches(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity != null) { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + else + return false; + + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) + return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) + return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) + return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) + return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyMulti) + return this.eEnergyMulti.add((GT_MetaTileEntity_Hatch_EnergyMulti) aMetaTileEntity); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DynamoMulti) + return this.eDynamoMulti.add((GT_MetaTileEntity_Hatch_DynamoMulti) aMetaTileEntity); + } + return false; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java index aa88094922..7fe4d93a29 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserBox.java @@ -22,12 +22,12 @@ package com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.util.StatCollector; public class TT_MetaTileEntity_LowPowerLaserBox extends TT_Abstract_LowPowerLaserThingy { @@ -139,6 +139,6 @@ public class TT_MetaTileEntity_LowPowerLaserBox extends TT_Abstract_LowPowerLase @Override public String[] getDescription() { - return new String[]{"Like a Tranformer... but for LAZORZ", "Transferrate: " + ChatColorHelper.YELLOW + this.getTotalPower() + ChatColorHelper.WHITE + " EU/t", StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks"}; + return new String[]{"Like a Tranformer... but for LAZORZ", "Transferrate: " + ChatColorHelper.YELLOW + this.getTotalPower() + ChatColorHelper.WHITE + " EU/t", BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get()}; } } diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java index df3cd12773..307e9307cb 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserDynamo.java @@ -22,7 +22,7 @@ package com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoTunnel; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -71,7 +71,7 @@ public class TT_MetaTileEntity_LowPowerLaserDynamo extends GT_MetaTileEntity_Hat return new String[]{ this.mDescription, StatCollector.translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + this.getTotalPower() + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks" + BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() }; } diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java index 1774fc0966..922dea51a8 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_LowPowerLaserHatch.java @@ -22,7 +22,7 @@ package com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -46,7 +46,7 @@ public class TT_MetaTileEntity_LowPowerLaserHatch extends GT_MetaTileEntity_Hatc return new String[]{ this.mDescription, StatCollector.translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + this.getTotalPower() + EnumChatFormatting.RESET + " EU/t", - StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks" + BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() }; } diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java index 12f4c6d2cd..26ba1039d0 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_MetaTileEntity_Pipe_Energy_LowPower.java @@ -22,6 +22,7 @@ package com.github.bartimaeusnek.crossmod.tectech.tileentites.tiered; +import com.github.bartimaeusnek.bartworks.util.BW_Tooltip_Reference; import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import gregtech.api.enums.Dyes; import gregtech.api.enums.Materials; @@ -37,7 +38,6 @@ import gregtech.common.GT_Client; import ic2.core.Ic2Items; import net.minecraft.block.Block; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.StatCollector; import java.util.ArrayList; import java.util.HashSet; @@ -83,7 +83,7 @@ public class TT_MetaTileEntity_Pipe_Energy_LowPower extends GT_MetaPipeEntity_Ca "Does not auto-connect", "Does not turn or bend", ChatColorHelper.WHITE + "Must be " + ChatColorHelper.YELLOW + "c" + ChatColorHelper.RED + "o" + ChatColorHelper.BLUE + "l" + ChatColorHelper.DARKPURPLE + "o" + ChatColorHelper.GOLD + "r" + ChatColorHelper.DARKRED + "e" + ChatColorHelper.DARKGREEN + "d" + ChatColorHelper.WHITE + " in order to work", - StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks" + BW_Tooltip_Reference.ADDED_BY_BARTIMAEUSNEK_VIA_BARTWORKS.get() }; } -- cgit