aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2019-09-28 21:21:39 +0200
committerbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2019-09-28 21:21:39 +0200
commit95812474d5a2ccdd7936be618ba7b0f22dfcf5cb (patch)
treefb97d517c9f6b52c4f9e41c27be540e1dc4f8f3d /src
parent28da0eda5faf0066a4e44c866feb30b543ba036f (diff)
downloadGT5-Unofficial-95812474d5a2ccdd7936be618ba7b0f22dfcf5cb.tar.gz
GT5-Unofficial-95812474d5a2ccdd7936be618ba7b0f22dfcf5cb.tar.bz2
GT5-Unofficial-95812474d5a2ccdd7936be618ba7b0f22dfcf5cb.zip
+added localisation to BioCulture System(add your locale to the GT Language File) (fixes #38)
+removed dead AE2 code +applied new prefix logic to the thaum compat +added most of GT Tools and some Electric GT Tools +greatly improved bridge materials +fixed some platinum stuff not giving back the correct dusts +fixed formic acid input loss +moved code in the propper packages Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Former-commit-id: cd295221dc66e27a72cddc900e70535ea81c5d54
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java2
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java6
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java2
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/LuVTierEnhancer.java (renamed from src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LuVTierEnhancer.java)9
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java (renamed from src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/PlatinumSludgeOverHaul.java)28
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java91
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java205
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java1
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BW_ColorUtil.java4
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BioCulture.java11
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/BartWorksCrossmod.java1
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/ae2/ItemSingleItemStorageCell.java244
-rw-r--r--src/main/java/com/github/bartimaeusnek/crossmod/thaumcraft/util/ThaumcraftHandler.java2
-rw-r--r--src/main/resources/assets/bartworks/lang/en_US.lang4
16 files changed, 430 insertions, 191 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
index 6182738f04..b936be1f72 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
@@ -45,7 +45,7 @@ import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.Circ
import com.github.bartimaeusnek.bartworks.system.material.ThreadedLoader;
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.system.material.processingLoaders.DownTierLoader;
-import com.github.bartimaeusnek.bartworks.system.material.processingLoaders.PlatinumSludgeOverHaul;
+import com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement.PlatinumSludgeOverHaul;
import com.github.bartimaeusnek.bartworks.system.oredict.OreDictHandler;
import com.github.bartimaeusnek.bartworks.util.BWRecipes;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
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 5aeed95774..675eb4602d 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
@@ -25,6 +25,7 @@ package com.github.bartimaeusnek.bartworks.common.items;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import com.github.bartimaeusnek.bartworks.util.BioCulture;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs;
@@ -101,19 +102,20 @@ public class LabParts extends SimpleSubItemClass {
return;
}
+ BioCulture culture = BioCulture.getBioCulture(itemStack.getTagCompound().getString("Name"));
switch (itemStack.getItemDamage()) {
case 0:
- list.add(StatCollector.translateToLocal("tooltip.labparts.5.name") + " " + itemStack.getTagCompound().getString("Name"));
+ list.add(StatCollector.translateToLocal("tooltip.labparts.5.name") + " " + itemStack.getTagCompound().getString("Name") + (culture != null ? " ("+culture.getLocalisedName()+")" : ""));
if (!itemStack.getTagCompound().getBoolean("Breedable")) {
list.add(StatCollector.translateToLocal("tooltip.labparts.6.name"));
}
break;
case 1:
- list.add(StatCollector.translateToLocal("tooltip.labparts.7.name") + " " + itemStack.getTagCompound().getString("Name"));
+ list.add(StatCollector.translateToLocal("tooltip.labparts.7.name") + " " + itemStack.getTagCompound().getString("Name") + (culture != null ? " ("+culture.getLocalisedName()+")" : ""));
break;
case 2:
- list.add(StatCollector.translateToLocal("tooltip.labparts.8.name") + " " + itemStack.getTagCompound().getString("Name"));
+ list.add(StatCollector.translateToLocal("tooltip.labparts.8.name") + " " + itemStack.getTagCompound().getString("Name") + (culture != null ? " ("+culture.getLocalisedName()+")" : ""));
break;
default:
break;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java
index 57a9ee9aac..35ad62ae47 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioCultureLoader.java
@@ -54,6 +54,12 @@ public class BioCultureLoader implements Runnable {
BioCultureLoader.rottenFleshBacteria = BioCulture.createAndRegisterBioCulture(new Color(110, 40, 25), "Escherichia cadaver", BioPlasmid.convertDataToPlasmid(BioCultureLoader.BIO_DATA_BETA_LACMATASE), BioDNA.convertDataToDNA(BioCultureLoader.BIO_DATA_BETA_LACMATASE), false);
BioCultureLoader.eColi = BioCulture.createAndRegisterBioCulture(new Color(149, 132, 75), "Escherichia koli", BioPlasmid.convertDataToPlasmid(BioCultureLoader.eColiData), BioDNA.convertDataToDNA(BioCultureLoader.eColiData), true);
BioCultureLoader.anaerobicOil = BioCulture.createAndRegisterBioCulture(new Color(0, 0, 0), "Pseudomonas Veronii", BioPlasmid.convertDataToPlasmid(BioCultureLoader.BIO_DNA_ANAEROBIC_OIL), BioDNA.convertDataToDNA(BioCultureLoader.BIO_DATA_ANAEROBIC_OIL), true);
+ BioCultureLoader.CommonYeast.setLocalisedName("Common Yeast");
+ BioCultureLoader.WhineYeast.setLocalisedName("Whine Yeast");
+ BioCultureLoader.BeerYeast.setLocalisedName("Beer Yeast");
+ BioCultureLoader.rottenFleshBacteria.setLocalisedName("Rotten Flesh Bacteria");
+ BioCultureLoader.eColi.setLocalisedName("eColi Bacteria");
+ BioCultureLoader.anaerobicOil.setLocalisedName("Anaerobic Oil Bacteria");
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java
index 5fa6e23213..09d8292eb6 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/FluidLoader.java
@@ -34,6 +34,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.objects.GT_Fluid;
+import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
import ic2.core.item.ItemFluidCell;
import net.minecraft.block.Block;
@@ -86,6 +87,7 @@ public class FluidLoader implements Runnable {
if (B.isBreedable()) {
B.setFluid(new GT_Fluid(B.getName().replaceAll(" ", "").toLowerCase() + "fluid", "molten.autogenerated", new short[]{(short) B.getColor().getRed(), (short) B.getColor().getBlue(), (short) B.getColor().getGreen()}));
FluidRegistry.registerFluid(B.getFluid());
+ GT_LanguageManager.addStringLocalization(B.getFluid().getUnlocalizedName(), B.getLocalisedName()+" Fluid");
GT_Values.RA.addCentrifugeRecipe(GT_Utility.getIntegratedCircuit(10),GT_Values.NI,new FluidStack(B.getFluid(),1000),dnaFluid,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,GT_Values.NI,null,500,120);
}
}
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 29b98c9506..6f0365d412 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
@@ -33,8 +33,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.TextureSet;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.items.GT_MetaGenerated_Item;
import gregtech.api.util.GT_LanguageManager;
@@ -57,7 +55,6 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
-import java.util.HashMap;
import java.util.List;
import static com.github.bartimaeusnek.bartworks.system.material.Werkstoff.werkstoffHashMap;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LuVTierEnhancer.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/LuVTierEnhancer.java
index 85f800d77c..ee1f6b3b57 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LuVTierEnhancer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/LuVTierEnhancer.java
@@ -20,9 +20,10 @@
* SOFTWARE.
*/
-package com.github.bartimaeusnek.bartworks.system.material.processingLoaders;
+package com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
+import com.github.bartimaeusnek.bartworks.system.material.processingLoaders.AfterLuVTierEnhacement;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
import cpw.mods.fml.common.Loader;
import gregtech.api.enums.ItemList;
@@ -132,7 +133,7 @@ public class LuVTierEnhancer implements Runnable {
ItemData ass = GT_OreDictUnificator.getAssociation(stack);
if (ass.mMaterial.mMaterial.equals(Materials.Osmiridium))
if (WerkstoffLoader.items.get(ass.mPrefix) != null)
- recipe_assemblyLine.mInputs[i] = WerkstoffLoader.LuVFineWireMaterial.get(ass.mPrefix,stack.stackSize);
+ recipe_assemblyLine.mInputs[i] = WerkstoffLoader.Ruridit.get(ass.mPrefix,stack.stackSize);
}
}
for (GT_Recipe recipe_assemblyLine : GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList){
@@ -147,7 +148,7 @@ public class LuVTierEnhancer implements Runnable {
ItemData ass = GT_OreDictUnificator.getAssociation(stack);
if (ass.mMaterial.mMaterial.equals(Materials.Osmiridium))
if (WerkstoffLoader.items.get(ass.mPrefix) != null)
- recipe_assemblyLine.mInputs[i] = WerkstoffLoader.LuVFineWireMaterial.get(ass.mPrefix, stack.stackSize);
+ recipe_assemblyLine.mInputs[i] = WerkstoffLoader.Ruridit.get(ass.mPrefix, stack.stackSize);
}
}
for (GT_Recipe recipe_assemblyLine : GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList){
@@ -160,7 +161,7 @@ public class LuVTierEnhancer implements Runnable {
ItemData ass = GT_OreDictUnificator.getAssociation(stack);
if (ass.mMaterial.mMaterial.equals(Materials.Osmiridium))
if (WerkstoffLoader.items.get(ass.mPrefix) != null)
- recipe_assemblyLine.mInputs[i] = WerkstoffLoader.LuVFineWireMaterial.get(ass.mPrefix,stack.stackSize);
+ recipe_assemblyLine.mInputs[i] = WerkstoffLoader.Ruridit.get(ass.mPrefix,stack.stackSize);
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/PlatinumSludgeOverHaul.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java
index 98d0438056..6427b827f3 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/PlatinumSludgeOverHaul.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java
@@ -20,7 +20,7 @@
* SOFTWARE.
*/
-package com.github.bartimaeusnek.bartworks.system.material.processingLoaders;
+package com.github.bartimaeusnek.bartworks.system.material.GT_Enhancement;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Items;
@@ -80,8 +80,8 @@ public class PlatinumSludgeOverHaul {
GT_Values.RA.addMixerRecipe(Materials.SulfuricAcid.getCells(3), GT_Utility.getIntegratedCircuit(1), null, null, Materials.Water.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(4000), Materials.Empty.getCells(3), 30, 30);
//FormicAcid
GT_Values.RA.addChemicalRecipe(Materials.CarbonMonoxide.getCells(1), Materials.SodiumHydroxide.getDust(1), null, null, Sodiumformate.get(cell), null, 15);
- GT_Values.RA.addChemicalRecipe(Sodiumformate.get(cell, 2), GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(1000), null, FormicAcid.get(cell, 2), Sodiumsulfate.get(dust), 15);
- GT_Values.RA.addChemicalRecipe(Materials.SulfuricAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), Sodiumformate.getFluidOrGas(2000), FormicAcid.getFluidOrGas(2000), Materials.Empty.getCells(1), Sodiumsulfate.get(dust), 15);
+ GT_Values.RA.addChemicalRecipe(Sodiumformate.get(cell, 2), GT_Utility.getIntegratedCircuit(1), Materials.SulfuricAcid.getFluid(1000), null, FormicAcid.get(cell, 2), Sodiumsulfate.get(dust, 7), 15);
+ GT_Values.RA.addChemicalRecipe(Materials.SulfuricAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), Sodiumformate.getFluidOrGas(2000), FormicAcid.getFluidOrGas(2000), Materials.Empty.getCells(1), Sodiumsulfate.get(dust, 7), 15);
//AquaRegia
GT_Values.RA.addMixerRecipe(Materials.DilutedSulfuricAcid.getCells(1), Materials.NitricAcid.getCells(1), GT_Utility.getIntegratedCircuit(1), null, null, null, AquaRegia.get(cell, 2), 30, 30);
GT_Values.RA.addMixerRecipe(Materials.DilutedSulfuricAcid.getCells(1), Materials.NitricAcid.getCells(1), GT_Utility.getIntegratedCircuit(2), null, null, AquaRegia.getFluidOrGas(2000), Materials.Empty.getCells(2), 30, 30);
@@ -523,6 +523,28 @@ public class PlatinumSludgeOverHaul {
if (GT_Utility.areStacksEqual(ItemList.Depleted_Naquadah_1.get(1),stack,true) || GT_Utility.areStacksEqual(ItemList.Depleted_Naquadah_2.get(1),stack,true) || GT_Utility.areStacksEqual(ItemList.Depleted_Naquadah_4.get(1),stack,true))
return true;
+
+ if (GT_Utility.areStacksEqual(ItemList.Tool_Lighter_Platinum_Empty.get(1),stack,true) || GT_Utility.areStacksEqual(ItemList.Tool_Lighter_Platinum_Used.get(1),stack,true) || GT_Utility.areStacksEqual(ItemList.Tool_Lighter_Platinum_Full.get(1),stack,true))
+ return true;
+
+ if (GT_Utility.areStacksEqual(ItemList.Emitter_EV.get(1),stack,true))
+ return true;
+
+ try {
+ ItemList gtnhItemListItems = ItemList.valueOf("Large_Fluid_Cell_TungstenSteel");
+ if (GT_Utility.areStacksEqual(gtnhItemListItems.get(1), stack, true))
+ return true;
+ gtnhItemListItems = ItemList.valueOf("Depleted_MNq_1");
+ if (GT_Utility.areStacksEqual(gtnhItemListItems.get(1), stack, true))
+ return true;
+ gtnhItemListItems = ItemList.valueOf("Depleted_MNq_2");
+ if (GT_Utility.areStacksEqual(gtnhItemListItems.get(1), stack, true))
+ return true;
+ gtnhItemListItems = ItemList.valueOf("Depleted_MNq_4");
+ if (GT_Utility.areStacksEqual(gtnhItemListItems.get(1), stack, true))
+ return true;
+ } catch (IllegalArgumentException ignored) {}
+
if (stack.getItem() instanceof GT_Generic_Item) {
if (!BW_Util.checkStackAndPrefix(stack))
return false;
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 7be1117d4c..ac1d96bc9b 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
@@ -26,6 +26,7 @@ import com.github.bartimaeusnek.bartworks.util.BW_ColorUtil;
import com.github.bartimaeusnek.bartworks.util.BW_Util;
import com.github.bartimaeusnek.bartworks.util.MurmurHash3;
import com.github.bartimaeusnek.bartworks.util.Pair;
+import com.github.bartimaeusnek.crossmod.thaumcraft.util.ThaumcraftHandler;
import gregtech.api.enums.*;
import gregtech.api.interfaces.IColorModulationContainer;
import gregtech.api.interfaces.ISubTagContainer;
@@ -33,11 +34,10 @@ import gregtech.api.util.GT_OreDictUnificator;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
+import java.lang.reflect.InvocationTargetException;
import java.nio.ByteBuffer;
import java.util.*;
-import static gregtech.api.enums.OrePrefixes.capsule;
-
public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
public static final LinkedHashSet<Werkstoff> werkstoffHashSet = new LinkedHashSet<>();
@@ -76,9 +76,15 @@ 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(short[] rgba, String defaultName, Werkstoff.Types type,int meltingpoint, Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet, Pair<ISubTagContainer, Integer>... contents) {
+ this(rgba, defaultName, Werkstoff.Types.getDefaultStatForType(type).setMeltingPoint(meltingpoint), type, generationFeatures, mID, texSet, contents);
+ }
public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type, Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet, Pair<ISubTagContainer, Integer>... contents) {
this(rgba, defaultName, Werkstoff.Types.getDefaultStatForType(type), type, generationFeatures, mID, texSet, contents);
}
+ public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type, int meltingpoint, Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet, List<ISubTagContainer> oreByProduct, Pair<ISubTagContainer, Integer>... contents) {
+ this(rgba, defaultName, Werkstoff.Types.getDefaultStatForType(type).setMeltingPoint(meltingpoint), type, generationFeatures, mID, texSet, oreByProduct, contents);
+ }
public Werkstoff(short[] rgba, String defaultName, Werkstoff.Types type, Werkstoff.GenerationFeatures generationFeatures, int mID, TextureSet texSet, List<ISubTagContainer> oreByProduct, Pair<ISubTagContainer, Integer>... contents) {
this(rgba, defaultName, Werkstoff.Types.getDefaultStatForType(type), type, generationFeatures, mID, texSet, oreByProduct, contents);
}
@@ -144,6 +150,10 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
} else
this.toolTip = toolTip;
+
+// if (this.toolTip.length() > 25)
+// this.toolTip = "The formula is to long...";
+
if (this.stats.protons == 0) {
long tmpprotons = 0;
for (Pair<ISubTagContainer, Integer> p : contents) {
@@ -166,6 +176,10 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
}
this.stats = stats.setMass(tmpmass);
}
+
+ if (this.stats.meltingPoint == 0)
+ this.stats.meltingPoint = 1123;
+
this.texSet = texSet;
if (this.mOreByProducts.isEmpty()) {
@@ -204,6 +218,19 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
return ret;
}
+ public List<TC_Aspects.TC_AspectStack> getGTWrappedTCAspects() {
+ List<TC_Aspects.TC_AspectStack> ret = new ArrayList<>();
+ try {
+ Pair<Object, Integer>[] aspectArray = getTCAspects();
+ TC_Aspects.TC_AspectStack stack = null;
+ for (Pair<Object, Integer> objectIntegerPair : aspectArray) {
+ stack = new TC_Aspects.TC_AspectStack(TC_Aspects.valueOf(((String) ThaumcraftHandler.AspectAdder.getName.invoke(objectIntegerPair.getKey())).toUpperCase(Locale.US)) , objectIntegerPair.getValue());
+ stack.addToAspectList(ret);
+ }
+ }catch( InvocationTargetException | IllegalAccessException ignored){}
+ return ret;
+ }
+
public Pair<Object,Integer>[] getTCAspects(){
return this.getTCAspects(1);
}
@@ -224,6 +251,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
int ret = 0;
switch (this.type) {
case COMPOUND:
+ case MIXTURE:
case BIOLOGICAL: {
for (int i = 0; i < this.CONTENTS.toArray().length; i++) {
ret += ((Pair<ISubTagContainer, Integer>) this.CONTENTS.toArray()[i]).getValue();
@@ -275,6 +303,10 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
return this.defaultName;
}
+ public String getVarName() {
+ return this.defaultName.replaceAll(" ","");
+ }
+
public String getToolTip() {
return this.toolTip;
}
@@ -344,6 +376,21 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
return WerkstoffLoader.getCorrespondingItemStack(prefixes, this, amount);
}
+ public byte getToolQuality() {
+ return (byte) ( (15f * (((float)this.getStats().getProtons() / 188f) + (float) this.getStats().getMeltingPoint() / 10801f)) / (float) this.getContents().getKey() );
+ }
+
+ public float getToolSpeed() {
+ return this.stats.speedOverride > 0f ? this.stats.speedOverride : Math.max(1f,
+ 2f*((float) -this.getStats().getMass() + 0.1f * (float) this.getStats().getMeltingPoint() + (float) this.getStats().getProtons()) * 0.1f / (float) this.getContents().getKey() * 0.1f * (float) this.getToolQuality()
+ );
+ }
+
+ public int getDurability() {
+ return this.stats.durOverride > 0 ? this.stats.durOverride : (int) (this.stats.durMod * ((0.01f * (float) this.getStats().getMeltingPoint() * (float) this.getStats().getMass()) / (float) this.getContents().getKey()));
+ }
+
+
public enum Types {
MATERIAL, COMPOUND, MIXTURE, BIOLOGICAL, ELEMENT, ISOTOPE, UNDEFINED;
@@ -412,6 +459,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.plate,0b10000000);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.stick,0b10000000);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.rod,0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.toolHeadHammer,0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.toolHeadWrench,0b10000000);
+ Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.toolHeadSaw,0b10000000);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gearGt,0b100000000);
Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gearGtSmall,0b100000000);
@@ -598,11 +648,48 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer {
return this;
}
+ public int getDurOverride() {
+ return durOverride;
+ }
+
+ public void setDurOverride(int durOverride) {
+ this.durOverride = durOverride;
+ }
+
+ public float getSpeedOverride() {
+ return speedOverride;
+ }
+
+ public void setSpeedOverride(float speedOverride) {
+ this.speedOverride = speedOverride;
+ }
+
+ public float getTierOverride() {
+ return tierOverride;
+ }
+
+ public void setTierOverride(float tierOverride) {
+ this.tierOverride = tierOverride;
+ }
+
int meltingPoint;
long protons;
long neutrons;
long electrons;
long mass;
+ int durOverride;
+ float speedOverride;
+ float tierOverride;
+ float durMod = 1f;
+
+ public float getDurMod() {
+ return durMod;
+ }
+
+ public void setDurMod(float durMod) {
+ this.durMod = durMod;
+ }
+
private Pair<Object,Integer>[] mTC_Aspects;
//logic gate shit
byte quality = ~0b1111111;
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 4e1011eb29..9158de5a89 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
@@ -51,6 +51,7 @@ 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;
@@ -58,6 +59,7 @@ 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.common.util.EnumHelper;
import net.minecraftforge.fluids.Fluid;
@@ -90,8 +92,12 @@ public class WerkstoffLoader implements Runnable {
public static ItemList smallGearShape;
public static ItemList ringMold;
public static ItemList boltMold;
-
+ public static boolean gtnhGT = false;
static {
+ try {
+ gtnhGT = GT_MetaGenerated_Tool_01.class.getField("SOLDERING_IRON_MV") != null;
+ } catch (NoSuchFieldException ignored) {}
+
for (OrePrefixes prefix : OrePrefixes.values()){
if (prefix.toString().equals("cellMolten"))
WerkstoffLoader.cellMolten = prefix;
@@ -108,7 +114,7 @@ public class WerkstoffLoader implements Runnable {
WerkstoffLoader.smallGearShape = Enum.valueOf(ItemList.class, "Shape_Extruder_Small_Gear");
WerkstoffLoader.ringMold = Enum.valueOf(ItemList.class, "Shape_Mold_Ring");
WerkstoffLoader.boltMold = Enum.valueOf(ItemList.class, "Shape_Mold_Bolt");
- } catch (NullPointerException | IllegalArgumentException e){}
+ } catch (NullPointerException | IllegalArgumentException ignored){}
//add tiberium
Element t = EnumHelper.addEnum(Element.class,"Tr",new Class[]{long.class, long.class, long.class, long.class, String.class, String.class, boolean.class}, new Object[]{123L, 203L, 0L, -1L, (String) null, "Tiberium", false});
//add molten & regular capsuls
@@ -148,7 +154,7 @@ public class WerkstoffLoader implements Runnable {
new short[]{175, 175, 175, 0},
"Zirconium",
"Zr",
- new Werkstoff.Stats().setProtons(40),
+ new Werkstoff.Stats().setProtons(40).setMeltingPoint(2130),
Werkstoff.Types.ELEMENT,
new Werkstoff.GenerationFeatures().onlyDust(),
3,
@@ -159,6 +165,7 @@ public class WerkstoffLoader implements Runnable {
new short[]{255, 255, 255, 0},
"Cubic Zirconia",
Werkstoff.Types.COMPOUND,
+ 3273,
new Werkstoff.GenerationFeatures().onlyDust().addGems(),
4,
TextureSet.SET_DIAMOND,
@@ -355,7 +362,7 @@ public class WerkstoffLoader implements Runnable {
public static final Werkstoff RedZircon = new Werkstoff(
new short[]{195, 19, 19, 0},
"Red Zircon",
- new Werkstoff.Stats().setElektrolysis(true),
+ new Werkstoff.Stats().setElektrolysis(true).setMeltingPoint(2130),
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures().addGems(),
19,
@@ -566,7 +573,7 @@ public class WerkstoffLoader implements Runnable {
public static final Werkstoff Prasiolite = new Werkstoff(
new short[]{0xD0,0xDD,0x95,0},
"Prasiolite",
- new Werkstoff.Stats().setElektrolysis(true),
+ new Werkstoff.Stats().setElektrolysis(true).setMeltingPoint(1923),
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures().addGems(),
35,
@@ -1214,7 +1221,7 @@ public class WerkstoffLoader implements Runnable {
89,
TextureSet.SET_DIAMOND
);
- public static final Werkstoff LuVFineWireMaterial = new Werkstoff(
+ public static final Werkstoff Ruridit = new Werkstoff(
new short[]{0xA4,0xA4,0xA4},
"Ruridit",
new Werkstoff.Stats().setCentrifuge(true).setBlastFurnace(true).setMeltingPoint(4500),
@@ -1236,20 +1243,21 @@ public class WerkstoffLoader implements Runnable {
new Pair<>(Materials.Calcium,1),
new Pair<>(Materials.Fluorine,2)
);
-// public static final Werkstoff Baryte = new Werkstoff(
-// new short[]{0xB9,0x45,0xFB},
-// "Baryte",
-// new Werkstoff.Stats().setElektrolysis(true),
-// Werkstoff.Types.COMPOUND,
-// new Werkstoff.GenerationFeatures().addGems(),
-// 92,
-// TextureSet.SET_GEM_VERTICAL,
-// new Pair<>(Materials.Barium,1),
-// new Pair<>(Materials.Sulfur,1),
-// new Pair<>(Materials.Oxygen,3)
-// );
-
-
+ public static final Werkstoff HDCS = new Werkstoff(
+ new short[]{0x33,0x44,0x33},
+ "High Durability Compound Steel",
+ new Werkstoff.Stats().setCentrifuge(true).setBlastFurnace(true).setMeltingPoint(9000),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable().onlyDust().addMolten().addMetalItems().addMixerRecipes().addSimpleMetalWorkingItems().addCraftingMetalWorkingItems().addMultipleIngotMetalWorkingItems(),
+ 92,
+ TextureSet.SET_SHINY,
+ new Pair<>(Materials.TungstenSteel,12),
+ new Pair<>(Materials.HSSE,9),
+ new Pair<>(Materials.HSSG,6),
+ new Pair<>(WerkstoffLoader.Ruridit,3),
+ new Pair<>(WerkstoffLoader.MagnetoResonaticDust,2),
+ new Pair<>(Materials.Plutonium,1)
+ );
public static HashMap<OrePrefixes, BW_MetaGenerated_Items> items = new HashMap<>();
public static HashBiMap<Werkstoff, Fluid> fluids = HashBiMap.create();
@@ -1336,6 +1344,8 @@ public class WerkstoffLoader implements Runnable {
this.addCraftingMetalRecipes(werkstoff);
DebugLog.log("Loading MultipleIngots MetalWorking Recipes"+" " +(System.nanoTime()-timepreone));
this.addMultipleMetalRecipes(werkstoff);
+ DebugLog.log("Loading Tool Recipes"+" " +(System.nanoTime()-timepreone));
+ this.addTools(werkstoff);
if (Loader.isModLoaded("Thaumcraft")) {
DebugLog.log("Loading Aspects"+" " +(System.nanoTime()-timepreone));
ThaumcraftHandler.AspectAdder.addAspectToAll(werkstoff);
@@ -1355,6 +1365,10 @@ public class WerkstoffLoader implements Runnable {
}
private void addSubTags() {
+
+ WerkstoffLoader.CubicZirconia.getStats().setDurOverride(Materials.Diamond.mDurability);
+ WerkstoffLoader.HDCS.getStats().setSpeedOverride(Materials.HSSS.mToolSpeed);
+ WerkstoffLoader.HDCS.getStats().setDurMod(10f);
Materials.Helium.add(WerkstoffLoader.NOBLE_GAS);
WerkstoffLoader.Neon.add(WerkstoffLoader.NOBLE_GAS);
Materials.Argon.add(WerkstoffLoader.NOBLE_GAS);
@@ -1368,13 +1382,28 @@ public class WerkstoffLoader implements Runnable {
WerkstoffLoader.Calcium.add(WerkstoffLoader.ANAEROBE_SMELTING);
WerkstoffLoader.LuVTierMaterial.add(WerkstoffLoader.NOBLE_GAS_SMELTING);
- WerkstoffLoader.LuVFineWireMaterial.add(WerkstoffLoader.NOBLE_GAS_SMELTING);
+ WerkstoffLoader.Ruridit.add(WerkstoffLoader.NOBLE_GAS_SMELTING);
WerkstoffLoader.MagnetoResonaticDust.add(WerkstoffLoader.NO_BLAST);
//Calcium Smelting block
Materials.Calcium.mBlastFurnaceRequired=true;
+ Materials.Salt.mDurability = WerkstoffLoader.Salt.getDurability();
+ Materials.Spodumene.mDurability = WerkstoffLoader.Spodumen.getDurability();
+ Materials.RockSalt.mDurability = WerkstoffLoader.RockSalt.getDurability();
+ Materials.Calcium.mDurability = WerkstoffLoader.Calcium.getDurability();
+
+ Materials.Salt.mToolSpeed = WerkstoffLoader.Salt.getToolSpeed();
+ Materials.Spodumene.mToolSpeed = WerkstoffLoader.Spodumen.getToolSpeed();
+ Materials.RockSalt.mToolSpeed = WerkstoffLoader.RockSalt.getToolSpeed();
+ Materials.Calcium.mToolSpeed = WerkstoffLoader.Calcium.getToolSpeed();
+
+ Materials.Salt.mToolQuality = WerkstoffLoader.Salt.getToolQuality();
+ Materials.Spodumene.mToolQuality = WerkstoffLoader.Spodumen.getToolQuality();
+ Materials.RockSalt.mToolQuality = WerkstoffLoader.RockSalt.getToolQuality();
+ Materials.Calcium.mToolQuality = WerkstoffLoader.Calcium.getToolQuality();
+
for (Werkstoff W : Werkstoff.werkstoffHashMap.values()) {
for (Pair<ISubTagContainer, Integer> pair : W.getContents().getValue().toArray(new Pair[0])) {
@@ -1477,6 +1506,9 @@ public class WerkstoffLoader implements Runnable {
WerkstoffLoader.items.put(plate, new BW_MetaGenerated_Items(plate));
WerkstoffLoader.items.put(stick, new BW_MetaGenerated_Items(stick));
WerkstoffLoader.items.put(stickLong, new BW_MetaGenerated_Items(stickLong));
+ WerkstoffLoader.items.put(toolHeadWrench, new BW_MetaGenerated_Items(toolHeadWrench));
+ WerkstoffLoader.items.put(toolHeadHammer, new BW_MetaGenerated_Items(toolHeadHammer));
+ WerkstoffLoader.items.put(toolHeadSaw, new BW_MetaGenerated_Items(toolHeadSaw));
}
if ((WerkstoffLoader.toGenerateGlobal & 0b100000000) != 0) {
WerkstoffLoader.items.put(gearGt, new BW_MetaGenerated_Items(gearGt));
@@ -1515,7 +1547,9 @@ public class WerkstoffLoader implements Runnable {
private static void runGTItemDataRegistrator() {
HashSet<Materi