Started by
Nanosuit2.0
on
Topic category: Help with Minecraft modding (Java Edition)
Hi
I create item (block) if is destroyed by pickaxe without silk touch, it drop 1 dust.
That work perfectly.
Than If is digged with silk touch it drop itself, work good too.
If you put that ore to the furnace, it make 1 item. But I wanna incress that count how to do it (No just for that item but in general)
Thx
SOLVED, HOW TO DO IT:
In code of your product from smelting found line
GameRegistry.addSmelting(product, new ItemStack(block), 1.0f);
Above that line write this:
ItemStack output = new ItemStack(block);
output.setCount(smelted number);
And than replace
new ItemStack(bloc)
in that line
GameRegistry.addSmelting(product, new ItemStack(block), 1.0f);
for your variable name in my case its output
Final code for multiple smellting look like that, you smelt 2 items by my code, replace 2 for 5 and it should give you 5
ItemStack output = new ItemStack(block);
output.setCount(2);
GameRegistry.addSmelting(item, output, 1.0f);
In version 1.8.0 is situation quite different:
You found this part of code:
public void load(FMLInitializationEvent event) {
ItemStack smeltStack = new ItemStack(mcreator_diamondDust.block, (int) (1));
GameRegistry.addSmelting(new ItemStack(Items.DIAMOND, (int) (1)), smeltStack, 1.0f); }
And all what you need to do is:
Number of outputs:
Replace 1 on your number
ItemStack smeltStack = new ItemStack(mcreator_diamondDust.block, (int) (1));
I guess that inputs work on same system:
Number of inputs:
Replace 1 on your number do not missplace with 1.0f, i mean just pure 1
GameRegistry.addSmelting(new ItemStack(Items.DIAMOND, (int) (1)), smeltStack, 1.0f);