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

Hey guys a question here, is it possible at all to allow a custom furnace to run with for example 3 inputs 1 output, and in certain circumstances, accept 2 inputs and 1 output, i tried removing the null check in the tile entity and recipe files but it returned an error when loading up (which is understandable) but i have no idea how to do it, i thought i could find out a way by browsing how the crafting table works but there is no tile entity for it (that i found) in the folder as brewing stand furnace hopper etc :/

 

anybody able to help out would be muchly appreciated (im happy to post any relevant code if needed)

 

thanks in advance

  • Author

when writing out my recipe how would i incorporate the null (is kinda my issue as well) as a regular recipe looks like this

 

CoffeeMachineRecipes.instance().addRecipe(new ItemStack(ModItems.Whatever), new ItemStack(ModItems.Stuff), new ItemStack(ModItems.Cats), new ItemStack(ModItems.Whatever));

 

ive tried writing

 

CoffeeMachineRecipes.instance().addRecipe(new ItemStack(ModItems.Whatever), null , new ItemStack(ModItems.Cats), new ItemStack(ModItems.Whatever));

 

also on a long shot

 

CoffeeMachineRecipes.instance().addRecipe(new ItemStack(Blocks.air), new ItemStack(ModItems.Stuff), new ItemStack(ModItems.Cats), new ItemStack(ModItems.Whatever));

 

 

i just cant figure out how to write a recipe with a hole in it :/

  • Author

what do you mean, ive written out a custom recipes class, would i need to modify the code here ?

 

     public void AddRecipe(ItemStack Input, ItemStack AnotherInput, ItemStack Output)
    {


     Recipes.put(Arrays.asList(Input.getItem().getIdFromItem(Input.getItem()), Input.getItemDamage(), AnotherInput.getItem().getIdFromItem(AnotherInput.getItem()), AnotherInput.getItemDamage()), Output);
    
    
    } 

 


    public ItemStack GetResult(ItemStack item_1, ItemStack item_2, ItemStack item_3)
    {


     if(item_1 == null || item_2 == null || item_3 == null)
     {
     return null;
     }
    
    

     if(item_1.getItem() instanceof ModItemEmpty_Mug){
     ItemStack result = (ItemStack)Recipes.get(Arrays.asList(item_2.getItem().getIdFromItem(item_2.getItem()), item_2.getItemDamage(), item_3.getItem().getIdFromItem(item_3.getItem()), item_3.getItemDamage()));
    
     return result;
    
     }
    
    
    
    
     return null;
    }

  • Author

do you have an example of a trove or links to documentations

 

and i think im getting confused by what you mean when saying list? are you refering to the array in the recipes class?

 

    public void AddRecipe(ItemStack Input, ItemStack AnotherInput, ItemStack Output)

    {

 

   

    Recipes.put(Arrays.asList(Input.getItem().getIdFromItem(Input.getItem()), Input.getItemDamage(), AnotherInput.getItem().getIdFromItem(AnotherInput.getItem()), AnotherInput.getItemDamage()), Output);

   

   

    }

 

 

or the actual implementation of the crafting recipe (CoffeeMachineRecipes.instance().AddRecipe(new ItemStack(ModItems.CoffeeBean), new ItemStack(Items.sugar), new ItemStack(ModItems.CupOfCoffee));

)

I've Googled trove and found nothing at all :/ could you write one in sudo

 

http://java-performance.info/primitive-types-collections-trove-library/

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

I have a 3-input furnace in my mod, It worked in 1.6.2, and i'm trying to get it to work in 1.7.2. if you want to see my old code, PM me, or just ask me to put it here. There's a lot of code...

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.