Jump to content

[1.14.4] custom GUI and Furnace


Guest

Recommended Posts

I managed to copy over the code for the furnace, but despite everything I've done, it's still registering the furnace gui and i cannot use it for some reason. i can put my items in the slots, but it does not work. here's my code:
https://github.com/drmdgg/marijuanacraft1.14.4/tree/master/src/main/java/drmdgg/marijuanacraft/container
https://github.com/drmdgg/marijuanacraft1.14.4/tree/master/src/main/java/drmdgg/marijuanacraft/client/gui
https://github.com/drmdgg/marijuanacraft1.14.4/tree/master/src/main/java/drmdgg/marijuanacraft/init/blocks/tileentities
ignore anything to do with "column"
i'm looking into the "VO"

 

I've found a "FurnaceTileEntity" in VOBlock in a "return new" and also an "instanceOf" but when i change it to "VOTileEntity" the GUI doesnt come up at all 

Edited by Guest
Link to comment
Share on other sites

1 hour ago, diesieben07 said:
  • Do not use ContainerBlock. To add a TileEntity to your block, override hasTileEntity and createTileEntity.
  • Use @Override when overriding methods.
  • Why on earth does VOTileEntity extend AbstractVOContainer? This makes no sense.

In general: The Minecraft furnace code is a terrible place to start.

i haven't a clue as to why that was extended like that, it was only in GitHub, not my actual code...very strange. anyway, I fixed that on GitHub, and added what you told me to add.
https://github.com/drmdgg/marijuanacraft1.14.4/blob/4d7a20017483d7dacb735e15a0b94b1bda30a3af/src/main/java/drmdgg/marijuanacraft/init/blocks/tileentities/VOBlock.java#L26-L38

 

should I just remove ContainerBlock or replace it with something else
 

Edited by Guest
Link to comment
Share on other sites

@diesieben07 I'm getting this error when I try to load the gui in the game and I removed ContainerBlock
Error executing task on Server java.lang.ClassCastException: net.minecraft.tileentity.FurnaceTileEntity cannot be cast to drmdgg.marijuanacraft.init.blocks.tileentities.AbstractVOTileEntity at drmdgg.marijuanacraft.init.blocks.tileentities.AbstractVOBlock.onBlockActivated(AbstractVOBlock.java:51) ~[?:?]

 

but furnacetile entity is no where to be found

 

Edited by Guest
Link to comment
Share on other sites

10 minutes ago, diesieben07 said:

Please learn basic Java if you do not understand how to read this error.

never mind. I got it. thanks

 

is it possible to have someone delete this thread?

Edited by Guest
Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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