From 4109c9575dd6d8a89f03e1242493dca228255570 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Mon, 29 Apr 2019 12:55:19 +1000 Subject: + Added Framework for Thermal power based upon the code used for RF. > This is more effective than trying to use the GT EU code for the exact same thing. --- .../api/thermal/energy/IThermalConnection.java | 7 ++ .../api/thermal/energy/IThermalContainerItem.java | 15 +++ .../api/thermal/energy/IThermalHandler.java | 15 +++ .../api/thermal/energy/IThermalProvider.java | 13 +++ .../api/thermal/energy/IThermalReceiver.java | 13 +++ .../api/thermal/energy/IThermalStorage.java | 13 +++ .../api/thermal/energy/ThermalStorage.java | 116 +++++++++++++++++++++ .../api/thermal/energy/ThermalStorageAdv.java | 34 ++++++ .../api/thermal/sample/ItemThermalContainer.java | 84 +++++++++++++++ .../api/thermal/sample/TileThermalHandler.java | 42 ++++++++ .../api/thermal/tileentity/IThermalInfo.java | 13 +++ 11 files changed, 365 insertions(+) create mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java create mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java create mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java create mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java create mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java create mode 100644 src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java create mode 100644 src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java create mode 100644 src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java create mode 100644 src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java create mode 100644 src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java create mode 100644 src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java (limited to 'src/Java') diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java new file mode 100644 index 0000000000..d8573000fc --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java @@ -0,0 +1,7 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IThermalConnection { + boolean canConnectThermalEnergy(ForgeDirection arg0); +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java new file mode 100644 index 0000000000..072695bd76 --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java @@ -0,0 +1,15 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraft.item.ItemStack; + +public interface IThermalContainerItem { + + int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2); + + int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2); + + int getThermalEnergyStored(ItemStack arg0); + + int getMaxThermalEnergyStored(ItemStack arg0); + +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java new file mode 100644 index 0000000000..3ab7127757 --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java @@ -0,0 +1,15 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IThermalHandler extends IThermalProvider, IThermalReceiver { + + int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); + + int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); + + int getThermalEnergyStored(ForgeDirection arg0); + + int getMaxThermalEnergyStored(ForgeDirection arg0); + +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java new file mode 100644 index 0000000000..0e4a060b23 --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java @@ -0,0 +1,13 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IThermalProvider extends IThermalConnection { + + int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); + + int getThermalEnergyStored(ForgeDirection arg0); + + int getMaxThermalEnergyStored(ForgeDirection arg0); + +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java new file mode 100644 index 0000000000..e08ce48a06 --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java @@ -0,0 +1,13 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraftforge.common.util.ForgeDirection; + +public interface IThermalReceiver extends IThermalConnection { + + int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2); + + int getThermalEnergyStored(ForgeDirection arg0); + + int getMaxThermalEnergyStored(ForgeDirection arg0); + +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java new file mode 100644 index 0000000000..db3e6c8966 --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java @@ -0,0 +1,13 @@ +package gtPlusPlus.api.thermal.energy; + +public interface IThermalStorage { + + int receiveThermalEnergy(int arg0, boolean arg1); + + int extractThermalEnergy(int arg0, boolean arg1); + + int getThermalEnergyStored(); + + int getMaxThermalEnergyStored(); + +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java new file mode 100644 index 0000000000..22a47b2807 --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java @@ -0,0 +1,116 @@ +package gtPlusPlus.api.thermal.energy; + +import net.minecraft.nbt.NBTTagCompound; + +public class ThermalStorage implements IThermalStorage { + + protected int thermal_energy; + protected int capacity; + protected int maxReceive; + protected int maxExtract; + + public ThermalStorage(int arg0) { + this(arg0, arg0, arg0); + } + + public ThermalStorage(int arg0, int arg1) { + this(arg0, arg1, arg1); + } + + public ThermalStorage(int arg0, int arg1, int arg2) { + this.capacity = arg0; + this.maxReceive = arg1; + this.maxExtract = arg2; + } + + public ThermalStorage readFromNBT(NBTTagCompound arg0) { + this.thermal_energy = arg0.getInteger("Energy"); + if (this.thermal_energy > this.capacity) { + this.thermal_energy = this.capacity; + } + return this; + } + + public NBTTagCompound writeToNBT(NBTTagCompound arg0) { + if (this.thermal_energy < 0) { + this.thermal_energy = 0; + } + arg0.setInteger("Energy", this.thermal_energy); + return arg0; + } + + public void setCapacity(int arg0) { + this.capacity = arg0; + if (this.thermal_energy > arg0) { + this.thermal_energy = arg0; + } + + } + + public void setMaxTransfer(int arg0) { + this.setMaxReceive(arg0); + this.setMaxExtract(arg0); + } + + public void setMaxReceive(int arg0) { + this.maxReceive = arg0; + } + + public void setMaxExtract(int arg0) { + this.maxExtract = arg0; + } + + public int getMaxReceive() { + return this.maxReceive; + } + + public int getMaxExtract() { + return this.maxExtract; + } + + public void setEnergyStored(int arg0) { + this.thermal_energy = arg0; + if (this.thermal_energy > this.capacity) { + this.thermal_energy = this.capacity; + } else if (this.thermal_energy < 0) { + this.thermal_energy = 0; + } + + } + + public void modifyEnergyStored(int arg0) { + this.thermal_energy += arg0; + if (this.thermal_energy > this.capacity) { + this.thermal_energy = this.capacity; + } else if (this.thermal_energy < 0) { + this.thermal_energy = 0; + } + + } + + public int receiveThermalEnergy(int arg0, boolean arg1) { + int arg2 = Math.min(this.capacity - this.thermal_energy, Math.min(this.maxReceive, arg0)); + if (!arg1) { + this.thermal_energy += arg2; + } + + return arg2; + } + + public int extractThermalEnergy(int arg0, boolean arg1) { + int arg2 = Math.min(this.thermal_energy, Math.min(this.maxExtract, arg0)); + if (!arg1) { + this.thermal_energy -= arg2; + } + + return arg2; + } + + public int getThermalEnergyStored() { + return this.thermal_energy; + } + + public int getMaxThermalEnergyStored() { + return this.capacity; + } +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java new file mode 100644 index 0000000000..47af7e79a6 --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java @@ -0,0 +1,34 @@ +package gtPlusPlus.api.thermal.energy; + +public class ThermalStorageAdv extends ThermalStorage { + + public ThermalStorageAdv(int arg0) { + this(arg0, arg0, arg0); + } + + public ThermalStorageAdv(int arg0, int arg1) { + this(arg0, arg1, arg1); + } + + public ThermalStorageAdv(int arg0, int arg1, int arg2) { + super(arg0, arg1, arg2); + } + + public int receiveEnergyNoLimit(int arg0, boolean arg1) { + int arg2 = Math.min(super.capacity - super.thermal_energy, arg0); + if (!arg1) { + super.thermal_energy += arg2; + } + + return arg2; + } + + public int extractEnergyNoLimit(int arg0, boolean arg1) { + int arg2 = Math.min(super.thermal_energy, arg0); + if (!arg1) { + super.thermal_energy -= arg2; + } + + return arg2; + } +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java new file mode 100644 index 0000000000..e33a47d220 --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java @@ -0,0 +1,84 @@ +package gtPlusPlus.api.thermal.sample; + +import gtPlusPlus.api.thermal.energy.IThermalContainerItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class ItemThermalContainer extends Item implements IThermalContainerItem { + protected int capacity; + protected int maxReceive; + protected int maxExtract; + + public ItemThermalContainer() { + } + + public ItemThermalContainer(int arg0) { + this(arg0, arg0, arg0); + } + + public ItemThermalContainer(int arg0, int arg1) { + this(arg0, arg1, arg1); + } + + public ItemThermalContainer(int arg0, int arg1, int arg2) { + this.capacity = arg0; + this.maxReceive = arg1; + this.maxExtract = arg2; + } + + public ItemThermalContainer setCapacity(int arg0) { + this.capacity = arg0; + return this; + } + + public void setMaxTransfer(int arg0) { + this.setMaxReceive(arg0); + this.setMaxExtract(arg0); + } + + public void setMaxReceive(int arg0) { + this.maxReceive = arg0; + } + + public void setMaxExtract(int arg0) { + this.maxExtract = arg0; + } + + public int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2) { + if (arg0.getTagCompound() == null) { + arg0.stackTagCompound = new NBTTagCompound(); + } + int arg3 = arg0.stackTagCompound.getInteger("Energy"); + int arg4 = Math.min(this.capacity - arg3, Math.min(this.maxReceive, arg1)); + if (!arg2) { + arg3 += arg4; + arg0.stackTagCompound.setInteger("Energy", arg3); + } + return arg4; + } + + public int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2) { + if (arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("Energy")) { + int arg3 = arg0.stackTagCompound.getInteger("Energy"); + int arg4 = Math.min(arg3, Math.min(this.maxExtract, arg1)); + if (!arg2) { + arg3 -= arg4; + arg0.stackTagCompound.setInteger("Energy", arg3); + } + return arg4; + } else { + return 0; + } + } + + public int getEnergyStored(ItemStack arg0) { + return arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("Energy") + ? arg0.stackTagCompound.getInteger("Energy") + : 0; + } + + public int getMaxThermalEnergyStored(ItemStack arg0) { + return this.capacity; + } +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java b/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java new file mode 100644 index 0000000000..e2e3c50ab7 --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java @@ -0,0 +1,42 @@ +package gtPlusPlus.api.thermal.sample; + +import gtPlusPlus.api.thermal.energy.IThermalHandler; +import gtPlusPlus.api.thermal.energy.ThermalStorage; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileThermalHandler extends TileEntity implements IThermalHandler { + + protected ThermalStorage storage = new ThermalStorage(32000); + + public void readFromNBT(NBTTagCompound arg0) { + super.readFromNBT(arg0); + this.storage.readFromNBT(arg0); + } + + public void writeToNBT(NBTTagCompound arg0) { + super.writeToNBT(arg0); + this.storage.writeToNBT(arg0); + } + + public boolean canConnectThermalEnergy(ForgeDirection arg0) { + return true; + } + + public int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) { + return this.storage.receiveThermalEnergy(arg1, arg2); + } + + public int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) { + return this.storage.extractThermalEnergy(arg1, arg2); + } + + public int getThermalEnergyStored(ForgeDirection arg0) { + return this.storage.getThermalEnergyStored(); + } + + public int getMaxThermalEnergyStored(ForgeDirection arg0) { + return this.storage.getMaxThermalEnergyStored(); + } +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java b/src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java new file mode 100644 index 0000000000..a40535887c --- /dev/null +++ b/src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java @@ -0,0 +1,13 @@ +package gtPlusPlus.api.thermal.tileentity; + +public interface IThermalInfo { + + int getInfoEnergyPerTick(); + + int getInfoMaxEnergyPerTick(); + + int getInfoEnergyStored(); + + int getInfoMaxEnergyStored(); + +} \ No newline at end of file -- cgit From e5193543b16561e0f6b13ba0a347d94092d8a9b4 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 11:09:03 +1000 Subject: + Thermal Boiler now pulls lava filters from an input bus. + Added some minor GUI functions to GregtechMeta_MultiBlockBase. + Added some new Reflection functions. --- .../api/thermal/energy/ThermalStorage.java | 4 +- .../api/thermal/sample/ItemThermalContainer.java | 16 +- .../core/util/reflect/ReflectionUtils.java | 202 ++++++++++++++++++--- .../base/GregtechMeta_MultiBlockBase.java | 52 +++++- .../multi/production/GT4Entity_ThermalBoiler.java | 29 ++- 5 files changed, 261 insertions(+), 42 deletions(-) (limited to 'src/Java') diff --git a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java index 22a47b2807..9c7bb0066c 100644 --- a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java +++ b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java @@ -24,7 +24,7 @@ public class ThermalStorage implements IThermalStorage { } public ThermalStorage readFromNBT(NBTTagCompound arg0) { - this.thermal_energy = arg0.getInteger("Energy"); + this.thermal_energy = arg0.getInteger("ThermalEnergy"); if (this.thermal_energy > this.capacity) { this.thermal_energy = this.capacity; } @@ -35,7 +35,7 @@ public class ThermalStorage implements IThermalStorage { if (this.thermal_energy < 0) { this.thermal_energy = 0; } - arg0.setInteger("Energy", this.thermal_energy); + arg0.setInteger("ThermalEnergy", this.thermal_energy); return arg0; } diff --git a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java index e33a47d220..015e5fd5f3 100644 --- a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java +++ b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java @@ -49,22 +49,22 @@ public class ItemThermalContainer extends Item implements IThermalContainerItem if (arg0.getTagCompound() == null) { arg0.stackTagCompound = new NBTTagCompound(); } - int arg3 = arg0.stackTagCompound.getInteger("Energy"); + int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy"); int arg4 = Math.min(this.capacity - arg3, Math.min(this.maxReceive, arg1)); if (!arg2) { arg3 += arg4; - arg0.stackTagCompound.setInteger("Energy", arg3); + arg0.stackTagCompound.setInteger("ThermalEnergy", arg3); } return arg4; } public int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2) { - if (arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("Energy")) { - int arg3 = arg0.stackTagCompound.getInteger("Energy"); + if (arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy")) { + int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy"); int arg4 = Math.min(arg3, Math.min(this.maxExtract, arg1)); if (!arg2) { arg3 -= arg4; - arg0.stackTagCompound.setInteger("Energy", arg3); + arg0.stackTagCompound.setInteger("ThermalEnergy", arg3); } return arg4; } else { @@ -72,9 +72,9 @@ public class ItemThermalContainer extends Item implements IThermalContainerItem } } - public int getEnergyStored(ItemStack arg0) { - return arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("Energy") - ? arg0.stackTagCompound.getInteger("Energy") + public int getThermalEnergyStored(ItemStack arg0) { + return arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy") + ? arg0.stackTagCompound.getInteger("ThermalEnergy") : 0; } diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java index 722a4f3ff7..c86d6ccb83 100644 --- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -3,10 +3,17 @@ package gtPlusPlus.core.util.reflect; import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.Field; +import java.lang.reflect.GenericDeclaration; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.util.HashMap; import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; import java.util.Map; import org.apache.commons.lang3.ArrayUtils; @@ -133,8 +140,8 @@ public class ReflectionUtils { public static Method getMethod(Object aObject, String aMethodName, Class[] aTypes) { return getMethod(aObject.getClass(), aMethodName, aTypes); } - - + + /** * Returns a cached {@link Method} object. * @param aClass - Class containing the Method. @@ -193,7 +200,7 @@ public class ReflectionUtils { return y.get(); } } - + /** * Returns a cached {@link Field} object. * @param aInstance - {@link Object} to get the field instance from. @@ -219,6 +226,20 @@ public class ReflectionUtils { return isClassPresent(classname); } + + /** + * Returns the class of the objects type parameter + * @param o - Object to examine paramters on + * @return - a Class or null + */ + public static Class getTypeOfGenericObject(Object o) { + Class aTypeParam = findSuperClassParameterType(o, o.getClass(), 0); + if (aTypeParam == null) { + aTypeParam = findSubClassParameterType(o, o.getClass(), 0); + } + return aTypeParam; + } + public static void makeFieldAccessible(final Field field) { if (!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers())) @@ -271,7 +292,7 @@ public class ReflectionUtils { return loaded > 0; } - + public static boolean setField(final Object object, final String fieldName, final Object fieldValue) { Class clazz = object.getClass(); @@ -414,13 +435,27 @@ public class ReflectionUtils { - - - - - - - + + + + + + + + + + + + + + + + + + /* + * Internal Magic that probably should not get exposed. + */ + @@ -429,11 +464,126 @@ public class ReflectionUtils { + /* + * + * Below Code block is used for determining generic types associated with type + * + */ + + + //https://xebia.com/blog/acessing-generic-types-at-runtime-in-java/ + //https://www.javacodegeeks.com/2013/12/advanced-java-generics-retreiving-generic-type-arguments.html + public static Class findSuperClassParameterType(Object instance, Class classOfInterest, int parameterIndex) { + Class subClass = instance.getClass(); + while (classOfInterest != subClass.getSuperclass()) { + // instance.getClass() is no subclass of classOfInterest or instance is a direct instance of classOfInterest + subClass = subClass.getSuperclass(); + if (subClass == null) { + return null; + } + } + ParameterizedType parameterizedType = (ParameterizedType) subClass.getGenericSuperclass(); + Class aReturn; + aReturn = (Class) parameterizedType.getActualTypeArguments()[parameterIndex]; + return aReturn; + } + + public static Class findSubClassParameterType(Object instance, Class classOfInterest, int parameterIndex) { + Map typeMap = new HashMap(); + Class instanceClass = instance.getClass(); + while (classOfInterest != instanceClass.getSuperclass()) { + extractTypeArguments(typeMap, instanceClass); + instanceClass = instanceClass.getSuperclass(); + if (instanceClass == null) { + return null; + } + } + + ParameterizedType parameterizedType = (ParameterizedType) instanceClass.getGenericSuperclass(); + Type actualType = parameterizedType.getActualTypeArguments()[parameterIndex]; + if (typeMap.containsKey(actualType)) { + actualType = typeMap.get(actualType); + } + if (actualType instanceof Class) { + return (Class) actualType; + } else if (actualType instanceof TypeVariable) { + return browseNestedTypes(instance, (TypeVariable) actualType); + } else { + return null; + } + } + + private static void extractTypeArguments(Map typeMap, Class clazz) { + Type genericSuperclass = clazz.getGenericSuperclass(); + if (!(genericSuperclass instanceof ParameterizedType)) { + return; + } + + ParameterizedType parameterizedType = (ParameterizedType) genericSuperclass; + Type[] typeParameter = ((Class) parameterizedType.getRawType()).getTypeParameters(); + Type[] actualTypeArgument = parameterizedType.getActualTypeArguments(); + for (int i = 0; i < typeParameter.length; i++) { + if(typeMap.containsKey(actualTypeArgument[i])) { + actualTypeArgument[i] = typeMap.get(actualTypeArgument[i]); + } + typeMap.put(typeParameter[i], actualTypeArgument[i]); + } + } + + private static Class browseNestedTypes(Object instance, TypeVariable actualType) { + Class instanceClass = instance.getClass(); + List> nestedOuterTypes = new LinkedList>(); + for (Class enclosingClass = instanceClass + .getEnclosingClass(); enclosingClass != null; enclosingClass = enclosingClass.getEnclosingClass()) { + try { + Field this$0 = instanceClass.getDeclaredField("this$0"); + Object outerInstance = this$0.get(instance); + Class outerClass = outerInstance.getClass(); + nestedOuterTypes.add(outerClass); + Map outerTypeMap = new HashMap(); + extractTypeArguments(outerTypeMap, outerClass); + for (Map.Entry entry : outerTypeMap.entrySet()) { + if (!(entry.getKey() instanceof TypeVariable)) { + continue; + } + TypeVariable foundType = (TypeVariable) entry.getKey(); + if (foundType.getName().equals(actualType.getName()) + && isInnerClass(foundType.getGenericDeclaration(), actualType.getGenericDeclaration())) { + if (entry.getValue() instanceof Class) { + return (Class) entry.getValue(); + } + actualType = (TypeVariable) entry.getValue(); + } + } + } catch (NoSuchFieldException | IllegalAccessException e) { + + } + + } + return null; + } + + private static boolean isInnerClass(GenericDeclaration outerDeclaration, GenericDeclaration innerDeclaration) { + if (!(outerDeclaration instanceof Class) || !(innerDeclaration instanceof Class)) { + return false; + } + Class outerClass = (Class) outerDeclaration; + Class innerClass = (Class) innerDeclaration; + while ((innerClass = innerClass.getEnclosingClass()) != null) { + if (innerClass == outerClass) { + return true; + } + } + return false; + } /* - * Internal Magic that probably should not get exposed. - */ + * + * End of Generics Block + * + */ + private static Field getField_Internal(final Class clazz, final String fieldName) throws NoSuchFieldException { @@ -525,26 +675,26 @@ public class ReflectionUtils { return getMethod_Internal(superClass, aMethodName); } } - + private static void dumpClassInfo(Class aClass) { Logger.INFO("We ran into an error processing reflection in "+aClass.getName()+", dumping all data for debugging."); // Get the methods - Method[] methods = aClass.getDeclaredMethods(); - Field[] fields = aClass.getDeclaredFields(); - Constructor[] consts = aClass.getDeclaredConstructors(); + Method[] methods = aClass.getDeclaredMethods(); + Field[] fields = aClass.getDeclaredFields(); + Constructor[] consts = aClass.getDeclaredConstructors(); Logger.INFO("Dumping all Methods."); - for (Method method : methods) { - System.out.println(method.getName()+" | "+StringUtils.getDataStringFromArray(method.getParameterTypes())); - } + for (Method method : methods) { + System.out.println(method.getName()+" | "+StringUtils.getDataStringFromArray(method.getParameterTypes())); + } Logger.INFO("Dumping all Fields."); - for (Field f : fields) { - System.out.println(f.getName()); - } + for (Field f : fields) { + System.out.println(f.getName()); + } Logger.INFO("Dumping all Constructors."); - for (Constructor c : consts) { - System.out.println(c.getName()+" | "+c.getParameterCount()+" | "+StringUtils.getDataStringFromArray(c.getParameterTypes())); - } + for (Constructor c : consts) { + System.out.println(c.getName()+" | "+c.getParameterCount()+" | "+StringUtils.getDataStringFromArray(c.getParameterTypes())); + } } private static Class getNonPublicClass(final String className) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index e352712138..e0f768830d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -1,10 +1,10 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; -import static gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores; import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; @@ -48,6 +48,7 @@ import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_MultiMachine; import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine; @@ -1136,6 +1137,47 @@ GT_MetaTileEntity_MultiBlockBase { ItemStack guiSlot = this.mInventory[1]; return guiSlot; } + + protected boolean setGUIItemStack(ItemStack aNewGuiSlotContents) { + boolean result = false; + if (this.mInventory[1] == null) { + this.mInventory[1] = aNewGuiSlotContents != null ? aNewGuiSlotContents.copy() : null; + aNewGuiSlotContents = null; + this.updateSlots(); + result = true; + } + return result; + } + + protected boolean clearGUIItemSlot() { + return setGUIItemStack(null); + } + + + public ItemStack findItemInInventory(Item aSearchStack) { + return findItemInInventory(aSearchStack, 0); + } + + public ItemStack findItemInInventory(Item aSearchStack, int aMeta) { + return findItemInInventory(ItemUtils.simpleMetaStack(aSearchStack, aMeta, 1)); + } + + public ItemStack findItemInInventory(ItemStack aSearchStack) { + if (aSearchStack != null && this.mInputBusses.size() > 0) { + for (GT_MetaTileEntity_Hatch_InputBus bus : this.mInputBusses) { + if (bus != null) { + for (ItemStack uStack : bus.mInventory) { + if (uStack != null) { + if (aSearchStack.getClass().isInstance(uStack.getItem())) { + return uStack; + } + } + } + } + } + } + return null; + } @Override public void updateSlots() { @@ -1208,6 +1250,14 @@ GT_MetaTileEntity_MultiBlockBase { if (aTileEntity == null) { return false; } + + //Check type + Class aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); + if (!aHatchType.isInstance(aTileEntity)) { + return false; + } + + if (aList.isEmpty()) { if (aTileEntity instanceof GT_MetaTileEntity_Hatch) { if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java index 5ab9cd9795..c55fe10829 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java @@ -7,6 +7,7 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; @@ -19,6 +20,7 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.Gregtech import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; @@ -68,13 +70,29 @@ extends GregtechMeta_MultiBlockBase @Override public int getDamageToComponent(ItemStack aStack){ - Logger.INFO("Trying to damage component."); + //log("Trying to damage component."); return ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack) ? 1 : 0; } + + private static Item mLavaFilter; @Override - public boolean checkRecipe(final ItemStack aStack) { + public boolean checkRecipe(ItemStack aStack) { this.mSuperEfficencyIncrease=0; + + if (mLavaFilter == null) { + mLavaFilter = ItemList.Component_LavaFilter.getItem(); + } + + //Try reload new Lava Filter + if (aStack == null) { + ItemStack uStack = this.findItemInInventory(mLavaFilter); + if (uStack != null) { + this.setGUIItemStack(uStack); + aStack = this.getGUIItemStack(); + } + } + for (GT_Recipe tRecipe : Recipe_GT.Gregtech_Recipe_Map.sThermalFuels.mRecipeList) { FluidStack tFluid = tRecipe.mFluidInputs[0]; @@ -85,7 +103,7 @@ extends GregtechMeta_MultiBlockBase this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease()); int loot_MAXCHANCE = 100000; - if (ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack)) { + if (mLavaFilter.getClass().isInstance(aStack.getItem())) { if ((tRecipe.getOutput(0) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(0))) { this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(0) }) }; @@ -199,8 +217,9 @@ extends GregtechMeta_MultiBlockBase "Size: 3x3x3 (Hollow)", "Thermal Containment Casings (10 at least!)", "Controller (front middle)", - "2x Input Hatch", + "2x Input Hatch (Water/Thermal Fluid)", "1x Output Hatch (Steam)", + "1x Input Bus (Supplies controller with Lava Filters, optional)", "1x Output Bus (Filter results, optional)", }; } @@ -234,7 +253,7 @@ extends GregtechMeta_MultiBlockBase if (!isValidBlockForStructure(tTileEntity, 1, true, aBlock, aMeta, ModBlocks.blockCasings2Misc, 11)) { - Logger.INFO("Bad Thermal Boiler casing"); + log("Bad Thermal Boiler casing"); return false; } ++tAmount; -- cgit From 051a002d043d9e307dda4d92732f5ef2832cf146 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 11:28:26 +1000 Subject: $ Greatly improved Cape Handler, Prevents long delays upon first inventory open. --- .../gregtech/common/render/GTPP_CapeRenderer.java | 40 +++++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) (limited to 'src/Java') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java index 7dd376759a..763a4a129d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java @@ -49,6 +49,7 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.RenderPlayerEvent; +import net.minecraftforge.common.UsernameCache; public class GTPP_CapeRenderer extends RenderPlayer { @@ -91,7 +92,7 @@ public class GTPP_CapeRenderer extends RenderPlayer { aEvent.setCanceled(true); Logger.WARNING("A2"); return; - } + } } // Make sure we don't keep checking on clients who dont have capes. @@ -100,14 +101,35 @@ public class GTPP_CapeRenderer extends RenderPlayer { // Time to Spliterate some data Map aPlayerData = new HashMap(); Map aNameMap = new HashMap(); - int i = 0; - for (String s : mData) { - String[] aSplit = s.split("@"); - int a[] = new int[] { 0, mCapes.length - 1 }; - int aID = Integer.parseInt(aSplit[1]); - String aPlayerName = this.getPlayerName("iteration-" + (i++), aSplit[0]); - aNameMap.put(aSplit[0], aPlayerName); - aPlayerData.put(aPlayerName, this.mCapes[Math.max(a[0], Math.min(aID, a[1]))]); + int i = 0; + if (!CORE.DEVENV) { + for (String s : mData) { + String[] aSplit = s.split("@"); + int a[] = new int[] { 0, mCapes.length - 1 }; + int aID = Integer.parseInt(aSplit[1]); + // Quick Check to prevent lag + Logger.WARNING("Trying to create UUID from - " + aSplit[0]); + UUID aPlayerID = UUID.fromString(aSplit[0]); + Logger.WARNING("Result: " + aPlayerID.toString()); + if (aPlayerID != null) { + if (UsernameCache.containsUUID(aPlayerID)) { + Logger.WARNING("UsernameCache contains a last known username for current players UUID."); + if (!UsernameCache.getLastKnownUsername(aPlayerID).toLowerCase() + .equals(ClientProxy.playerName)) { + Logger.WARNING("Last known name does not match current name. Checking next UUID."); + continue; + } else { + Logger.WARNING("Last known name does match current name."); + } + } else { + Logger.WARNING("UsernameCache did not hold results for current player, oops."); + continue; + } + } + String aPlayerName = this.getPlayerName("iteration-" + (i++), aSplit[0]); + aNameMap.put(aSplit[0], aPlayerName); + aPlayerData.put(aPlayerName, this.mCapes[Math.max(a[0], Math.min(aID, a[1]))]); + } } // Set flag to only render this event if player has a cape. -- cgit From d0dd7513435c54f17d800ec48cf50f75d1b8628b Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 12:55:27 +1000 Subject: + Added Strontium processing chains. + Added cutting machine recipes for Blocks -> Plates for GT++ materials. % Adjusted Rare Earth Sifting to no longer give Gd, Yb, Sm instead now provides small ore dust, which can be processed for Yb, Sm and Sr. % Adjusted Strontium RGB and texture set slightly. % Arceus Alloy 2B now requires Strontium as a component. --- src/Java/gtPlusPlus/core/item/ModItems.java | 4 + src/Java/gtPlusPlus/core/material/ALLOY.java | 3 +- src/Java/gtPlusPlus/core/material/ELEMENT.java | 2 +- .../gtPlusPlus/core/material/MISC_MATERIALS.java | 57 +++ src/Java/gtPlusPlus/core/material/ORES.java | 2 +- .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 475 +++++++++++---------- .../core/util/minecraft/EnergyUtils.java | 4 +- .../core/util/minecraft/MaterialUtils.java | 11 + .../GT_MetaTileEntity_SemiFluidGenerator.java | 12 +- .../generators/GregtechMetaTileEntity_RTG.java | 8 +- .../basic/GregtechMetaPollutionCreator.java | 2 +- ...regtechMetaTileEntity_CompactFusionReactor.java | 52 +-- .../basic/GregtechMetaTileEntity_PocketFusion.java | 52 +-- .../xmod/gregtech/loaders/RecipeGen_Plates.java | 15 + 14 files changed, 402 insertions(+), 297 deletions(-) create mode 100644 src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java (limited to 'src/Java') diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index 51d41674d3..e504c1c2b4 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -82,6 +82,7 @@ import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.ALLOY; import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MISC_MATERIALS; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; import gtPlusPlus.core.material.NONMATERIAL; @@ -539,6 +540,9 @@ public final class ModItems { MaterialGenerator.generate(ELEMENT.STANDALONE.GRANITE, false, false); MaterialGenerator.generate(ELEMENT.STANDALONE.RUNITE, false); MaterialGenerator.generate(ELEMENT.STANDALONE.DRAGON_METAL, false); + + MISC_MATERIALS.run(); + //Carbides - Tungsten Carbide exists in .09 so don't generate it. - Should still come before alloys though if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java index d2639a220f..1df843da0b 100644 --- a/src/Java/gtPlusPlus/core/material/ALLOY.java +++ b/src/Java/gtPlusPlus/core/material/ALLOY.java @@ -695,7 +695,8 @@ public final class ALLOY { new MaterialStack(ELEMENT.getInstance().TRINIUM_REFINED, 30), new MaterialStack(ALLOY.MARAGING350, 40), new MaterialStack(ALLOY.TUNGSTENSTEEL, 20), - new MaterialStack(ALLOY.OSMIRIDIUM, 10) + new MaterialStack(ALLOY.OSMIRIDIUM, 10), + new MaterialStack(ELEMENT.getInstance().STRONTIUM, 10) }); diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java index 9ba6fe0f1d..99586b37fe 100644 --- a/src/Java/gtPlusPlus/core/material/ELEMENT.java +++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java @@ -51,7 +51,7 @@ public final class ELEMENT { public final Material BROMINE = new Material("Bromine", MaterialState.PURE_LIQUID, new short[]{200, 25, 25}, -7, 58, 35, 45, false, "Br", 0);//Not a GT Inherited Material public final Material KRYPTON = new Material("Krypton", MaterialState.PURE_LIQUID, new short[]{255, 255, 255}, -157, -153, 36, 48, false, "Kr", 0);//Not a GT Inherited Material public final Material RUBIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Rubidium); - public final Material STRONTIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Strontium); + public final Material STRONTIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Strontium, new short[] {230, 210, 110}, TextureSet.SET_FLINT); public final Material YTTRIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Yttrium); public final Material ZIRCONIUM = new Material("Zirconium", MaterialState.SOLID, new short[]{255, 250, 205}, 1855, 4377, 40, 51, false, "Zr", 0);//Not a GT Inherited Material public final Material NIOBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Niobium); diff --git a/src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java b/src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java new file mode 100644 index 0000000000..69ee3e963d --- /dev/null +++ b/src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java @@ -0,0 +1,57 @@ +package gtPlusPlus.core.material; + +import gregtech.api.enums.TextureSet; +import gtPlusPlus.core.material.nuclear.FLUORIDES; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.MaterialUtils; + +public final class MISC_MATERIALS { + + /* + * Some of these materials purely exist as data objects, items will most likely be assigned seperately. + * Most are just compositions which will have dusts assigned to them. + */ + + public static void run() { + MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_OXIDE); + MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_HYDROXIDE); + } + + public static final Material STRONTIUM_OXIDE = new Material( + "Strontium Oxide", + MaterialState.SOLID, + TextureSet.SET_METALLIC, + null, + -1, + -1, + -1, + -1, + false, + "SrO", + 0, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().STRONTIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 1) + }); + + public static final Material STRONTIUM_HYDROXIDE = new Material( + "Strontium Hydroxide", + MaterialState.SOLID, + TextureSet.SET_METALLIC, + null, + -1, + -1, + -1, + -1, + false, + "Sr(OH)2", + 0, + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().STRONTIUM, 1), + new MaterialStack(FLUORIDES.HYDROXIDE, 2) + }); + + + +} diff --git a/src/Java/gtPlusPlus/core/material/ORES.java b/src/Java/gtPlusPlus/core/material/ORES.java index 801e4924b3..0e1691a557 100644 --- a/src/Java/gtPlusPlus/core/material/ORES.java +++ b/src/Java/gtPlusPlus/core/material/ORES.java @@ -545,7 +545,7 @@ public final class ORES { -1, //Radiation new MaterialStack[]{// (Ca,Sr,Ce,Na)5(PO4)3F new MaterialStack(ELEMENT.getInstance().CALCIUM, 5), - new MaterialStack(ELEMENT.getInstance().STRONTIUM, 5), + new MaterialStack(MISC_MATERIALS.STRONTIUM_OXIDE, 5), new MaterialStack(ELEMENT.getInstance().CERIUM, 5), new MaterialStack(ELEMENT.getInstance().SODIUM, 5), new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 3), diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index 483fce8ce5..c00e15a007 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -26,6 +26,7 @@ import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.ALLOY; import gtPlusPlus.core.material.ELEMENT; +import gtPlusPlus.core.material.MISC_MATERIALS; import gtPlusPlus.core.material.MaterialStack; import gtPlusPlus.core.material.NONMATERIAL; import gtPlusPlus.core.material.ORES; @@ -90,7 +91,7 @@ public class RECIPES_GREGTECH { assemblyLineRecipes(); latheRecipes(); vacuumFreezerRecipes(); - + addFuels(); } @@ -99,38 +100,38 @@ public class RECIPES_GREGTECH { } private static void latheRecipes() { - + GT_Values.RA.addLatheRecipe( ALLOY.EGLIN_STEEL.getBlock(1), GregtechItemList.Bomb_Cast_Mold.get(1), null, 20 * 60 * 15, 120); - + GT_Values.RA.addLatheRecipe( GregtechItemList.Bomb_Cast_Set.get(1), GregtechItemList.Bomb_Cast_Broken.get(2), ItemUtils.getSimpleStack(ModItems.itemBombCasing, 2), 20 * 60 * 5, 30); - + } private static void fusionRecipes() { - /** - * Adds a Fusion reactor Recipe - * - * @param aInput1 = first Input (not null, and respects StackSize) - * @param aInput2 = second Input (not null, and respects StackSize) - * @param aOutput = Output of the Fusion (can be null, and respects StackSize) - * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) - * @param aFusionEnergyPerTick = The EU generated per Tick (can even be negative!) - * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0) - */ - + /** + * Adds a Fusion reactor Recipe + * + * @param aInput1 = first Input (not null, and respects StackSize) + * @param aInput2 = second Input (not null, and respects StackSize) + * @param aOutput = Output of the Fusion (can be null, and respects StackSize) + * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) + * @param aFusionEnergyPerTick = The EU generated per Tick (can even be negative!) + * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0) + */ + //Hydrogen Plasma - /*CORE.RA.addFusionReactorRecipe( + /*CORE.RA.addFusionReactorRecipe( Particle.getIon("Hydrogen", 0), Particle.getIon("Hydrogen", 0), Materials.Hydrogen.getPlasma(1), @@ -138,8 +139,8 @@ public class RECIPES_GREGTECH { 16, 4096, 40000000);*/ - - + + //Hypogen Creation GT_Values.RA.addFusionReactorRecipe( Materials.Neutronium.getMolten(128), @@ -157,23 +158,23 @@ public class RECIPES_GREGTECH { 2048 * 4, (int) GT_Values.V[7], 150000000 * 2); - + } private static void assemblyLineRecipes() { - - + + ItemStack[] aCoilWire = new ItemStack[] { ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 0, GTNH ? 64 : 32), ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 1, GTNH ? 48 : 16), ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 2, GTNH ? 32 : 8), ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 3, GTNH ? 16 : 4), }; - - - - + + + + //Containment Casings CORE.RA.addAssemblylineRecipe( ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_1_CONTAINMENT, 1), @@ -199,12 +200,12 @@ public class RECIPES_GREGTECH { ALLOY.ENERGYCRYSTAL.getFluid(144 * 9 * (GTNH ? 8 : 4)), ALLOY.TUMBAGA.getFluid(144 * 9 * (GTNH ? 32 : 8)), ALLOY.NICHROME.getFluid(144 * 1 * (GTNH ? 16 : 4)), - + }, ItemUtils.getSimpleStack(ModBlocks.blockCasings3Misc, 15, 32), 20 * 60 * 10 * (GTNH ? 2 : 1), (int) GT_Values.V[6]); - + //Slow Fusion Controller CORE.RA.addAssemblylineRecipe( GregtechItemList.COMET_Cyclotron.get(1), @@ -232,8 +233,8 @@ public class RECIPES_GREGTECH { GregtechItemList.Miniature_Fusion.get(1), 20 * 60 * 5 * (GTNH ? 2 : 1), (int) GT_Values.V[7]); - - + + //Plasma Tank CORE.RA.addAssemblylineRecipe( ItemUtils.getOrePrefixStack(OrePrefixes.pipeMedium, Materials.Superconductor, 1), @@ -250,17 +251,17 @@ public class RECIPES_GREGTECH { CI.getTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)), CI.getTertiaryTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)), CI.getAlternativeTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)), - + }, GregtechItemList.Plasma_Tank.get(1), 20 * 60 * 1 * (GTNH ? 2 : 1), (int) GT_Values.V[5]); - - + + /* * Contianment casings */ - + ItemStack[] aGemCasings = new ItemStack[] { GregtechItemList.Battery_Casing_Gem_1.get(1), GregtechItemList.Battery_Casing_Gem_2.get(1), @@ -273,7 +274,7 @@ public class RECIPES_GREGTECH { GregtechItemList.Battery_Casing_Gem_2.get(1), GregtechItemList.Battery_Casing_Gem_3.get(1), }; - + int aCasingSlot = 0; for (int j = 6; j < 10; j++) { CORE.RA.addAssemblylineRecipe( @@ -290,24 +291,24 @@ public class RECIPES_GREGTECH { CI.getTieredFluid(j, 144 * 3 * (GTNH ? 16 : 8)), CI.getTertiaryTieredFluid(j-2, 144 * 4 * (GTNH ? 16 : 8)), CI.getAlternativeTieredFluid(j, 144 * 6 * (GTNH ? 16 : 8)), - + }, aGemCasings[aCasingSlot++], 20 * 60 * 1 * (GTNH ? 2 : 1), (int) GT_Values.V[j]); } - + /* * Gem Battery Recipes */ - + ItemStack[] aGemBatteries = new ItemStack[] { GregtechItemList.Battery_Gem_1.get(1), GregtechItemList.Battery_Gem_2.get(1), GregtechItemList.Battery_Gem_3.get(1), GregtechItemList.Battery_Gem_4.get(1), }; - + ItemStack[] aExoticInputs = new ItemStack[] { Particle.getBaseParticle(Particle.PROTON), Particle.getBaseParticle(Particle.ELECTRON), @@ -338,8 +339,8 @@ public class RECIPES_GREGTECH { 20 * 60 * 1 * (GTNH ? 2 : 1), (int) GT_Values.V[j]); } - - + + //Nano Healer CORE.RA.addAssemblylineRecipe( ItemUtils.simpleMetaStack(Items.golden_apple, 1, 1), @@ -360,14 +361,14 @@ public class RECIPES_GREGTECH { CI.getTertiaryTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), CI.getAlternativeTieredFluid(6, 144 * 18 * (GTNH ? 16 : 8)), CI.getAlternativeTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)), - + }, ItemUtils.getItemStackFromFQRN("miscutils:personalHealingDevice", 1), 20 * 60 * 30 * (GTNH ? 2 : 1), (int) GT_Values.V[7]); - - - + + + //Charge Pack LuV-UV ItemStack[] aChargeResearch = new ItemStack[] { @@ -376,7 +377,7 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(ModItems.itemChargePack2, 1), ItemUtils.getSimpleStack(ModItems.itemChargePack3, 1), }; - + ItemStack[] aChargeOutputs = new ItemStack[] { ItemUtils.getSimpleStack(ModItems.itemChargePack1, 1), ItemUtils.getSimpleStack(ModItems.itemChargePack2, 1), @@ -390,7 +391,7 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore9", GTNH ? 8 : 4), ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore10", GTNH ? 8 : 4), }; - + int aCurrSlot = 0; for (int h = 6; h < 10; h++) { CORE.RA.addAssemblylineRecipe( @@ -398,7 +399,7 @@ public class RECIPES_GREGTECH { 20 * 60 * 10 * (aCurrSlot + 1), new ItemStack[] { ItemUtils.getSimpleStack( - aGemBatteries[aCurrSlot], GTNH ? 4 : 2), + aGemBatteries[aCurrSlot], GTNH ? 4 : 2), aBufferCoreInputs[aCurrSlot], aCoilWire[aCurrSlot], CI.getTieredComponent(OrePrefixes.plate, h, GTNH ? 16 : 8), @@ -423,15 +424,15 @@ public class RECIPES_GREGTECH { (int) GT_Values.V[h]); aCurrSlot++; } - - - - - - - - - + + + + + + + + + } private static void laserEngraverRecipes() { @@ -442,21 +443,21 @@ public class RECIPES_GREGTECH { ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.getDust(1), 20 * 60 * 3, MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.vTier)); - + GT_Values.RA.addLaserEngraverRecipe( GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 8L), GregtechItemList.Laser_Lens_Special.get(0), ELEMENT.STANDALONE.ASTRAL_TITANIUM.getDust(1), 20 * 60 * 2, MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ASTRAL_TITANIUM.vTier)); - + GT_Values.RA.addLaserEngraverRecipe( ALLOY.NITINOL_60.getBlock(2), GregtechItemList.Laser_Lens_Special.get(0), ELEMENT.STANDALONE.ADVANCED_NITINOL.getBlock(1), 20 * 60 * 1, MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ADVANCED_NITINOL.vTier)); - + GT_Values.RA.addLaserEngraverRecipe( GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 64L), GregtechItemList.Laser_Lens_Special.get(0), @@ -464,15 +465,15 @@ public class RECIPES_GREGTECH { 20 * 60 * 5, MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CHRONOMATIC_GLASS.vTier)); - + GT_Values.RA.addLaserEngraverRecipe( CI.getFieldGenerator(6, 1), CI.getEmitter(7, 2), ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_1_CONTAINMENT, 1), 20 * 60 * 5, MaterialUtils.getVoltageForTier(5)); - - + + } private static void breweryRecipes() { @@ -537,7 +538,7 @@ public class RECIPES_GREGTECH { FluidUtils.getFluidStack("molten.trinium", 136 * 144), 0, 20 * 3000, 2040*4); } - + //Eglin Steel CORE.RA.addBlastSmelterRecipe( new ItemStack[] { @@ -553,7 +554,7 @@ public class RECIPES_GREGTECH { 0, 20 * 45, 120); - + //HG1223 CORE.RA.addBlastSmelterRecipe( new ItemStack[] { @@ -571,9 +572,9 @@ public class RECIPES_GREGTECH { 100, //Output Chance 20 * 120, 122880); - - - + + + // Germanium Roasting CORE.RA.addBlastSmelterRecipe( @@ -622,7 +623,7 @@ public class RECIPES_GREGTECH { 0, 20 * 300, 2000); - + // Ruthenium Roasting CORE.RA.addBlastSmelterRecipe( @@ -669,7 +670,7 @@ public class RECIPES_GREGTECH { 0, 20 * 300, 8000); - + // Rhenium Roasting CORE.RA.addBlastSmelterRecipe( new ItemStack[] { @@ -704,7 +705,7 @@ public class RECIPES_GREGTECH { 0, 20 * 300, 4000); - + //Thallium Roasting CORE.RA.addBlastSmelterRecipe( new ItemStack[] { @@ -719,8 +720,27 @@ public class RECIPES_GREGTECH { 20 * 300, 8000); - - + + + //Strontium processing + CORE.RA.addBlastSmelterRecipe( + new ItemStack[] { + ItemUtils.getGregtechCircuit(21), + MISC_MATERIALS.STRONTIUM_OXIDE.getDust(8), + ELEMENT.getInstance().ALUMINIUM.getDust(8), + }, + null, + ELEMENT.getInstance().OXYGEN.getFluid(8000), + new ItemStack[] { + ELEMENT.getInstance().ALUMINIUM.getIngot(8), + ELEMENT.getInstance().STRONTIUM.getIngot(8) + }, + 100, //Output Chance + 20 * 120, + 480*4); + + + } @@ -733,7 +753,7 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("sulfuricacid", 250)); - + // Hydrofluoric Acid boolean addedGtExtraction = false; // Try use Internal GT Fluid first @@ -751,10 +771,10 @@ public class RECIPES_GREGTECH { FluidUtils.getFluidStack("hydrofluoricacid", 125), null); //Add an empty recipe, but only if we didn't for the standard GT HF. Prevents Fluid transformation exploits. if (!addedGtExtraction) - GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), - ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid", 125)); + GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), + ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid", 125)); + - } private static void cokeOvenRecipes() { @@ -893,18 +913,18 @@ public class RECIPES_GREGTECH { ItemStack cropGrape = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cropGrape", 1); ItemStack foodRaisins = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foodRaisins", 1); - + if (cropGrape != null && foodRaisins != null) - CORE.RA.addDehydratorRecipe(new ItemStack[] { - cropGrape - }, // Item - null, // Fluid input (slot 1) - null, // Fluid output (slot 2) - new ItemStack[] { - foodRaisins - }, // Output - new int[] { 0 }, 10, // Time in ticks - 2); // EU + CORE.RA.addDehydratorRecipe(new ItemStack[] { + cropGrape + }, // Item + null, // Fluid input (slot 1) + null, // Fluid output (slot 2) + new ItemStack[] { + foodRaisins + }, // Output + new int[] { 0 }, 10, // Time in ticks + 2); // EU } catch (final NullPointerException e) { @@ -914,7 +934,7 @@ public class RECIPES_GREGTECH { // Calcium Hydroxide if ((ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1))) || LoadedMods.IHL) { try { - + CORE.RA.addDehydratorRecipe( new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 10) }, // Item FluidUtils.getFluidStack("water", 10000), // Fluid input @@ -1010,7 +1030,7 @@ public class RECIPES_GREGTECH { null, new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 9), FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(9) - }, + }, new int[] { 0 }, 120 * 20, // Time in ticks 500); // EU @@ -1112,7 +1132,7 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 2) }, // Output 3 * 20, // Time in ticks 30); // EU - + /* * Try Add custom Recipe for drying leather */ @@ -1297,41 +1317,41 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(ModItems.itemDetCable, 24), 30, 120); - + /*addAR(ItemUtils.getItemStackOfAmountFromOreDict("plateIncoloy020", 16), ItemUtils.getItemStackOfAmountFromOreDict("frameGtIncoloyMA956", 4), null, GregtechItemList.Casing_Power_SubStation.get(4), 80, 120);*/ - - - - + + + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { - GregtechItemList.Casing_Multi_Use.get(1), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(6), 1), - ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(4), 8), - CI.sensor_HV, - CI.emitter_HV, - CI.fieldGenerator_HV, - }, + GregtechItemList.Casing_Multi_Use.get(1), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(6), 1), + ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(4), 8), + CI.sensor_HV, + CI.emitter_HV, + CI.fieldGenerator_HV, + }, null, ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame), 20*20, 2048); - - - - - + + + + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(ModItems.itemRope, 6)}, null, ItemUtils.getSimpleStack(ModBlocks.blockNet, 2), 1*20, 8); CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(CI.explosiveITNT, 2), ItemUtils.getSimpleStack(CI.explosiveTNT, 4), ELEMENT.getInstance().SULFUR.getDust(2), ELEMENT.getInstance().IRON.getFrameBox(1)}, null, ItemUtils.getSimpleStack(ModBlocks.blockMiningExplosive, 3), 5*20, 60); CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(Items.nether_star), ItemUtils.getItemStackOfAmountFromOreDict("plateTungstenSteel", 8), ItemUtils.getItemStackOfAmountFromOreDict("stickBlackSteel", 8)}, null, ItemUtils.getSimpleStack(ModBlocks.blockWitherGuard, 32), 30*20, 500); - - + + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { CI.electricPump_LV, @@ -1357,7 +1377,7 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackOfAmountFromOreDict("stickChrome", 1), ItemUtils.getItemStackOfAmountFromOreDict("plateStainlessSteel", 2) }, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1), 10*20*3, 480); - + CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] { CI.electricPump_EV, CI.electricMotor_EV, @@ -1467,14 +1487,14 @@ public class RECIPES_GREGTECH { NUCLIDE.LiFBeF2ZrF4UF4.getFluid(144), 10000, 150, 2000); GT_Values.RA.addFluidExtractionRecipe(NUCLIDE.LiFBeF2ThF4UF4.getDust(1), null, NUCLIDE.LiFBeF2ThF4UF4.getFluid(144), 10000, 200, 1500); - + //ZIRCONIUM_TETRAFLUORIDE GT_Values.RA.addFluidExtractionRecipe(FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(1), null, FluidUtils.getFluidStack(ModItems.fluidZrF4, 144), 10000, 200, 512+256); - - - -/* GT_Values.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLiBeF2ZrF4U235", 1), null, + + + + /* GT_Values.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLiBeF2ZrF4U235", 1), null, FluidUtils.getFluidStack("molten.libef2zrf4u235", 144), 10000, 250, 1000); //LFTR Fuel 2 GT_Values.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLiBeF2ZrF4UF4", 1), null, @@ -1516,10 +1536,10 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackOfAmountFromOreDict("dustSmallThorium", 20), ELEMENT.getInstance().URANIUM232.getDust(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[] { 0, 0, 10 }, 500 * 20, 2000); - + //Process Used Fuel Rods for Krypton - + //Uranium GT_Values.RA.addCentrifugeRecipe( CI.getNumberedCircuit(20), @@ -1546,7 +1566,7 @@ public class RECIPES_GREGTECH { ELEMENT.getInstance().PLUTONIUM238.getTinyDust(1), ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1), new int[] { 0, 0, 500, 500, 500, 500 }, 750 * 20, 4000); - + //Thorium GT_Values.RA.addCentrifugeRecipe( CI.getNumberedCircuit(20), @@ -1560,8 +1580,8 @@ public class RECIPES_GREGTECH { ELEMENT.getInstance().POLONIUM.getSmallDust(1), ELEMENT.getInstance().THALLIUM.getTinyDust(1), new int[] { 0, 0, 5000, 5000, 5000, 2500 }, 250 * 20, 4000); - - + + } @@ -1615,7 +1635,7 @@ public class RECIPES_GREGTECH { ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 16), FluidUtils.getFluidStack("water", 1000), FluidUtils.getFluidStack("lithiumhydroxide", 144 * 4), CI.emptyCells(1), 300 * 20); - + //Bombs GT_Values.RA.addChemicalRecipe( ItemUtils.getSimpleStack(ModItems.itemBombCasing, 4), @@ -1624,7 +1644,7 @@ public class RECIPES_GREGTECH { null, ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4), 300 * 20); - + GT_Values.RA.addChemicalRecipe( ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4), ItemUtils.getSimpleStack(ModItems.itemDetCable, 4), @@ -1632,7 +1652,7 @@ public class RECIPES_GREGTECH { null, ItemUtils.getSimpleStack(ModItems.itemBomb, 4), 10 * 20); - + // LFTR Fuel Related Compounds if (GTNH) { @@ -1697,32 +1717,32 @@ public class RECIPES_GREGTECH { CI.emptyCells(7), 2 * 20); } - - + + //Technetium GT_Values.RA.addChemicalRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium99", 1), null, FluidUtils.getFluidStack("sulfuricacid", 1000), FluidUtils.getFluidStack("sulfuricacid", 144 * 2), ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium", 1), 100 * 20); - + } private static void blastFurnaceRecipes() { - //public boolean addBlastRecipe( + //public boolean addBlastRecipe( //ItemStack aInput1, ItemStack aInput2, //FluidStack aFluidInput, FluidStack aFluidOutput, //ItemStack aOutput1, ItemStack aOutput2, //int aDuration, int aEUt, int aLevel) - + GT_Values.RA.addBlastRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumFluoride", 2), ItemUtils.getItemStackOfAmountFromOreDict("dustBerylliumFluoride", 1), GT_Values.NF, GT_Values.NF, ItemUtils.getItemStackOfAmountFromOreDict("dustLi2BeF4", 3), null, 60 * 20, 2000, 3000); GT_Values.RA.addBlastRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustZrCl4", 1), null, GT_Values.NF, GT_Values.NF, ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 1), null, 60 * 20, 340, 300); - - + + //Synthetic Graphite GT_Val