From f8cf6af92b23fb595c6f9410bf95e7c7d6be981d Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Fri, 9 Mar 2018 03:30:58 +1000 Subject: $ Fixed compile issue. $ Fixed Spelling issue on throwable potion. --- src/Java/gtPlusPlus/core/item/ModItems.java | 4 +- .../core/item/general/ItemHalfCompleteCasings.java | 63 +++++++++++++++++++ .../general/chassis/ItemHalfCompleteCasings.java | 72 ---------------------- 3 files changed, 65 insertions(+), 74 deletions(-) create mode 100644 src/Java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java delete mode 100644 src/Java/gtPlusPlus/core/item/general/chassis/ItemHalfCompleteCasings.java (limited to 'src/Java/gtPlusPlus/core/item') diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index 788dfde18d..35b5f9597c 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -325,8 +325,8 @@ public final class ModItems { itemBlueprintBase = new ItemBlueprint("itemBlueprint"); itemGemShards = new ItemGemShards("itemGemShards", "Gem Shards", AddToCreativeTab.tabMisc, 32, 0, "They glitter in the light", EnumRarity.rare, EnumChatFormatting.GRAY, false, Utils.rgbtoHexValue(182, 114, 18)).setTextureName(CORE.MODID + ":itemHeliumBlob"); - itemHalfCompleteCasings = new ItemHalfCompleteCasings("itemHalfCompleteCasings", "Half Complete Casing", AddToCreativeTab.tabMisc, 32, 0, "This isn't quite finished yet.", EnumRarity.common, EnumChatFormatting.GRAY, false, Utils.rgbtoHexValue(255, 255, 255)).setTextureName("gregtech" + ":" + "gt.metaitem.01/" + "761"); - itemSulfuricPotion = new ItemSulfuricAcidPotion("itemSulfuricPotion", "Thowable Vial of Sulfuric Acid", "Burn your foes alive!").setTextureName(CORE.MODID + ":itemSulfuricAcidPotion"); + itemHalfCompleteCasings = new ItemHalfCompleteCasings("itemHalfCompleteCasings", AddToCreativeTab.tabMisc, 32, 0, "This isn't quite finished yet.", EnumRarity.common, EnumChatFormatting.GRAY, false, Utils.rgbtoHexValue(255, 255, 255)).setTextureName("gregtech" + ":" + "gt.metaitem.01/" + "761"); + itemSulfuricPotion = new ItemSulfuricAcidPotion("itemSulfuricPotion", "Throwable Vial of Sulfuric Acid", "Burn your foes alive!").setTextureName(CORE.MODID + ":itemSulfuricAcidPotion"); itemHydrofluoricPotion = new ItemHydrofluoricAcidPotion("itemHydrofluoricPotion", "Thowable Vial of Hydrofluoric Acid", "They won't see this coming, nor anything after!").setTextureName(CORE.MODID + ":itemPotion"); //Start meta Item Generation ItemsFoods.load(); diff --git a/src/Java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java b/src/Java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java new file mode 100644 index 0000000000..ad9abc8ab2 --- /dev/null +++ b/src/Java/gtPlusPlus/core/item/general/ItemHalfCompleteCasings.java @@ -0,0 +1,63 @@ +package gtPlusPlus.core.item.general; + +import java.util.List; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import gtPlusPlus.core.item.base.BaseItemColourable; +import gtPlusPlus.core.util.Utils; + +public class ItemHalfCompleteCasings extends BaseItemColourable{ + + public ItemHalfCompleteCasings(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, + String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) { + super(unlocalizedName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb); + } + + @Override + public void getSubItems(Item item, CreativeTabs tab, List list) { + for (int i = 0; i < 4; i ++) { + list.add(new ItemStack(item, 1, i)); + } + } + + @Override + public String getItemStackDisplayName(final ItemStack tItem) { + String prefix = super.getItemStackDisplayName(tItem); + String casingType = ""; + if (tItem.getItemDamage() == 0){ + casingType = " I"; + } + else if (tItem.getItemDamage() == 1){ + casingType = " II"; + } + else if (tItem.getItemDamage() == 2){ + casingType = " III"; + } + else if (tItem.getItemDamage() == 3){ + casingType = " IV"; + } + return (prefix+casingType); + } + + @Override + public int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF) { + if (this.getDamage(stack)==0){ + return Utils.rgbtoHexValue(52, 52, 52); + } + else if (this.getDamage(stack)==1){ + return Utils.rgbtoHexValue(80, 90, 222); + } + else if (this.getDamage(stack)==2){ + return Utils.rgbtoHexValue(182, 77, 177); + } + else { + return Utils.rgbtoHexValue(77, 175, 182); + } + } + +} diff --git a/src/Java/gtPlusPlus/core/item/general/chassis/ItemHalfCompleteCasings.java b/src/Java/gtPlusPlus/core/item/general/chassis/ItemHalfCompleteCasings.java deleted file mode 100644 index 0501f616c9..0000000000 --- a/src/Java/gtPlusPlus/core/item/general/chassis/ItemHalfCompleteCasings.java +++ /dev/null @@ -1,72 +0,0 @@ -package gtPlusPlus.core.item.general.chassis; - -import java.util.List; - -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import gtPlusPlus.core.item.base.BaseItemColourable; -import gtPlusPlus.core.util.Utils; - -public class ItemHalfCompleteCasings extends BaseItemColourable{ - - public ItemHalfCompleteCasings(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, - String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) { - super(unlocalizedName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb); - } - - public ItemHalfCompleteCasings(String unlocalizedName, String displayName, CreativeTabs creativeTab, int stackSize, - int maxDmg, String description, EnumRarity regRarity, EnumChatFormatting colour, boolean Effect, int rgb) { - super(unlocalizedName, displayName, creativeTab, stackSize, maxDmg, description, regRarity, colour, Effect, rgb); - } - - @Override - public void getSubItems(Item item, CreativeTabs tab, List list) { - for (int i = 0; i < 4; i ++) { - list.add(new ItemStack(item, 1, i)); - } - } - - @Override - public String getItemStackDisplayName(final ItemStack tItem) { - String prefix = super.getItemStackDisplayName(tItem); - String casingType = ""; - if (tItem.getItemDamage() == 0){ - casingType = " I"; - } - else if (tItem.getItemDamage() == 1){ - casingType = " II"; - } - else if (tItem.getItemDamage() == 2){ - casingType = " III"; - } - else if (tItem.getItemDamage() == 3){ - casingType = " IV"; - } - return (prefix+casingType); - } - - @Override - public int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF) { - if (this.getDamage(stack)==0){ - return Utils.rgbtoHexValue(52, 52, 52); - } - else if (this.getDamage(stack)==1){ - return Utils.rgbtoHexValue(80, 90, 222); - } - else if (this.getDamage(stack)==2){ - return Utils.rgbtoHexValue(182, 77, 177); - } - else { - return Utils.rgbtoHexValue(77, 175, 182); - } - } - - - - - -} -- cgit