mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
Initial test of Gradle (not working yet)
This commit is contained in:
1 parent
e8b7378831
commit
cb87c836c8
519 files changed
+351
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class GlassPaneItem extends ItemBlock
|
||||
{
|
||||
public static final String blockType[] = { "glass.pure", "glass.soul", "glass.soul.pure" };
|
||||
|
||||
public GlassPaneItem(int id)
|
||||
{
|
||||
super(id);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public int getMetadata (int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
public String getUnlocalizedName (ItemStack itemstack)
|
||||
{
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
|
||||
return (new StringBuilder()).append("block.").append(blockType[pos]).append(".pane").toString();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user