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'm currently working on a custom furnace with 2 inputs and 3 outputs and 1 fuel slot. I've got the furnace to smelt but it creates a lot of weird bugs. Which are:

 

1. When I try to put say 40 coal into the fuel slot, it puts a full stack of 64 coal. That same effect is on every slot that I place items in. It doesn't take the items either, It creates a whole new stack of 64.

 

Sometime it takes the stack, puts it in, but when I try and take it back out, gone. (This seems to only happen when there isn't any inputs and only for the fuel, but if there is an input bug 1 still happens to the fuel)

 

2. When I try to take the items out of the furnace like the fuel or input or output, it just disappears when I click on it.

 

3. When both inputs are full, it takes two out of the first input instead of one from both

 

Here is my code:

Block

 

TileEntity

 

Container

 

Gui

 

I've been looking at the code inside the container, do I need to override detectAndSendChanges and other functions inside Container to possibly get this to work?

Why do you have multiple GuiHandlers?

 

Do you mean BloomeryGUIHandler and GuiHandlerRegistry? GuiHandlerRegistry is just to register all of my Gui's and BloomeryGUIHandler is specificly for the Bloomery.

Well I meant why are you going to have more than one. Why don't you just use a switch statement or an if else statement to handle your GUIs and Containers?

item.getMetadata(1) // Doesn't work the way you think it does.

"// TODO: Figure out difference between simulate = true and simulate = false"

If simulate is true then the process doesn't happen, if false it does happen. In this case if true it doesn't mess with your ItemStacks, if false the ItemStacks change.

Also quick question did you follow a tutorial?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

Why do you have multiple GuiHandlers?

 

Do you mean BloomeryGUIHandler and GuiHandlerRegistry? GuiHandlerRegistry is just to register all of my Gui's and BloomeryGUIHandler is specificly for the Bloomery.

Well I meant why are you going to have more than one. Why don't you just use a switch statement or an if else statement to handle your GUIs and Containers?

item.getMetadata(1) // Doesn't work the way you think it does.

"// TODO: Figure out difference between simulate = true and simulate = false"

If simulate is true then the process doesn't happen, if false it does happen. In this case if true it doesn't mess with your ItemStacks, if false the ItemStacks change.

Also quick question did you follow a tutorial?

 

I originally followed TheGreyGhost's code here but I'm trying to switch it to Forge's capability system. Also, checked getMetadata, thought it just returned the int I put in, but I switched it to getMetadata(ItemStack) now.

 

For that todo I originally had insertItem, but I switched it to setStackInSlot. I'm guessing it would be better to use insertItem? Thank you for explaining it though.

Why do you have multiple GuiHandlers?

 

Do you mean BloomeryGUIHandler and GuiHandlerRegistry? GuiHandlerRegistry is just to register all of my Gui's and BloomeryGUIHandler is specificly for the Bloomery.

Well I meant why are you going to have more than one. Why don't you just use a switch statement or an if else statement to handle your GUIs and Containers?

item.getMetadata(1) // Doesn't work the way you think it does.

"// TODO: Figure out difference between simulate = true and simulate = false"

If simulate is true then the process doesn't happen, if false it does happen. In this case if true it doesn't mess with your ItemStacks, if false the ItemStacks change.

Also quick question did you follow a tutorial?

 

I originally followed TheGreyGhost's code here but I'm trying to switch it to Forge's capability system. Also, checked getMetadata, thought it just returned the int I put in, but I switched it to getMetadata(ItemStack) now.

 

For that todo I originally had insertItem, but I switched it to setStackInSlot. I'm guessing it would be better to use insertItem? Thank you for explaining it though.

Yes it would be better to use insertItem and extractItem because it already handles the current slot being null. And you are going to need to create your own implementation of insertItem and possibly extract item. Also...

3. When both inputs are full, it takes two out of the first input instead of one from both

That is not what you told it to do. Edit: Also that is not what TGG did.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.