diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-10-25 23:47:58 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-10-25 23:47:58 +1000 |
commit | f2a89339d7f6f875d34d4a7bb1868a1d4a3cf644 (patch) | |
tree | 114d97fb80a7a6310ea0a6f77030607f83bed627 /src/Java/gtPlusPlus/core/item/base | |
parent | e5e1581403e9f6e9d76e362c5e4861b4258af7cc (diff) | |
download | GT5-Unofficial-f2a89339d7f6f875d34d4a7bb1868a1d4a3cf644.tar.gz GT5-Unofficial-f2a89339d7f6f875d34d4a7bb1868a1d4a3cf644.tar.bz2 GT5-Unofficial-f2a89339d7f6f875d34d4a7bb1868a1d4a3cf644.zip |
+ Tried improving the handling of Blast Smelting.
+ Tried adding shapeless dust recipes for all of my alloys. (The shapeless recipe system is dumb)
+ Added a custom GUI for NEI recipes for the Blast Smelter.
% Refactored some Utils classes.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item/base')
12 files changed, 36 insertions, 36 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemBackpack.java b/src/Java/gtPlusPlus/core/item/base/BaseItemBackpack.java index 316f922639..391f7bb986 100644 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemBackpack.java +++ b/src/Java/gtPlusPlus/core/item/base/BaseItemBackpack.java @@ -5,7 +5,7 @@ import gtPlusPlus.GTplusplus; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.handler.GuiHandler; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -28,7 +28,7 @@ public class BaseItemBackpack extends Item{ this.setTextureName(CORE.MODID + ":" + "itemBackpack"); this.colourValue = colour; GameRegistry.registerItem(this, unlocalizedName); - GT_OreDictUnificator.registerOre("storageBackpack", UtilsItems.getSimpleStack(this)); + GT_OreDictUnificator.registerOre("storageBackpack", ItemUtils.getSimpleStack(this)); setMaxStackSize(1); setCreativeTab(AddToCreativeTab.tabOther); } diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java index 7ee08cabee..2d4344ce5a 100644 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -5,7 +5,7 @@ import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.entity.EntityUtils; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import java.util.List; @@ -34,7 +34,7 @@ public class BaseItemComponent extends Item{ this.setMaxStackSize(64); this.setTextureName(CORE.MODID + ":" + "item"+componentType.COMPONENT_NAME); GameRegistry.registerItem(this, unlocalName); - GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), UtilsItems.getSimpleStack(this)); + GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); } @Override diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java index f199f87f68..69d5363240 100644 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java +++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java @@ -8,7 +8,7 @@ import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.entity.EntityUtils; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; import java.util.List; @@ -70,7 +70,7 @@ public class BaseItemDust extends Item{ } if (temp != null && temp != ""){ oredictName = temp; - GT_OreDictUnificator.registerOre(temp, UtilsItems.getSimpleStack(this)); + GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); } addFurnaceRecipe(); addMacerationRecipe(); @@ -157,8 +157,8 @@ public class BaseItemDust extends Item{ Utils.LOG_WARNING("Generating OreDict Name: "+tempIngot); ItemStack[] outputStacks = {dustInfo.getDust(1)}; if (tempIngot != null && tempIngot != ""){ - tempInputStack = UtilsItems.getItemStackOfAmountFromOreDict(tempIngot, 1); - tempOutputStack = UtilsItems.getItemStackOfAmountFromOreDict(tempDust, 1); + tempInputStack = ItemUtils.getItemStackOfAmountFromOreDict(tempIngot, 1); + tempOutputStack = ItemUtils.getItemStackOfAmountFromOreDict(tempDust, 1); ItemStack tempStackOutput2 = null; int chance = mTier*10/MathUtils.randInt(10, 20); if (outputStacks.length != 0){ @@ -202,19 +202,19 @@ public class BaseItemDust extends Item{ if (dustInfo.requiresBlastFurnace()){ Utils.LOG_WARNING("Adding recipe for Hot "+materialName+" Ingots in a Blast furnace."); String tempIngot = temp.replace("ingot", "ingotHot"); - ItemStack tempOutputStack = UtilsItems.getItemStackOfAmountFromOreDict(tempIngot, 1); + ItemStack tempOutputStack = ItemUtils.getItemStackOfAmountFromOreDict(tempIngot, 1); Utils.LOG_WARNING("This will produce "+tempOutputStack.getDisplayName() + " Debug: "+tempIngot); if (null != tempOutputStack){ - addBlastFurnaceRecipe(UtilsItems.getSimpleStack(this), null, tempOutputStack, null, 350*mTier); + addBlastFurnaceRecipe(ItemUtils.getSimpleStack(this), null, tempOutputStack, null, 350*mTier); } return; } Utils.LOG_WARNING("Adding recipe for "+materialName+" Ingots in a furnace."); - ItemStack tempOutputStack = UtilsItems.getItemStackOfAmountFromOreDict(temp, 1); + ItemStack tempOutputStack = ItemUtils.getItemStackOfAmountFromOreDict(temp, 1); Utils.LOG_WARNING("This will produce an ingot of "+tempOutputStack.getDisplayName() + " Debug: "+temp); if (null != tempOutputStack){ if (mTier < 5 || !dustInfo.requiresBlastFurnace()){ - if (CORE.GT_Recipe.addSmeltingAndAlloySmeltingRecipe(UtilsItems.getSimpleStack(this), tempOutputStack)){ + if (CORE.GT_Recipe.addSmeltingAndAlloySmeltingRecipe(ItemUtils.getSimpleStack(this), tempOutputStack)){ Utils.LOG_WARNING("Successfully added a furnace recipe for "+materialName); } else { @@ -225,7 +225,7 @@ public class BaseItemDust extends Item{ Utils.LOG_WARNING("Adding recipe for "+materialName+" Ingots in a Blast furnace."); Utils.LOG_WARNING("This will produce "+tempOutputStack.getDisplayName()); if (null != tempOutputStack){ - addBlastFurnaceRecipe(UtilsItems.getSimpleStack(this), null, tempOutputStack, null, 350*mTier); + addBlastFurnaceRecipe(ItemUtils.getSimpleStack(this), null, tempOutputStack, null, 350*mTier); } return; } diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java index 77e0b7324b..d5dd78a49b 100644 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java +++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java @@ -5,7 +5,7 @@ import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.entity.EntityUtils; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; import java.util.List; @@ -36,7 +36,7 @@ public class BaseItemDustUnique extends Item{ this.setCreativeTab(tabMisc); this.colour = colour; this.materialName = materialName; - this.sRadiation = UtilsItems.getRadioactivityLevel(materialName); + this.sRadiation = ItemUtils.getRadioactivityLevel(materialName); GameRegistry.registerItem(this, unlocalizedName); String temp = ""; @@ -61,7 +61,7 @@ public class BaseItemDustUnique extends Item{ Utils.LOG_WARNING("Generating OreDict Name: "+temp); } if (temp != null && temp != ""){ - GT_OreDictUnificator.registerOre(temp, UtilsItems.getSimpleStack(this)); + GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); } } diff --git a/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java b/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java index aaad22be9c..92b8c8c224 100644 --- a/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java +++ b/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java @@ -1,7 +1,7 @@ package gtPlusPlus.core.item.base.foods; import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; import java.util.List; @@ -42,7 +42,7 @@ public class BaseItemHotFood extends BaseItemFood{ if(iStack.getItemDamage() == cooldownTime) { if (entityHolding instanceof EntityPlayer){ Utils.LOG_INFO("Foods Done."); - ((EntityPlayer) entityHolding).inventory.addItemStackToInventory(UtilsItems.getSimpleStack(output)); + ((EntityPlayer) entityHolding).inventory.addItemStackToInventory(ItemUtils.getSimpleStack(output)); ((EntityPlayer) entityHolding).inventory.consumeInventoryItem(this); } }else if(iStack.getItemDamage() < cooldownTime){ diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java index d58522756f..9a0ef0d097 100644 --- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java +++ b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java @@ -6,7 +6,7 @@ import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.entity.EntityUtils; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; import java.util.List; @@ -45,7 +45,7 @@ public class BaseItemIngot extends Item{ temp = unlocalName.replace("itemHotIngot", "ingotHot"); } if (temp != null && temp != ""){ - GT_OreDictUnificator.registerOre(temp, UtilsItems.getSimpleStack(this)); + GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this)); } generateCompressorRecipe(); } @@ -85,7 +85,7 @@ public class BaseItemIngot extends Item{ private void generateCompressorRecipe(){ if (unlocalName.contains("itemIngot")){ - ItemStack tempStack = UtilsItems.getSimpleStack(this, 9); + ItemStack tempStack = ItemUtils.getSimpleStack(this, 9); ItemStack tempOutput = null; String temp = getUnlocalizedName().replace("item.itemIngot", "block"); Utils.LOG_WARNING("Unlocalized name for OreDict nameGen: "+getUnlocalizedName()); @@ -96,7 +96,7 @@ public class BaseItemIngot extends Item{ temp = temp.replace("itemIngot", "block"); Utils.LOG_WARNING("Generating OreDict Name: "+temp); if (temp != null && temp != ""){ - tempOutput = UtilsItems.getItemStackOfAmountFromOreDict(temp, 1); + tempOutput = ItemUtils.getItemStackOfAmountFromOreDict(temp, 1); if (tempOutput != null){ GT_ModHandler.addCompressionRecipe(tempStack, tempOutput); } diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java index 6fa358f36f..6b60e7f8d3 100644 --- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java +++ b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java @@ -3,7 +3,7 @@ package gtPlusPlus.core.item.base.ingots; import gregtech.api.enums.GT_Values; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import java.util.List; @@ -50,7 +50,7 @@ public class BaseItemIngotHot extends BaseItemIngot{ private void generateRecipe(){ Utils.LOG_WARNING("Adding Vacuum Freezer recipe for a Hot Ingot of "+materialName+"."); - GT_Values.RA.addVacuumFreezerRecipe(UtilsItems.getSimpleStack(this), outputIngot.copy(), 60*mTier); + GT_Values.RA.addVacuumFreezerRecipe(ItemUtils.getSimpleStack(this), outputIngot.copy(), 60*mTier); } diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockFluid.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockFluid.java index 77af69f809..8d3871187a 100644 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockFluid.java +++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockFluid.java @@ -3,7 +3,7 @@ package gtPlusPlus.core.item.base.itemblock; import gtPlusPlus.core.fluids.BlockFluidBase; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; import java.util.List; @@ -26,7 +26,7 @@ public class ItemBlockFluid extends ItemBlock{ this.baseBlock = (BlockFluidBase) block; this.blockColour = baseBlock.getRenderColor(1); this.thisFluid = baseBlock.getFluidMaterial(); - this.sRadiation=UtilsItems.getRadioactivityLevel(baseBlock.getUnlocalizedName()); + this.sRadiation=ItemUtils.getRadioactivityLevel(baseBlock.getUnlocalizedName()); this.name = baseBlock.getLocalizedName().replace("tile", "").replace("fluid", "").replace("name", "").replace("block", "").replace(".", ""); //GT_OreDictUnificator.registerOre("frameGt"+block.getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), UtilsItems.getSimpleStack(this)); } diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java index cd89b027d0..8bf5346084 100644 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java +++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtBlock.java @@ -4,7 +4,7 @@ import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.core.block.base.BlockBaseModular; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.entity.EntityUtils; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import java.util.List; @@ -30,7 +30,7 @@ public class ItemBlockGtBlock extends ItemBlock{ else { sRadiation = 0; } - GT_OreDictUnificator.registerOre("block"+block.getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "").replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), UtilsItems.getSimpleStack(this)); + GT_OreDictUnificator.registerOre("block"+block.getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "").replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), ItemUtils.getSimpleStack(this)); } public int getRenderColor(int aMeta) { diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java index b4628f12ab..9d442e3102 100644 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java +++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockGtFrameBox.java @@ -2,7 +2,7 @@ package gtPlusPlus.core.item.base.itemblock; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.core.block.base.BlockBaseModular; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; @@ -14,7 +14,7 @@ public class ItemBlockGtFrameBox extends ItemBlock{ super(block); BlockBaseModular baseBlock = (BlockBaseModular) block; this.blockColour = baseBlock.getRenderColor(1); - GT_OreDictUnificator.registerOre("frameGt"+block.getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), UtilsItems.getSimpleStack(this)); + GT_OreDictUnificator.registerOre("frameGt"+block.getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), ItemUtils.getSimpleStack(this)); } public int getRenderColor(int aMeta) { diff --git a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java index 4c1d36f945..882dc8b2bf 100644 --- a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java +++ b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java @@ -4,7 +4,7 @@ import gregtech.api.enums.GT_Values; import gtPlusPlus.core.item.base.BaseItemComponent; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import net.minecraft.item.ItemStack; public class BaseItemRodLong extends BaseItemComponent{ @@ -24,8 +24,8 @@ public class BaseItemRodLong extends BaseItemComponent{ String tempStick = unlocalName.replace("itemRodLong", "stick"); String tempStickLong = unlocalName.replace("itemRodLong", "stickLong"); - ItemStack stackStick = UtilsItems.getItemStackOfAmountFromOreDict(tempStick, 1); - ItemStack stackLong = UtilsItems.getItemStackOfAmountFromOreDict(tempStickLong, 1); + ItemStack stackStick = ItemUtils.getItemStackOfAmountFromOreDict(tempStick, 1); + ItemStack stackLong = ItemUtils.getItemStackOfAmountFromOreDict(tempStickLong, 1); ItemStack temp = stackStick; temp.stackSize = 2; diff --git a/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java b/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java index 212dcd0fc1..93aa5b7526 100644 --- a/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java +++ b/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java @@ -4,7 +4,7 @@ import gregtech.api.enums.GT_Values; import gtPlusPlus.core.item.base.BaseItemComponent; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.item.UtilsItems; +import gtPlusPlus.core.util.item.ItemUtils; import net.minecraft.item.ItemStack; public class BaseItemScrew extends BaseItemComponent{ @@ -16,11 +16,11 @@ public class BaseItemScrew extends BaseItemComponent{ private void addLatheRecipe(){ Utils.LOG_WARNING("Adding recipe for "+materialName+" Screws"); - ItemStack boltStack = UtilsItems.getItemStackOfAmountFromOreDict(unlocalName.replace("itemScrew", "bolt"), 1); + ItemStack boltStack = ItemUtils.getItemStackOfAmountFromOreDict(unlocalName.replace("itemScrew", "bolt"), 1); if (null != boltStack){ GT_Values.RA.addLatheRecipe( boltStack, - UtilsItems.getSimpleStack(this), + ItemUtils.getSimpleStack(this), null, (int) Math.max(componentMaterial.getMass() / 8L, 1L), 4); |