aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/item
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-09-14 19:13:00 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-09-14 19:13:00 +1000
commitc430178cf2cc3590f8dd33a4e620369208e5412a (patch)
tree4a3bac655ccdeeb1c10e81d0b2170a5f1797a361 /src/Java/gtPlusPlus/core/item
parentf3823edeb80486988ff11e8bf77f6d61db1852e1 (diff)
downloadGT5-Unofficial-c430178cf2cc3590f8dd33a4e620369208e5412a.tar.gz
GT5-Unofficial-c430178cf2cc3590f8dd33a4e620369208e5412a.tar.bz2
GT5-Unofficial-c430178cf2cc3590f8dd33a4e620369208e5412a.zip
$ Fixed Fluids properly and finally.
$ Changed Alloy Boiling points. $ Rewrote the dust recipe handlers.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
-rw-r--r--src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java147
1 files changed, 52 insertions, 95 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java
index b94b7759da..0342f7f104 100644
--- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java
+++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java
@@ -30,6 +30,7 @@ public class BaseItemDust extends Item{
String name = "";
private int mTier;
private Material dustInfo;
+ private String oredictName;
public BaseItemDust(String unlocalizedName, String materialName, Material matInfo, int colour, String pileSize, boolean blastFurnaceRequired, int tier, int sRadioactivity) {
setUnlocalizedName(unlocalizedName);
@@ -70,6 +71,7 @@ public class BaseItemDust extends Item{
Utils.LOG_WARNING("Generating OreDict Name: "+temp);
}
if (temp != null && temp != ""){
+ oredictName = temp;
GT_OreDictUnificator.registerOre(temp, UtilsItems.getSimpleStack(this));
}
addMixerRecipe();
@@ -133,120 +135,75 @@ public class BaseItemDust extends Item{
private void addMixerRecipe(){
- ItemStack tempStack = UtilsItems.getSimpleStack(this);
- ItemStack tempOutput = null;
+
+ ItemStack thisItem;
+ ItemStack normalDust = dustInfo.getDust(1);
+ ItemStack smallDust = dustInfo.getSmallDust(1);
+ ItemStack tinyDust = dustInfo.getTinyDust(1);
+
ItemStack[] inputStacks = dustInfo.getMaterialComposites();
- ItemStack[] outputStacks = {dustInfo.getDust(10)};
- String temp = "";
- Utils.LOG_WARNING("Unlocalized name for OreDict nameGen: "+getUnlocalizedName());
- if (getUnlocalizedName().toLowerCase().contains("item.")){
- temp = getUnlocalizedName().replace("item.", "");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
- }
- else {
- temp = getUnlocalizedName();
- }
- if (temp.toLowerCase().contains("dusttiny")){
- temp = temp.replace("itemDustTiny", "dust");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ ItemStack outputStacks = dustInfo.getDust(10);
+
+ if (oredictName.contains("dustTiny")){
+ thisItem = tinyDust;
+ ItemStack normalStack = dustInfo.getDust(1);
+ ItemStack tinyStack = dustInfo.getTinyDust(9);
+ Utils.LOG_INFO("Generating a 9 Tiny dust to 1 Dust recipe for "+materialName);
+ UtilsRecipe.recipeBuilder(
+ thisItem, thisItem, thisItem,
+ thisItem, thisItem, thisItem,
+ thisItem, thisItem, thisItem,
+ normalStack);
+
+ Utils.LOG_INFO("Generating a 9 Tiny dust from 1 Dust recipe for "+materialName);
+ UtilsRecipe.recipeBuilder(
+ normalStack, null, null,
+ null, null, null,
+ null, null, null,
+ tinyStack);
+
}
- else if (temp.toLowerCase().contains("dustsmall")){
- temp = temp.replace("itemDustSmall", "dust");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ else if (oredictName.contains("dustSmall")){
+ thisItem = smallDust;
+ ItemStack normalStack = dustInfo.getDust(1);
+ ItemStack smallStack = dustInfo.getSmallDust(4);
+
+ Utils.LOG_INFO("Generating a 4 Small dust to 1 Dust recipe for "+materialName);
+ UtilsRecipe.recipeBuilder(
+ thisItem, thisItem, null,
+ thisItem, thisItem, null,
+ null, null, null,
+ normalStack);
+
+ Utils.LOG_INFO("Generating a 4 Small dust from 1 Dust recipe for "+materialName);
+ UtilsRecipe.recipeBuilder(
+ null, normalStack, null,
+ null, null, null,
+ null, null, null,
+ smallStack);
+
}
else {
- temp = temp.replace("itemD", "d");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
- }
- if (temp != null && temp != "" && !temp.equals("")){
+ thisItem = normalDust;
+ }
- if (getUnlocalizedName().toLowerCase().contains("dusttiny") || getUnlocalizedName().toLowerCase().contains("dustsmall")){
- tempOutput = UtilsItems.getItemStackOfAmountFromOreDict(temp, 1);
- }
- else {
- if (outputStacks[0] != null){
- Utils.LOG_WARNING("Getting output dusts for mixer recipe. Checking ENUM, got: "+outputStacks[0].toString());
- tempOutput = outputStacks[0];
- }
- else {
- Utils.LOG_WARNING("Getting output dusts for mixer recipe. Enum check failed, failback item is: "+temp);
- tempOutput = UtilsItems.getItemStackOfAmountFromOreDict(temp, 1);
- }
- }
-
- }
-
- if (tempOutput == null){
- tempOutput = dustInfo.getDust(1);
- }
-
- if (tempOutput != null){
- if (getUnlocalizedName().contains("DustTiny")){
- Utils.LOG_WARNING("Generating a 9 Tiny dust to 1 Dust recipe for "+materialName);
- UtilsRecipe.addShapelessGregtechRecipe(tempOutput,
- tempStack, tempStack, tempStack,
- tempStack, tempStack, tempStack,
- tempStack, tempStack, tempStack);
- }
- else if (getUnlocalizedName().contains("DustSmall")){
- Utils.LOG_WARNING("Generating a 4 Small dust to 1 Dust recipe for "+materialName);
- UtilsRecipe.addShapelessGregtechRecipe(tempOutput,
- tempStack, tempStack, null,
- tempStack, tempStack, null,
- null, null, null);
- }
- else {
- Utils.LOG_WARNING("Generating a Dust recipe for "+materialName+" in the mixer.");
-
-
- int i = 0;
- if (inputStacks.length >= 2){
- for (ItemStack is : inputStacks){
- if (is != null){
- Utils.LOG_WARNING("Found "+is.getDisplayName()+" as an input for mixer recipe.");
- if (is.getDisplayName().toLowerCase().contains("tell alkalus")){
- ItemStack tempStackForAName = inputStacks[i];
- String[] inputList = UtilsItems.getArrayStackNamesAsArray(dustInfo.getMaterialComposites());
- int[] inputSizes = dustInfo.getMaterialCompositeStackSizes();
- inputStacks[i] = UtilsItems.getItemStackOfAmountFromOreDict(inputList[i], 1);
- Utils.LOG_WARNING("Swapping input slot "+i+" which contains "+tempStackForAName.getDisplayName()+" with "+inputStacks[i].getDisplayName()+".");
- }
-
- }
-
- else {
- Utils.LOG_WARNING("Input "+i+" was null.");
- }
-
- i++;
- }
- }
+ if (thisItem == normalDust){
+ Utils.LOG_WARNING("Generating a Dust recipe for "+materialName+" in the mixer.");
if (inputStacks.length != 0){
GT_Values.RA.addMixerRecipe(
inputStacks[0], inputStacks[1],
inputStacks[2], inputStacks[3],
null, null,
- tempOutput,
+ outputStacks,
8*mTier*20, 8*mTier*2);
}
else {
return;
}
-
-
-
- /*GT_Values.RA.addMixerRecipe(
- GT_Utility.copyAmount(inputStacks[0].stackSize, new Object[]{inputStacks[0]}), GT_Utility.copyAmount(inputStacks[1].stackSize, new Object[]{inputStacks[1]}),
- GT_Utility.copyAmount(inputStacks[2].stackSize, new Object[]{inputStacks[2]}), GT_Utility.copyAmount(inputStacks[3].stackSize, new Object[]{inputStacks[3]}),
- null, null,
- tempOutput,
- 8*mTier*20, 8*mTier*2);*/
-
}
}
- }
private void addMacerationRecipe(){
Utils.LOG_WARNING("Adding recipe for "+materialName+" Dusts");