BRHSM Posted March 17, 2015 Share Posted March 17, 2015 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) Quote Link to comment Share on other sites More sharing options...
Draco18s Posted March 17, 2015 Share Posted March 17, 2015 Show the block class. Quote 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. Link to comment Share on other sites More sharing options...
BRHSM Posted March 17, 2015 Author Share Posted March 17, 2015 http://pastebin.com/SCyKXdwf Here you go Quote Link to comment Share on other sites More sharing options...
BRHSM Posted March 18, 2015 Author Share Posted March 18, 2015 Dude... what? 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 Quote Link to comment Share on other sites More sharing options...
BRHSM Posted March 18, 2015 Author Share Posted March 18, 2015 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 Quote Link to comment Share on other sites More sharing options...
61352151511 Posted March 18, 2015 Share Posted March 18, 2015 Did you register a gui handler? Quote Link to comment Share on other sites More sharing options...
Draco18s Posted March 18, 2015 Share Posted March 18, 2015 Do you have a registered GUI handler? (That is, a class that implements IGuiHandler registered with the NetworkRegistry with registerGuiHandler ) Quote 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. Link to comment Share on other sites More sharing options...
BRHSM Posted March 18, 2015 Author Share Posted March 18, 2015 http://pastebin.com/XM0ygGJ9 Will This One Do? Quote Link to comment Share on other sites More sharing options...
Draco18s Posted March 18, 2015 Share Posted March 18, 2015 Did you register with the NetworkRegistry with registerGuiHandler ) ? Quote 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. Link to comment Share on other sites More sharing options...
BRHSM Posted March 18, 2015 Author Share Posted March 18, 2015 Did you register with the NetworkRegistry with registerGuiHandler ) ? I don't Understand? Can you explain what that means! Quote Link to comment Share on other sites More sharing options...
61352151511 Posted March 18, 2015 Share Posted March 18, 2015 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;) Quote Link to comment Share on other sites More sharing options...
BRHSM Posted March 18, 2015 Author Share Posted March 18, 2015 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? Quote Link to comment Share on other sites More sharing options...
BRHSM Posted March 18, 2015 Author Share Posted March 18, 2015 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? Quote Link to comment Share on other sites More sharing options...
SuperKael Posted March 18, 2015 Share Posted March 18, 2015 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. Quote 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. Link to comment Share on other sites More sharing options...
larsgerrits Posted March 18, 2015 Share Posted March 18, 2015 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 ). Quote 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/ Link to comment Share on other sites More sharing options...
TheGreyGhost Posted March 18, 2015 Share Posted March 18, 2015 Hi There's a working example of a custom furnace here [1.8] - see MBE31 https://github.com/TheGreyGhost/MinecraftByExample -TGG Quote Link to comment Share on other sites More sharing options...
BRHSM Posted March 19, 2015 Author Share Posted March 19, 2015 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? Quote Link to comment Share on other sites More sharing options...
BRHSM Posted March 19, 2015 Author Share Posted March 19, 2015 Hi There's a working example of a custom furnace here [1.8] - see MBE31 https://github.com/TheGreyGhost/MinecraftByExample -TGG That's a lot of code to go trough I think It's best i consentrate on my own code Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.