Jump to content

Recommended Posts

Posted

We need more than that to go on.

 

The only thing I can tell from that is that you're trying to add null to the registry, maybe you're doing "GameRegistry.registerItem(null,someStringName);" ?

--Remember to "Thank you" posts that actually helped you, and if a person seems nice, why not give them an applaud while you're at it--

Posted

Might your crash be in any way related to this?

 

Except that item has to be lowercase.

For blocks use "tile".

Ok what he said worked and i launched MC but the block is not there. I checked my code and found that i had forgot to register the block so i put

GameRegistry.registerBlock(Firestone);

and it had an error, i checked quick fixes and it wanted to change it to make it

GameRegistry.registerBlock(Firestone, null);

 

this is causing my MC to crash again.

 

Where I told you

 

Ok what he said worked and i launched MC but the block is not there. I checked my code and found that i had forgot to register the block so i put

GameRegistry.registerBlock(Firestone);

and it had an error, i checked quick fixes and it wanted to change it to make it

GameRegistry.registerBlock(Firestone, null);  <-- MAKE THIS NOT NULL

this is causing my MC to crash again.

 

See above

 

And then

 

I have to put something there. I can't just leave it blank, I was wanting to know what to put there

It's a fuckin' string.  What do you want to call the block?  It can be anything (as long as you don't use something that's been used before).  Seriously.  Not.  That.  Hard.

 

?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

We need more than that to go on.

 

The only thing I can tell from that is that you're trying to add null to the registry, maybe you're doing "GameRegistry.registerItem(null,someStringName);" ?

here is my main.

package jibberish.firstmod.common;

 

import jibberish.firstmod.block.BlockFirestone;

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

 

@Mod(modid = "FirstMod", name = "First Mod", version = "1.0.0 Alpha")

 

public class FirstMod {

@SidedProxy(clientSide = "jibberish.firstmod.client.ClientProxy", serverSide = "jibberish.firstmod.commpn.CommonProxy")

public static CommonProxy proxy;

 

public static Block Firestone = new BlockFirestone(2000, Material.glass).setUnlocalizedName("firestone");

 

 

public void load(FMLInitializationEvent event){

proxy.registerRenderInformation();

}

 

public FirstMod() {

 

GameRegistry.registerBlock(Firestone, "Firestone");

 

}

}

 

and here is my block class

package jibberish.firstmod.block;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.renderer.texture.IIconRegister;

import net.minecraft.creativetab.CreativeTabs;

 

public class BlockFirestone extends Block {

 

private String unlocalizedName;

public Block setBlockName(String Firestone)

{

this.unlocalizedName = Firestone;

return this;

}

public BlockFirestone(int par1, Material par2Material){

super(par2Material);

this.setCreativeTab(CreativeTabs.tabBlock);

this.setLightLevel(0.9F);

this.setHardness(4);

this.setResistance(5);

}

public void registerIcons(IIconRegister iconRegister) {

blockIcon = iconRegister.registerIcon("FirstMod:Firestone");

}

public Block setUnlocalizedName(String Firestone) {

return null;

}

 

}

 

 

Oh and i understand this might not be very good code. I've been following a 1.6.4 tutorial so ive had to convert some things.

Posted

Also,

 

public BlockFirestone(int par1, Material par2Material){

 

You can drop the "int par1" as you're not using it.  That used to be the block ID, but as block IDs are no longer A Thing, you don't need it.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.