Posted January 28, 201312 yr I need for each block because I'm creating a separate class file? or done differently? pleace help me.
January 28, 201312 yr It depends, in what way the blocks are different. If all these are just normal block with just another texture, footstepsound, id and name, than you can create just one new class. If one block should have a special property, then you should do a new class file especially for this block. Well basically, this is a classfile of a normal block: package Tutorial; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class TutorialBlock extends Block { public TutorialBlock(int par1, int par2, Material par3Material) { super(par1, par2, par3Material); } @Override public String getTextureFile() { return "/Tutorial/tutorial_texutre.png"; } } In your mainmodfile, you should write something like this: public static Block tutorialBlock= new TutorialBlock(500, 0, Material.sand).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("oreCopper");
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.