BuildCraft|Core

BuildCraft|Core

7M Downloads

The paintbrush doesn't have a recipe

AlexIIL opened this issue ยท 3 comments

commented

It looks like this was lost in the 1.12 port, and was never moved over to JSON. I think we'll come back to JSON recipes in 1.13 when we have a proper (sane) system for making colouring recipes in a single file rather than 16 different ones.

For now all this means is that someone needs to move this function:

public class BCCoreRecipes {
public static void init() {
//TODO: define these in json
/*
if (BCItems.CORE_PAINTBRUSH != null) {
ItemStack cleanPaintbrush = new ItemStack(BCItems.CORE_PAINTBRUSH);
Object[] input = { " iw", " gi", "s ", 's', "stickWood", 'g', "gearWood", 'w', new ItemStack(Blocks.WOOL,
1, 0), 'i', Items.STRING };
Converter.addShapedRecipe(cleanPaintbrush, input);
for (EnumDyeColor colour : EnumDyeColor.values()) {
ItemPaintbrush_BC8.Brush brush = BCCoreItems.PAINTBRUSH.new Brush(colour);
ItemStack out = brush.save();
//GameRegistry.addRecipe(new ShapelessOreRecipe(out, cleanPaintbrush, ColourUtil.getDyeName(colour)));
}
}
if (BCItems.CORE_LIST != null) {
if (BCBlocks.SILICON_TABLE_ASSEMBLY != null) {
long mjCost = 2_000 * MjAPI.MJ;
ImmutableSet<StackDefinition> required = ImmutableSet.of(//
ArrayStackFilter.definition(8, Items.PAPER),//
OreStackFilter.definition(ColourUtil.getDyeName(EnumDyeColor.GREEN)),//
OreStackFilter.definition("dustRedstone")//
);
BuildcraftRecipeRegistry.assemblyRecipes.addRecipe(new AssemblyRecipe("list", mjCost, required,
new ItemStack(BCItems.CORE_LIST)));
} else {
//handled in JSON
}
}
if (BCBlocks.CORE_DECORATED != null) {
RecipeBuilderShaped builder = new RecipeBuilderShaped();
builder.add("sss");
builder.add("scs");
builder.add("sss");
if (BCItems.BUILDERS_SNAPSHOT != null) {
builder.map('s', "stone");
builder.map('c', new ItemStack(BCItems.BUILDERS_SNAPSHOT, 1, 2));
builder.setResult(new ItemStack(BCBlocks.CORE_DECORATED, 16, EnumDecoratedBlock.BLUEPRINT.ordinal()));
builder.register();
builder.map('c', new ItemStack(BCItems.BUILDERS_SNAPSHOT, 1, 0));
builder.setResult(new ItemStack(BCBlocks.CORE_DECORATED, 16, EnumDecoratedBlock.TEMPLATE.ordinal()));
builder.register();
}
builder.map('s', Blocks.OBSIDIAN);
builder.map('c', Blocks.REDSTONE_BLOCK);
builder.setResult(new ItemStack(BCBlocks.CORE_DECORATED, 32, EnumDecoratedBlock.LASER_BACK.ordinal()));
builder.register();
}
*/
}
}
into an event handler like this:

@SubscribeEvent
public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
    // Code goes here
}
commented

Duplicate of #4149 .

How did I miss that????

commented

Vanilla and Forge encourage generation of recipe JSON via code. 1.13 will ship the generators and stuff that vanilla uses.

commented

Maybe we get some saner stuff then ;)