Started by
Termont
on
Topic category: Help with Minecraft modding (Java Edition)
How to make a reverse recipe from block/brick?
For example: Copper Ingot x9 -> Copper Block
Reverse: Copper Block -> Copper Ingot x9 .
Like iron block.
Topic category: Help with Minecraft modding (Java Edition)
How to make a reverse recipe from block/brick?
For example: Copper Ingot x9 -> Copper Block
Reverse: Copper Block -> Copper Ingot x9 .
Like iron block.
Create new recipe, check for "Is recipe shapeless", put your blocks and output slot ingot and change amount to 9
@#1
@CAHEKa Спасибо :)
Сейчас чуть в коде нового рецепта полазил, части копировал, вставлял, проверял и в итоге нашел часть, который обратный крафт делает. Ибо делать новый элемент для каждого блока, все таки не особо хочется делать.
Если что, часть выделена жирным шрифтом | If you want to make reverse craft without make new element of your mod, you can add part of code(Allocated bold) and put in code of block/item and the others.
[spoiler]public void load(FMLInitializationEvent event) { if (event.getSide() == Side.CLIENT) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher() .register(Item.getItemFromBlock(block), 0, new ModelResourceLocation("testenvironmentmod:copperblock", "inventory")); } GameRegistry.addRecipe(new ItemStack(block, 1), new Object[]{"012", "345", "678", Character.valueOf('0'), mcreator_copperIngot.block, Character.valueOf('1'), mcreator_copperIngot.block, Character.valueOf('2'), mcreator_copperIngot.block, Character.valueOf('3'), mcreator_copperIngot.block, Character.valueOf('4'), mcreator_copperIngot.block, Character.valueOf('5'), mcreator_copperIngot.block, Character.valueOf('6'), mcreator_copperIngot.block, Character.valueOf('7'), mcreator_copperIngot.block, Character.valueOf('8'), mcreator_copperIngot.block,}); ItemStack recStack = new ItemStack(mcreator_copperIngot.block, 9); GameRegistry.addShapelessRecipe(recStack, new Object[]{mcreator_copperBlock.block,}); [/spoiler]