Jump to content

Recommended Posts

Posted

Alright, I've made a custom furnace before (but this was a while back) and what not, worked, yay, so I came back and decided to do something a little more complicated - only this time, two errors decide they want to exist (I did copy and paste the code from https://github.com/NealeGaming/nealecraft to save time).

 

c831dfdc1f.png

This is the first error, in the BlockHydrogenSeparator code.

Here's the code for it: http://pastebin.com/gWMN5zzG (BlockHydrogenSeparator class)

 

Second error lies within this class, GuiHydrogenSeparator.

Here's the error: http://puu.sh/aJGZA/cef74319c3.png

Here's the code: http://pastebin.com/wyk5i2id

 

For reference, here's the container, tile entity and guihandler code:

Container class: http://pastebin.com/KxJEsdrc

 

Tile Entity class: http://pastebin.com/weQpWhE7

 

GuiHandler class: http://pastebin.com/nWf1JF1B

 

Any and all help is appreciated, thanks.

Posted

Look at your own line.

 

((TileEntity) world.getTileEntity(x,y,z).setGuiDisplayName(itemstack.getDisplayName());

 

Why are you casting an object of type TileEntity to TileEntity?

 

TileEntity does not have a method setGuiDisplayName(String name). You need to cast to your own TileEntity class (TileEntityHydrogenSeparator?). This is pretty basic java.

BEFORE ASKING FOR HELP READ THE EAQ!

 

I'll help if I can. Apologies if I do something obviously stupid. :D

 

If you don't know basic Java yet, go and follow these tutorials.

Posted

Again, really simple java (unless I'm mis-reading something completely).

 

You're trying to invoke a constructor for TileEntityHydrogenSeparator with InventoryPlayer and a TileEntityHydrogenSeperator as arguments.

 

Yet, in your your TileEntityHydrogenSeparator class you don't define any constructors, meaning you only have the default, no args constructor.

 

 

BEFORE ASKING FOR HELP READ THE EAQ!

 

I'll help if I can. Apologies if I do something obviously stupid. :D

 

If you don't know basic Java yet, go and follow these tutorials.

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.