diff options
| author | Draknyte1 <Draknyte1@hotmail.com> | 2016-04-03 18:14:21 +1000 |
|---|---|---|
| committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-04-03 18:14:21 +1000 |
| commit | 915139115434ff5797df6f82a63578e938864016 (patch) | |
| tree | 5e8f655e8e9cc8b1af2db2ae3fdbbedfb942ec39 /src/Java/miscutil/core/item/general | |
| parent | 6e2d7b787d2338fd6e35532f91e6ff6a48eed682 (diff) | |
| download | GT5-Unofficial-915139115434ff5797df6f82a63578e938864016.tar.gz GT5-Unofficial-915139115434ff5797df6f82a63578e938864016.tar.bz2 GT5-Unofficial-915139115434ff5797df6f82a63578e938864016.zip | |
Finally, Got everything working how I want. Only thing left to do is the anti-grief block.
Fixed Buffer Cores, now there is 10 tiers, all with a unique colour and recipe.
Energy Buffers have had their recipes revised, due to new recipes for the cores.
Steam condenser may need tweaking, but for now, I'll let it slide and players test it.
Updated a few graphics too, the Staballoy Axe and Pickaxe, the Buffer Core and the New Hammer Tool all received visual updates.
Compiled build and Dev. build will be up shortly.
Diffstat (limited to 'src/Java/miscutil/core/item/general')
| -rw-r--r-- | src/Java/miscutil/core/item/general/BufferCore.java | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/src/Java/miscutil/core/item/general/BufferCore.java b/src/Java/miscutil/core/item/general/BufferCore.java new file mode 100644 index 0000000000..7d014155ba --- /dev/null +++ b/src/Java/miscutil/core/item/general/BufferCore.java @@ -0,0 +1,92 @@ +package miscutil.core.item.general; + +import java.util.List; + +import miscutil.core.item.base.BaseItemWithDamageValue; +import miscutil.core.lib.CORE; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BufferCore extends BaseItemWithDamageValue{ + + public int coreTier = 0; + + public BufferCore(String unlocalizedName, int i) { + super(unlocalizedName); + this.setTextureName(CORE.MODID + ":" + unlocalizedName); + this.setMaxStackSize(2); + this.coreTier = i; + } + + @Override + public String getItemStackDisplayName(ItemStack stack) { + return super.getItemStackDisplayName(stack)+" ["+CORE.VOLTAGES[this.coreTier-1]+"]."; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean requiresMultipleRenderPasses() + { + return true; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) { + list.add(EnumChatFormatting.GRAY+"A key crafting component for making energy buffers."); + super.addInformation(stack, aPlayer, list, bool); + } + + public final int getCoreTier() { + return coreTier; + } + + @Override + public int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF) { + //Figure Out Damage + String s = String.format("%X", HEX_OxFFFFFF); + //Utils.LOG_INFO(s); + //String rgb = Utils.hex2Rgb(s); + //Utils.LOG_INFO(rgb); + if (coreTier == 1){ + HEX_OxFFFFFF = 0x4d4d4d; + } + else if (coreTier == 2){ + HEX_OxFFFFFF = 0x666666; + } + else if (coreTier == 3){ + HEX_OxFFFFFF = 0x8c8c8c; + } + else if (coreTier == 4){ + HEX_OxFFFFFF = 0xa6a6a6; + } + else if (coreTier == 5){ + HEX_OxFFFFFF = 0xcccccc; + } + else if (coreTier == 6){ + HEX_OxFFFFFF = 0xe6e6e6; + } + else if (coreTier == 7){ + HEX_OxFFFFFF = 0xffffcc; + } + else if (coreTier == 8){ + HEX_OxFFFFFF = 0xace600; + } + else if (coreTier == 9){ + HEX_OxFFFFFF = 0xffff00; + } + else if (coreTier == 10){ + HEX_OxFFFFFF = 0xff0000; + } + else { + HEX_OxFFFFFF = 0xffffff; + } + + + return HEX_OxFFFFFF; + } + +} |
