diff options
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
-rw-r--r-- | src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java | 30 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java | 4 |
2 files changed, 24 insertions, 10 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java index b6a5dff2ac..eaa0905c93 100644 --- a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java +++ b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java @@ -14,22 +14,36 @@ public class BaseItemRod extends BaseItemComponent{ public BaseItemRod(final Material material) { super(material, BaseItemComponent.ComponentTypes.ROD); this.addExtruderRecipe(); + this.addLatheRecipe(); } private void addExtruderRecipe(){ Logger.WARNING("Adding cutter recipe for "+this.materialName+" Rods"); - final ItemStack stackStick = this.componentMaterial.getRod(1); final ItemStack stackBolt = this.componentMaterial.getBolt(4); - + if (ItemUtils.checkForInvalidItems(new ItemStack[] {stackStick, stackBolt})) - GT_Values.RA.addCutterRecipe( - stackStick, - stackBolt, - null, - (int) Math.max(this.componentMaterial.getMass() * 2L, 1L), - 4); + GT_Values.RA.addCutterRecipe( + stackStick, + stackBolt, + null, + (int) Math.max(this.componentMaterial.getMass() * 2L, 1L), + 4); + } + + + private void addLatheRecipe(){ + Logger.WARNING("Adding recipe for "+this.materialName+" Rod"); + ItemStack boltStack = this.componentMaterial.getIngot(1); + if (ItemUtils.checkForInvalidItems(boltStack)){ + GT_Values.RA.addLatheRecipe( + boltStack, + ItemUtils.getSimpleStack(this), + null, + (int) Math.max(this.componentMaterial.getMass() / 8L, 1L), + 4); + } } } diff --git a/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java b/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java index af74c1d535..29e525ed10 100644 --- a/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java +++ b/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java @@ -18,8 +18,8 @@ public class BaseItemScrew extends BaseItemComponent{ private void addLatheRecipe(){ Logger.WARNING("Adding recipe for "+this.materialName+" Screws"); - final ItemStack boltStack = ItemUtils.getItemStackOfAmountFromOreDict(this.unlocalName.replace("itemScrew", "bolt"), 1); - if (null != boltStack){ + ItemStack boltStack = this.componentMaterial.getBolt(1); + if (ItemUtils.checkForInvalidItems(boltStack)){ GT_Values.RA.addLatheRecipe( boltStack, ItemUtils.getSimpleStack(this), |