Hi,
Im new to making mods and i'm making progress in creating my own mod. There is one thing which I can't figure out though.
How to make half slabs.
I got this piece of code from the minecraftforums, but i dont know how to register it and if it even works.
package com.additionalblocks.main;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSlab;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSlab;
import com.additionalblocks.main.*;
public class blockSlab extends ItemSlab {
public blockSlab(Block block) {
super(block, (BlockSlab) AdditionalBlocks.blockHalfboneslab,(BlockSlab) AdditionalBlocks.blockDoubleboneslab, false);
this.setMaxDamage(0);
this.setHasSubtypes(true);
}
}
I got this in de main class:
blockHalfboneslab = new blockSlab(blockHalfboneslab);
blockDoubleboneslab = new blockSlab(blockDoubleboneslab);
GameRegistry.registerBlock(blockHalfboneslab, "blockHalfboneslab");
GameRegistry.registerBlock(blockDoubleboneslab, "blockDoubleboneslab");