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

So I am creating a furnace with multiple inputs and I have it working with 1 recipe,the problem comes when I add another recipe. (I know there's many threads on this subject,I have read them all)

I don't think it is too complicated but it's outside my understanding,the TileEntity,Container and everything else is as they should be.

The problem is that it doesn't differentiate between the recipes,it treats recipe 1 and recipe 2 as the same and therefore you can use half of each.

This may be due to multiple smelting methods,which I have but I feel like I'm close to solving it however I need just a little more help.

The recipe class code is here: http://pastebin.com/puPbdvhf

 

I think the issue is that I have an addSmelting and addDoubleSmelting when declaring the recipes.

Therefore what I'd like ask is: could anyone tell me how I can set addDoubleSmelting to equal addSmelting twice?

e.x addDoubleSmelting = addSmelting + addSmelting

 

if any other code is necessary then tell me and I'll give it to you.

 

Thank you for your time.

Sincerely,

Erik Zetrov

Basically, all you did is merging two furnaces into one.

That isn't what you want to do, is it ? (even if it was, you wouldn't do it this way)

The smelting list (which is a map) needs to be unique for inputs to be linked.

All that a smelting map does, is saving input as key, and output as value.

Now, all you need to figure out, is what your inputs and outputs should be, coding-wise.

  • Author

Basically, all you did is merging two furnaces into one.

That isn't what you want to do, is it ? (even if it was, you wouldn't do it this way)

The smelting list (which is a map) needs to be unique for inputs to be linked.

All that a smelting map does, is saving input as key, and output as value.

Now, all you need to figure out, is what your inputs and outputs should be, coding-wise.

 

And that is EXACTLY why I started this thread,I don't know how it should be coding-wise.

If I did then I wouldn't have to ask.

I'm looking for help so that I can be pointed in the right direction,what you basically said confirms what I already know. (sorry,if I sound sarcastic or ungrateful for your insight)

Well, this has already been discussed in other threads...

Inputs should be a group of ItemStacks...just build a structure that group them. A class, an array, a list...your choice !

The only things is, you'll have to be able to compare two groups so that each key (ie inputs or "group" of itemstacks) in the map is unique.

Outputs can be the same structure, with the resulting ItemStack, or something different.

 

A void example with arrays:

Map dualSmeltingList = new HashMap();
ItemStack[] inputs = new ItemStack[2];
ItemStack[] outputs = new ItemStack[2];
dualSmeltingList.put(inputs,outputs);

  • Author

I have been fiddling around with that idea since you mentioned it and I am getting closer to what I am looking for.

Slowly but surely I make progress,it's just a question about time now I guess until I get it right.I have an idea about

how I can solve it now,so just gotta learn a few things related to arrays.

Thanks for your insight.^^

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.