Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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)

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.

  • Author

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

  • Author

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

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.

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.

  • Author

Did you register

with the

NetworkRegistry

with

registerGuiHandler

)

?

 

I don't Understand? Can you explain what that means!

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;)

  • Author

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?

  • Author

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?

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.

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/

  • Author

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.