Jump to content

Why are the blocks without tile_Entity loaded and the once with them aren't


Recommended Posts

Posted

I have a few blocks of which one using a Tile_Entity to do some cooking like a furnace. I register all my blocks like this (Probably where my error is):

 

GemSmelter = new Com.BRHSM.Mod.Blocks.GemSmelter(GemSmelterID, Material.rock, false).setHardness(5.0F).setBlockName("Gem Smelter");
GameRegistry.registerBlock(GemSmelter, "Gem Smelter");

 

The tile entity is registerd in my clientprocy and my serverproxy:

GameRegistry.registerTileEntity(TileEntityGemSmelter.class, MainRegistry.MODID);

 

The mod has no errors detected by eclipse.

 

If you want the full mod just ask and I will put on a pastebin (else we get frikin long posts)

Posted

Show the block class.

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

Dude... what? :o

 

To make your Block have a TileEntity, override hasTileEntity and createTileEntity. And all the stuff you do with the TE in your Block is highly suspicious.

 

Wow dude I totaly forgot about that!!! Lol I guess

Posted

No I got it to work but when I try to open the GUI the game crashes. I have problems with line 66 in the GemSmelter Block Class:

 

public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
	player.openGui(MainRegistry.modInstance, 0, world, x, y, z);
	return true;
}

 

at the second line it crashes (it's different from the pastebin from erlier. changed it with the same result)

 

crash report: http://pastebin.com/Kc9bBU7D

Posted

Do you have a registered GUI handler?

(That is, a class that implements

IGuiHandler

registered with the

NetworkRegistry

with

registerGuiHandler

)

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

Did you register

with the

NetworkRegistry

with

registerGuiHandler

)

?

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

In your main mod file, I'm not sure if it matters where it goes, mine is in the FMLInitializationEvent

 

NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);

 

instance being an instance of your mod (@Mod.Instance(Reference.MOD_ID) public static RandomUtilities instance;)

proxy being an object of whatever implements IGuiHandler (@SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.SERVER_PROXY) public static IProxy proxy;)

Posted

In your main mod file, I'm not sure if it matters where it goes, mine is in the FMLInitializationEvent

 

NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);

 

instance being an instance of your mod (@Mod.Instance(Reference.MOD_ID) public static RandomUtilities instance;)

proxy being an object of whatever implements IGuiHandler (@SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.SERVER_PROXY) public static IProxy proxy;)

 

 

I get:

The method registerGuiHandler(Object, IGuiHandler) in the type NetworkRegistry is not applicable for the arguments (MainRegistry, ServerProxy)

 

As a fix it says that i have to change the proxy to: IGuiHandler or I have to implement IGuiHandler into ServerProxy, What's best?

Posted

In your main mod file, I'm not sure if it matters where it goes, mine is in the FMLInitializationEvent

 

NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);

 

instance being an instance of your mod (@Mod.Instance(Reference.MOD_ID) public static RandomUtilities instance;)

proxy being an object of whatever implements IGuiHandler (@SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.SERVER_PROXY) public static IProxy proxy;)

 

Maybe i should read first, i'm so stupid :0 What do I have to do with the Auto generated methodes then?

 

 

I get:

The method registerGuiHandler(Object, IGuiHandler) in the type NetworkRegistry is not applicable for the arguments (MainRegistry, ServerProxy)

 

As a fix it says that i have to change the proxy to: IGuiHandler or I have to implement IGuiHandler into ServerProxy, What's best?

Posted

Um, you shouldn't be using your server proxy, you should be registering your gui handler instead .-.

Also, you shouldn't be putting MainRegistry as your instance, you should be putting the instance of your main mod class.

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Posted

And if you have a gui with a container (which you have), you should only open the gui on the server side (

world.isRemote

is

false

).

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Um, you shouldn't be using your server proxy, you should be registering your gui handler instead .-.

Also, you shouldn't be putting MainRegistry as your instance, you should be putting the instance of your main mod class.

 

I am fairly new to forge modding. I don't know what you mean here. I sertanly don't know how to fix it, can you give me some raw code on which lines to change?

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.