Botania Tweaks

Botania Tweaks

3M Downloads

Agglomeration Plate custom recipe not showing up in JEI

Xavion3 opened this issue · 10 comments

commented

As per title, added a custom agglomeration plate recipe, would not show up in JEI. The recipe in question, I also tried adding it via multiblock then recipe, as I do add a lexicon page for it and that does work fine.

Agglomeration.addRecipe(<appliedenergistics2:tiny_tnt>, [<botania:manaresource:23> * 2, <minecraft:gunpowder> * 2, <minecraft:sand> * 2], 1600, 0xCCCCCC, 0xFF0000, <gregtech:compressed_14:15>, <minecraft:sand>, <gregtech:compressed_14:15>, null, null, null);

That is the recipe in question, although I have converted variables back to the original items they refer to.

commented

ok this is fixed pretty sure

commented

Do you see any errors from JEI or btweaks in the console?

The agglomeration stuff is fairly shaky code right now. You can pretty much only add things to the multiblock that also have item forms, even though that shouldn't really be a restriction. It was made before CraftTweaker had good support for blockstates; I've heard it does now, but haven't looked at it yet.

I'm guessing it's because it's not sure how to convert whatever gregtech:compressed_14:15 is to a block.

commented

Note to self: report of this happening to floramancer with this recipe

# globalVars.zs
global creativeManaTablet as IItemStack =  <botania:manatablet>.withTag({mana: 500000, creative: 1 as byte});

# botania.zs
Agglomeration.addRecipe(
	<contenttweaker:tinygalacticpotato>,
	[<botania:gaiahead>, creativeManaTablet, <botania_tweaks:compressed_tiny_potato_8>] as IIngredient[],
	24000000,
	0x00FF00,
	0x0000FF,
	<botania:pool:3>,
	<botania:enchantedsoil>,
	<botania:enchantedsoil>,
	<botania:pool:1>,
	<botania:altgrass>,
	<botania:altgrass>);

link 2 https://github.com/lucidobservor/floramancer-modpack/tree/master/overrides/scripts

commented

I'm loathe to open a new issue as I realise it's some type of conflict with my modpack, but are there any known things/mods/etc that prevent Agglomeration recipes registered via CraftTweaker from being registered before BotaniaTweak's JEI plugin fires? I've tested it via IDEA and in an environment with just a few of the mods, it functions perfectly.

The actual recipes themselves (including the new default recipe) function correctly, but the new terrasteel and terrasteel block recipes do not appear in BotaniaTweaks' JEI. I don't see anything in the config to indicate that I may have caused an issue, I'll eventually set up the test environment with all of the config, scripts and mods from my pack and do more thorough work, but I thought I'd ask if there were any known problems with mods interfering, etc.

commented

None that I know of. If I knew I'd probably have fixed it by now. :P

commented

I've filed a pull request which I believe will solve my issue and potentially the issue of the opener of this ticket.

commented

Thanks for the reminder; I'll take a look pretty soon, a bit busy and sick lately 😵

commented

I wrote a comment and was like "Hm, I won't bother commenting" then never closed the tab and then I was like "oh I forgot to post this comment". So... yeah. Not deliberately trying to be passive-aggressive!

commented

Yeah, I'm not entirely sure what's happening, but from what I can see (having added some timestamps to CraftTweaker's logging systems):

[20:14:37] [main/INFO]: Starting JEI took 44.69 s
20:14:37 [AVAILABLE][CLIENT][INFO] Adding an agglomeration recipe: AgglomerationRecipe{recipeStacks=[], recipeOreKeys=[quicksilver, ingotManasteel, gemAquamarine, ingotThaumium], recipeOutput=1xitem.manaResource@4, manaCost=500000, color1=255, color2=65280, multiblockCenter=botania:livingrock[variant=default], multiblockEdge=minecraft:lapis_block, multiblockCorner=botania:livingrock[variant=default], multiblockCenterReplace=null, multiblockEdgeReplace=null, multiblockCornerReplace=null, totalInputs=4}
20:14:37 [AVAILABLE][CLIENT][INFO] Adding an agglomeration recipe: AgglomerationRecipe{recipeStacks=[1xtile.storage@0], recipeOreKeys=[quicksilver, blockThaumium, gemAquamarine], recipeOutput=1xtile.storage@1, manaCost=4500000, color1=255, color2=65280, multiblockCenter=botania:livingrock[variant=default], multiblockEdge=minecraft:lapis_block, multiblockCorner=botania:livingrock[variant=default], multiblockCenterReplace=null, multiblockEdgeReplace=null, multiblockCornerReplace=null, totalInputs=4}
20:14:37 [AVAILABLE][CLIENT][INFO] Removing an agglomeration recipe: AgglomerationRecipe{recipeStacks=[1xitem.manaResource@2, 1xitem.manaResource@0, 1xitem.manaResource@1], recipeOreKeys=[], recipeOutput=1xitem.manaResource@4, manaCost=500000, color1=255, color2=65280, multiblockCenter=botania:livingrock[variant=default], multiblockEdge=minecraft:lapis_block, multiblockCorner=botania:livingrock[variant=default], multiblockCenterReplace=null, multiblockEdgeReplace=null, multiblockCornerReplace=null, totalInputs=3}

It seems that, for whatever reason, CraftTweaker's not processing the BotaniaTweaks code until after JEI is loaded -- whereas every other entry for CraftTweaker/ModTweaker's changes is well, well before it.... I'll investigate more and, if I identify what the issue is, I'll provide as much information as possible.

commented

Looking further into the source, you're triggering your _ACTIONS at loadComplete, whereas CraftTweaker is triggering them at postInit -- I'm not sure if you have a specific reason for doing this, but I'm going to assume that the difference makes it into a bit of a race condition that functions properly with only a few mods loaded but fails at other times. I'll do more testing and compile a version using postInit to see if that solves the issue.