Jump to content

Recommended Posts

Posted

Welcome back for yet another question that seems to have me stumped :D

 

Anyways, I managed to make a custom furnace with a different set of recipes that use 2 items instead of one to produce one result, but I have one issue. I can't set the recipes, here is my recipes file:

 

 

  Reveal hidden contents

 

 

now the problem is exactly at this line:

 

mouldingList.put(Mould, Material, Result);

 

This yields an error that the put function can only take 2 objects as input, but I can't find a replacement function. How do I do this?

if(pain == 0)

{

   gain = 0;

}

Posted
  On 7/20/2015 at 8:01 PM, Failender said:

you cant use a map that way. read a doc how maps work and u will see that they store one key for one value. not two keys for one value

This is wrong.

map.put("Hello", 1);
map.put("Goodbye", 1);

Works perfectly fine.

map.get("Hello"); //1
map.get("Goodbye"); //2

However he doesn't know how to use the syntax properly.

Maker of the Craft++ mod.

Posted

Ok, so I reviewed Maps and understand what you guys mean.

But how will I go about adding the recipe now? will this work?

 

mouldingList.put(Material, Result);
mouldingList(Material, Result);

if(pain == 0)

{

   gain = 0;

}

Posted

Could you please explain how getter methods would help, because I will still have to use a single itemstack for the key, am I right?

(I want sample code  :D)

if(pain == 0)

{

   gain = 0;

}

Posted

I am completely lost here  :(

 

What I get so far is that

1. I need to set the key to use both itemstacks

2. I should use a different class to do that, but I don't know how that class should be structured, does anyone have a tutorial I can check out?

if(pain == 0)

{

   gain = 0;

}

Posted

Using this I get this crash code:

 

 

  Reveal hidden contents

 

 

apparently the crash is at this segment of the recipe code:

 

 

  Reveal hidden contents

 

 

I think its cause it cant compare the entry and parItemStack2 which shouldn't happen

if(pain == 0)

{

   gain = 0;

}

Posted

What I get from here is that instead of:

 

  Reveal hidden contents

 

 

do this:

 

 

  Reveal hidden contents

 

 

but when I do this, then I get this error code:

 

 

  Reveal hidden contents

 

if(pain == 0)

{

   gain = 0;

}

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.