aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/item/base
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-11-26 20:55:02 +1000
committerAlkalus <draknyte1@hotmail.com>2017-11-26 20:55:02 +1000
commit9e4dcc750d9aa3c37d278aec7404a9ded134f0b6 (patch)
tree410c95eb0d9e7b6a37917ac2bb248efd634d704c /src/Java/gtPlusPlus/core/item/base
parentf30d9f3ad55ae18cec5e86cc6a7b0124847b9a1f (diff)
downloadGT5-Unofficial-9e4dcc750d9aa3c37d278aec7404a9ded134f0b6.tar.gz
GT5-Unofficial-9e4dcc750d9aa3c37d278aec7404a9ded134f0b6.tar.bz2
GT5-Unofficial-9e4dcc750d9aa3c37d278aec7404a9ded134f0b6.zip
+ Added Xp Converter crafting recipe.
+ Added compressed obsidian. + Added inverted obsidian. + Added crafting & uncrafting recipes for the compressed & inverted obsidian. % Formatting.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item/base')
-rw-r--r--src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java
new file mode 100644
index 0000000000..9cf3f796df
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockMeta.java
@@ -0,0 +1,44 @@
+package gtPlusPlus.core.item.base.itemblock;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemBlockWithMetadata;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
+public class ItemBlockMeta extends ItemBlockWithMetadata
+{
+ private final Block mBlock;
+
+ public ItemBlockMeta(final Block p_i45326_1_)
+ {
+ super(p_i45326_1_, p_i45326_1_);
+ this.mBlock = p_i45326_1_;
+ this.setMaxDamage(0);
+ this.setHasSubtypes(true);
+ }
+
+ /**
+ * Gets an icon index based on an item's damage value
+ */
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIconFromDamage(final int p_77617_1_)
+ {
+ return this.mBlock.getIcon(2, p_77617_1_);
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ @Override
+ public int getMetadata(final int p_77647_1_)
+ {
+ return p_77647_1_;
+ }
+
+ @Override
+ public String getUnlocalizedName(final ItemStack stack) {
+ return this.getUnlocalizedName() + "." + stack.getItemDamage();
+ }
+} \ No newline at end of file