GTNewHorizons/Minetweaker-Gregtech-5-Addon

Adding Printer recipes not working

JasonMcRay opened this issue · 12 comments

I recently started to add GT guide books into my modpack and I wanted to make a recipe for them being made inside Printer. Unfortunately the recipes are not added. I also tried the example recipe line on the wiki
(mods.gregtech.Printer.addRecipe(minecraft:writable_book, minecraft:book, minecraft:feather, liquid:squidink, 25, 15);
that doesnt work as well...

using GTTWeaker 1.0.9
minetweaker 3.0.10B
GregTech 5.09.13

My exact recipe I am adding:
import mods.gregtech.Printer;

var guideCharcoalPit = Enchiridion2:book.withTag({identifier: "GUIDE_Charcoal_Pit"});
var paper = minecraft:paper;
var charcoalPit = gregtech:gt.blockmachines:1155;
var ink = liquid:squidink;

Printer.addRecipe(guideCharcoalPit, paper * 3, charcoalPit, ink * 144, 400, 2);

After couple of client restarts i can see the new recipe in NEI, but the Printer still doesnt want to make that recipe happen.

Not sure if NBT Data works because we have the issue before with some Forestry logs too (Old Forestry 3.6) using only nbt data.
Will look inside it.

I try this recipes with nbt data too and it shows up in Nei and works well.

(It is a nonsen recipes make a enchanted sword out of a sword and enchating bottles.)

Printer.addRecipe(minecraft:iron_sword.withTag({ench: [{lvl: 1 as short, id: 16 as short}]}), minecraft:iron_sword, minecraft:experience_bottle * 6, liquid:squidink, 32, 100);

I guess it not working because of GT using Paper allready in the printer. Try to change the recipe and maybe it works. Maybe try it with enchanted books to try if it works.

Changed paper to dirt to test it. It started to work but without needing to put the Charcoal Pit Igniter block into "stick" slot.

If thats the case that I can't use random item in "dataStick" slot and can't use same item input for all the books, then its a problem... because I am going to have multiple guide books (for every Multiblock machine in GT), where each is crafted in the Printer in the same way, only with different "dataStick" to say which book to create.

Is there anything you can do about it?

I think the data slot stick is not to be used in the process. This is something inside the GT api i guess and not sure i can add there anything. Why not making a Data stick with Charcoal Pit(NBT Tag) in the Assembler and adding it to a Book with the Datastick and papers?

In the Code the Printer recipes looks like this

public boolean addPrinterRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, int aDuration, int aEUt);

The special slot would be the Data stick

I check now how to add something to the gt Code make the Printer slot to a normal input slot.

Well Data Stick is but further down in progression so can't really use that. I also want the Controller block to not be used in crafting. So if there is no ways to make that work with Printer, I guess I will go and use the Assembler for this (Paper + controller (not consumed) + glue = guide book)

I try to add now a few lines of code to gt to make it working.

That would be awesome... Thanks :)

Sorry not got it to work atm because my java knowledge isn't that big. Maybe have to ask Blood Asp.
I can say you the line where you can add recipes by your self. Most of the recipes i using in my Pack i added by code directly into GT.
Are you having knowledge about java ?

I talked to Blood just few minutes ago. He said that the Printer recipes are hardcoded. So i guess I will stick with Assembler recipe then :)

Thanks a lot for trying, much appreciated