Jump to content

Recommended Posts

Posted (edited)

So, I've been stuck trying to figure out a way of using dyes in custom recipes. I can only get ink sacs to work because that's the default. How would I do this?

 

package com.JakarianStudios.ConcreteMod;

import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;

public class Recipes {
	
	public static void Register(){
		GameRegistry.addRecipe(new ItemStack(ConcreteMod.PressedDust, 4), new Object[]{"DD",
				   																	   "DD", 'D', ConcreteMod.ConcreteDust});
GameRegistry.addRecipe(new ItemStack(ConcreteMod.BlackConcrete, 8), new Object[]{"DDD",	"DBD","DDD", 'D', ConcreteMod.ConcreteBlock, 'B', Items.dye});
GameRegistry.addRecipe(new ItemStack(ConcreteMod.BlueConcrete, 8), new Object[]{"DDD","DBD","DDD", 'D', ConcreteMod.ConcreteBlock, 'B', Items.dye});
	}
}

 

Edited by JakariaYT
Posted

1) You do not need new Object[]{}, that's the magic of varargs.

2) You can pass ItemStacks too.

3) HINT HINT, NUDGE NUDGE

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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