diff options
author | Jordan Byrne <draknyte1@hotmail.com> | 2017-12-28 22:48:48 +1000 |
---|---|---|
committer | Jordan Byrne <draknyte1@hotmail.com> | 2017-12-28 22:48:48 +1000 |
commit | c197931b71219eb49c2ef637568e775a3a124ec0 (patch) | |
tree | fd24c5e52980d2f7fef36f089d7c517a58d0bc1e /src | |
parent | 38bb9a07d82a0161107084436b7390f877bfd353 (diff) | |
download | GT5-Unofficial-c197931b71219eb49c2ef637568e775a3a124ec0.tar.gz GT5-Unofficial-c197931b71219eb49c2ef637568e775a3a124ec0.tar.bz2 GT5-Unofficial-c197931b71219eb49c2ef637568e775a3a124ec0.zip |
+ Added 3 new batteries.
$ Fixed Circuits so that each one has a valid replacement type.
$ Fixed a bug some materials had invalid radiation levels.
$ Fixed crushed ore item type textures.
+ Added recipes for all crushed ore items.
+ Added processing recipes for all crushed ore items.
Diffstat (limited to 'src')
-rw-r--r-- | src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java | 78 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/material/Material.java | 32 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java | 31 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/util/item/ItemUtils.java | 13 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java | 4 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java | 15 | ||||
-rw-r--r-- | src/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png | bin | 0 -> 1319 bytes | |||
-rw-r--r-- | src/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png | bin | 0 -> 1319 bytes | |||
-rw-r--r-- | src/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png | bin | 0 -> 1328 bytes |
9 files changed, 130 insertions, 43 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java index 7812b14e1d..732c59c9a9 100644 --- a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java +++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java @@ -6,6 +6,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; @@ -43,33 +44,22 @@ public class BaseOreComponent extends Item{ this.setCreativeTab(AddToCreativeTab.tabMisc); this.setUnlocalizedName(this.unlocalName); this.setMaxStackSize(64); - this.setTextureName(this.getCorrectTextures()); + //this.setTextureName(this.getCorrectTextures()); this.componentColour = material.getRgbAsHex(); GameRegistry.registerItem(this, this.unlocalName); - GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); + GT_OreDictUnificator.registerOre(componentType.getComponent()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); } public String getCorrectTextures(){ if (!CORE.ConfigSwitches.useGregtechTextures){ return CORE.MODID + ":" + "item"+this.componentType.COMPONENT_NAME; } - - /*if (this.componentType == ComponentTypes.GEAR){ - return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGt"; - } - else if (this.componentType == ComponentTypes.SMALLGEAR){ - return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGtSmall"; - }*/ - return "gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME; } @Override public String getItemStackDisplayName(final ItemStack p_77653_1_) { - if (this.componentMaterial != null) { - return (this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME); - } - return this.materialName+" Cell"; + return (this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME); } public final String getMaterialName() { @@ -88,21 +78,13 @@ public class BaseOreComponent extends Item{ } if (this.componentMaterial.isRadioactive){ - list.add(CORE.GT_Tooltip_Radioactive); + list.add(CORE.GT_Tooltip_Radioactive+" | Level: "+this.componentMaterial.vRadiationLevel); } } - } - super.addInformation(stack, aPlayer, list, bool); } - - @Override - public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { - return this.componentColour; - } - @Override public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { if (this.componentMaterial != null){ @@ -135,9 +117,11 @@ public class BaseOreComponent extends Item{ @SideOnly(Side.CLIENT) public void registerIcons(final IIconRegister par1IconRegister){ if (CORE.ConfigSwitches.useGregtechTextures){ - this.base = par1IconRegister.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "cell"); + Logger.MATERIALS(this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME+" is using `"+"gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"' as the layer 0 texture path."); + this.base = par1IconRegister.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME); if (this.componentType.hasOverlay()){ - this.overlay = par1IconRegister.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "cell_OVERLAY"); + Logger.MATERIALS(this.componentType.getPrefix()+this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME+" is using `"+"gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"_OVERLAY"+"' as the layer 1 texture path."); + this.overlay = par1IconRegister.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME+"_OVERLAY"); } } else { @@ -148,28 +132,45 @@ public class BaseOreComponent extends Item{ } } + @Override + public int getColorFromItemStack(final ItemStack stack, final int renderPass) { + if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){ + return this.componentColour; + } + if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){ + return Utils.rgbtoHexValue(230, 230, 230); + } + return this.componentColour; + } + + + @Override + public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { + if(pass == 0) { + return this.base; + } + return this.overlay; + } public static enum ComponentTypes { - DUST("dust", "", " Dust", "dust", true), - DUSTIMPURE("dustImpure", "Impure ", " Dust", "dustImpure", true), - DUSTPURE("dustPure", "Purified ", " Dust", "dustPure", true), - CRUSHED("crushed", "Crushed ", " Ore", "crushed", true), - CRUSHEDCENTRIFUGED("crushedCentrifuged", "Centrifuged "," Ore", "crushedCentrifuged", true), - CRUSHEDPURIFIED("crushedPurified", "Purified", " Ore", "crushedPurified", true); + DUST("dust", "", " Dust", true), + DUSTIMPURE("dustImpure", "Impure ", " Dust", true), + DUSTPURE("dustPure", "Purified ", " Dust", true), + CRUSHED("crushed", "Crushed ", " Ore", true), + CRUSHEDCENTRIFUGED("crushedCentrifuged", "Centrifuged Crushed "," Ore", true), + CRUSHEDPURIFIED("crushedPurified", "Purified Crushed ", " Ore", true); private String COMPONENT_NAME; private String PREFIX; private String DISPLAY_NAME; - private String OREDICT_NAME; private boolean HAS_OVERLAY; - private ComponentTypes (final String LocalName, final String prefix, final String DisplayName, final String OreDictName, final boolean overlay){ + private ComponentTypes (final String LocalName, final String prefix, final String DisplayName, final boolean overlay){ this.COMPONENT_NAME = LocalName; this.PREFIX = prefix; this.DISPLAY_NAME = DisplayName; - this.OREDICT_NAME = OreDictName; this.HAS_OVERLAY = overlay; // dust + Dirty, Impure, Pure, Refined // crushed + centrifuged, purified @@ -183,14 +184,13 @@ public class BaseOreComponent extends Item{ return this.DISPLAY_NAME; } - public String getOreDictName(){ - return this.OREDICT_NAME; - } - public boolean hasOverlay(){ return this.HAS_OVERLAY; } - + + public String getPrefix(){ + return this.PREFIX; + } } } diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index 1ebd335031..796d48b967 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -68,7 +68,7 @@ public class Material { this (materialName, defaultState, 0, rgba, -1, -1, -1, -1, false, "", radiationLevel, false, materialStacks); } - public Material(String materialName, MaterialState defaultState, short[] rgba, int radiationLevel, int j, int k, int l, int m, MaterialStack[] materialStacks){ + public Material(String materialName, MaterialState defaultState, short[] rgba, int j, int k, int l, int m, int radiationLevel, MaterialStack[] materialStacks){ this (materialName, defaultState, 0, rgba, j, k, l, m, false, "", radiationLevel, false, materialStacks); } @@ -219,13 +219,15 @@ public class Material { } //Sets the Rad level - if (radiationLevel != 0){ + if (radiationLevel > 0){ + Logger.MATERIALS(this.getLocalizedName()+" is radioactive. Level: "+radiationLevel+"."); this.isRadioactive = true; this.vRadiationLevel = (byte) radiationLevel; } else { + Logger.MATERIALS(this.getLocalizedName()+" is not radioactive."); this.isRadioactive = false; - this.vRadiationLevel = (byte) radiationLevel; + this.vRadiationLevel = 0; } //Sets the materials 'tier'. Will probably replace this logic. @@ -457,6 +459,30 @@ public class Material { public final ItemStack getNugget(final int stacksize){ return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nugget"+this.unlocalizedName, stacksize); } + + /** + * Ore Components + * @return + */ + + public final ItemStack getOre(final int stacksize){ + return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("block"+this.unlocalizedName+"Ore", stacksize); + } + public final ItemStack getCrushed(final int stacksize){ + return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("crushed"+this.unlocalizedName, stacksize); + } + public final ItemStack getCrushedPurified(final int stacksize){ + return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("crushedPurified"+this.unlocalizedName, stacksize); + } + public final ItemStack getCrushedCentrifuged(final int stacksize){ + return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("crushedCentrifuged"+this.unlocalizedName, stacksize); + } + public final ItemStack getDustPurified(final int stacksize){ + return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustPure"+this.unlocalizedName, stacksize); + } + public final ItemStack getDustImpure(final int stacksize){ + return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustImpure"+this.unlocalizedName, stacksize); + } final public ItemStack[] getMaterialComposites(){ if (this.vMaterialInput != null){ diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java index e421fd2601..e8d37a34d2 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java @@ -114,6 +114,37 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator { ItemList.Circuit_Elite.set(GregtechItemList.Old_Circuit_Elite.get(1)); ItemList.Circuit_Master.set(GregtechItemList.Old_Circuit_Master.get(1)); ItemList.Circuit_Ultimate.set(GregtechItemList.Old_Circuit_Ultimate.get(1)); + + /** + * Try Set New circuits to have old replacements + */ + + //Basic + ItemList.Circuit_Microprocessor.set(GregtechItemList.Old_Circuit_Basic.get(1)); + //Good + ItemList.Circuit_Integrated.set(GregtechItemList.Old_Circuit_Good.get(1)); + //Advanced + ItemList.Circuit_Nanoprocessor.set(GregtechItemList.Old_Circuit_Advanced.get(1)); + //Data + ItemList.Circuit_Quantumprocessor.set(GregtechItemList.Old_Circuit_Data.get(1)); + ItemList.Circuit_Nanocomputer.set(GregtechItemList.Old_Circuit_Data.get(1)); + //Elite + ItemList.Circuit_Crystalprocessor.set(GregtechItemList.Old_Circuit_Elite.get(1)); + ItemList.Circuit_Quantumcomputer.set(GregtechItemList.Old_Circuit_Elite.get(1)); + ItemList.Circuit_Elitenanocomputer.set(GregtechItemList.Old_Circuit_Elite.get(1)); + //Master + ItemList.Circuit_Neuroprocessor.set(GregtechItemList.Old_Circuit_Master.get(1)); + ItemList.Circuit_Masterquantumcomputer.set(GregtechItemList.Old_Circuit_Master.get(1)); + //Ultimate + ItemList.Circuit_Wetwarecomputer.set(GregtechItemList.Old_Circuit_Ultimate.get(1)); + ItemList.Circuit_Ultimatecrystalcomputer.set(GregtechItemList.Old_Circuit_Ultimate.get(1)); + ItemList.Circuit_Quantummainframe.set(GregtechItemList.Old_Circuit_Ultimate.get(1)); + //Superconductor + ItemList.Circuit_Wetwaresupercomputer.set(GregtechItemList.Circuit_IV.get(1)); + ItemList.Circuit_Crystalmainframe.set(GregtechItemList.Circuit_IV.get(1)); + //Infinite + ItemList.Circuit_Wetwaremainframe.set(GregtechItemList.Circuit_LuV.get(1)); + //set data orbs and sticks to their new replacements ItemList.Tool_DataStick.set(GregtechItemList.Old_Tool_DataStick.get(1)); diff --git a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java index 098cb3e953..be75de893a 100644 --- a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java +++ b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java @@ -690,6 +690,19 @@ public class ItemUtils { //Utils.LOG_INFO("[Component Maker] Found "+mItemName+"."); return (gregstack); } + + + public static ItemStack getOrePrefixStack(OrePrefixes mPrefix, Material mMat, int mAmount) { + + String mName = Utils.sanitizeString(mMat.getLocalizedName()); + + String mItemName = mPrefix.name()+mName; + ItemStack gregstack = ItemUtils.getItemStackOfAmountFromOreDict(mItemName, mAmount); + if (gregstack == null){ + return null; + } + return (gregstack); + } public static ItemStack[] getStackOfAllOreDictGroup(String oredictname){ final ArrayList<ItemStack> oreDictList = OreDictionary.getOres(oredictname); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 233b175ba7..898565352b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -276,7 +276,9 @@ public enum GregtechItemList implements GregtechItemContainer { Machine_EV_Component_Maker, Machine_IV_Component_Maker, //Tesla Tower - TelsaTower, + TelsaTower, + + Battery_Gem_1, Battery_Gem_2, Battery_Gem_3, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index 78d9a5867d..eb17de8d37 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -171,6 +171,21 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { GregtechItemList.Battery_RE_EV_Lithium.set(this.addItem(tLastID = 54, "Quad Cell Lithium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 3L), getTcAspectStack(TC_Aspects.METALLUM, 3L), getTcAspectStack(TC_Aspects.POTENTIA, 3L)})); this.setElectricStats(32000 + tLastID, 6400000L, GT_Values.V[4], 4L, -3L, true); + /** + * Power Gems + */ + + GregtechItemList.Battery_Gem_1.set(this.addItem(tLastID = 66, "Fission Power Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 24L), getTcAspectStack(TC_Aspects.POTENTIA, 16L)})); + this.setElectricStats(32000 + tLastID, 32000000L, GT_Values.V[5], 5L, -3L, false); + GregtechItemList.Battery_Gem_2.set(this.addItem(tLastID = 68, "Fusion Power Cell", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.METALLUM, 32L), getTcAspectStack(TC_Aspects.POTENTIA, 32L)})); + this.setElectricStats(32000 + tLastID, 750000000L, GT_Values.V[6], 6L, -3L, false); + GregtechItemList.Battery_Gem_3.set(this.addItem(tLastID = 70, "Portable Neutron Star", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 32L), getTcAspectStack(TC_Aspects.METALLUM, 48L), getTcAspectStack(TC_Aspects.POTENTIA, 64L)})); + this.setElectricStats(32000 + tLastID, 64000000000L, GT_Values.V[7], 7L, -3L, false); + //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_1.get(1), "batteryFutureBasic"); + //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_2.get(1), "batteryFutureGood"); + //ItemUtils.addItemToOreDictionary(GregtechItemList.Battery_Gem_3.get(1), "batteryFutureAdvanced"); + + /*GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Acid Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)})); setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true); diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png Binary files differnew file mode 100644 index 0000000000..a5630cf75d --- /dev/null +++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/66.png diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png Binary files differnew file mode 100644 index 0000000000..85512eb0f1 --- /dev/null +++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/68.png diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png Binary files differnew file mode 100644 index 0000000000..1f3dbfa367 --- /dev/null +++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/70.png |