Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package catwalks.item;
- import net.minecraft.block.Block;
- import net.minecraft.item.ItemBlock;
- public class ItemBlockCatwalk extends ItemBlock {
- public ItemBlockCatwalk(Block block)
- {
- super(block);
- this.setMaxDamage(0);
- this.setHasSubtypes(true);
- }
- /**
- * Converts the given ItemStack damage value into a metadata value to be placed in the world when this Item is
- * placed as a Block (mostly used with ItemBlocks).
- */
- public int getMetadata(int damage)
- {
- return damage;
- }
- }
- (extends BlockExtended)
- public BlockCatwalk() {
- super(Material.iron, "catwalk", ItemBlockCatwalk.class);
- (extends BlockBase)
- public BlockExtended(Material materialIn, String name, Class<? extends ItemBlock> clazz) {
- super(materialIn, name, clazz);
- }
- public BlockBase(Material materialIn, String name, Class<? extends ItemBlock> clazz) {
- super(materialIn);
- setUnlocalizedName(name);
- setRegistryName(name);
- setCreativeTab(CatwalksMod.tab);
- if(clazz == null) {
- GameRegistry.registerBlock(this);
- } else {
- GameRegistry.registerBlock(this, clazz);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement