Jump to content

Recommended Posts

Posted

So now that I fixed my rails.

I tried to fix the crafting table but the Gui doesn't open.

 

Here is the GitHub page : https://github.com/BlazeAxtrius/ExpandedRailsMod/tree/master/src/main/java/com/expanded/rails/mod/gui

 

The Crafting Table : https://github.com/BlazeAxtrius/ExpandedRailsMod/tree/master/src/main/java/com/expanded/rails/mod/blocks

 

I tried a lot of tutorials and stuff but they didn't work.

Posted
  On 2/16/2015 at 2:07 PM, diesieben07 said:

Sorry to say but seriously, your code is huge fu**ing mess. In your main mod class you do not register a GuiHandler (it's commented). Do you register one anywhere else? If not, that is your problem.

 

You shouldn't be sorry. I build this mod with a friend of mine just by watching tutorials.

After we made it I had to update it on my own cause he didn't want to.

And since I have absolutely no time, I try to fix everything as fast as possible, just so it can work for every version in minecraft.

 

Do i have to register it in the ClientProxy? because I only registered it in mod class.

Posted
  On 2/16/2015 at 2:34 PM, diesieben07 said:

Register it in the main mod class.

 

It is registered in the main mod class.

 

public GuiHandlerRailsCraftingTable guiHandlerRailsCraftingTable = new GuiHandlerRailsCraftingTable(); 
NetworkRegistry.INSTANCE.registerGuiHandler(this, guiHandlerRailsCraftingTable);

 

Also I saw this "player.openGui(TutorialMain.instance, 3, world, (int) player.posX, (int) player.posY, (int) player.posZ);"

 

I don't have anything like that. Should I have it and where do I have to put it?

Posted
  On 2/16/2015 at 3:21 PM, diesieben07 said:

 

Oh yeah sorry didn't check that class for it.

I removed the "NetworkRegistry.INSTANCE.registerGuiHandler(this, guiHandlerRailsCraftingTable);"

Doesn't really do anything as you said but I still don't get why the gui can't open.

Posted
  On 2/16/2015 at 4:07 PM, diesieben07 said:

[me=diesieben07]bangs head against wall[/me]

 

Yes, you DO need the call to registerGuiHandler. Of course you do.

 

Ok, I managed to make it open but the game crashes with this error:

 

 

  Reveal hidden contents

 

Posted
  On 2/16/2015 at 5:41 PM, diesieben07 said:

You call getBlockState with null as the BlockPos. That is because you never initialize "field_178145_h". Again: Just copying and pasting random bits and pieces of code will get you nowhere.

 

I didn't copy bits and pieces. I copied the full code from 1.7.10 to 1.8.

After that I try to fix it.

 

Also considering it worked for 1.7.10 and my horrible java skills. I just try to understand what you mean.

Posted

Ok so i changed the code a little.

Here is the new GitHub https://github.com/BlazeAxtrius/ExpandedRailsMod

 

The problem is that the Gui doesn't open and the game doesn't show any errors.

I saw the GutHub of an other mod and tried to make my crafting table as in the other mod because i know it works there but i just managed to not get the gui again.

Also the purple/black texture disappeared but that is not the main issue.

 

Posted

Can someone please look at my Github and try to see why the GUI doesn't open?

 

Here is the GitHub https://github.com/BlazeAxtrius/ExpandedRailsMod/tree/master/src/main/java/com/expanded/rails/mod

 

The crafting table is in "blocks" folder

The gui and everything about it are in "gui" folder

The IGuiHandler is in the CommonProxy.

 

 

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.