Christofmeg
Members-
Posts
3 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Christofmeg's Achievements
Tree Puncher (2/8)
0
Reputation
-
Okay I'm trying to create a block. When I'm running the mod in eclipse everything works fine, but the mod is crashing when I'm testing it with the vanilla minecraft launcher. The numbers on the side is the line numers. Here is a part of the main class nationalscience: 67 @EventHandler 68 public void PreInitialize(FMLPreInitializationEvent event) 69 { 70 NSBlocks.init(); 71 } Here is a part of the NSBlocks class: 21 public final class NSBlocks 22 { 23 public static Block CompressedCobble; 24 25 public static void init() 26 { 27 CompressedCobble = new BlockCompressedCobble().setBlockName("compressedcobble"); 28 GameRegistry.registerBlock(CompressedCobble, ItemCompressedCobble.class, CompressedCobble.getUnlocalizedName().substring(5)); 29 } 30 } Here is a part of the BlockCompressedCobble class: 22 public class BlockCompressedCobble extends Block 23 { 24 public BlockCompressedCobble() 25 { 26 super(Material.rock); 27 this.setHardness(3.0F); 28 this.setResistance(5.0F); 29 this.setCreativeTab(CreativeTabs.tabBlock); 30 } 31 } Here is the crashreport:
-
[1.7.2] Block dropping it self (block) ! [SOLVED]
Christofmeg replied to proalt's topic in Modder Support
Okay I can see that you have a problem with the dropping of blocks in 1.7.2 so I have some examples for you that could help you out: [Notice] You must replace the <> //If the block's drop is an item. public Item getItemDropped1(int metadata, Random random, int fortune) { return YOURMOD.YOURMOD; } //If the block's drop is a block. public Item getItemDropped(int metadata, Random random, int fortune) { return Item.getItemFromBlock(YOURMOD.TESTBLOCK); } //If the block's drop is a vanilla item. public Item getItemDropped(int metadata, Random random, int fortune) { return Item.getItemById(<ItemID>); } //If the block's drop is a vanilla block. public Item getItemDropped(int metadata, Random random, int fortune) { return Item.getItemFromBlock(Block.getBlockById(<BlockID>)); }