CraftTweaker

CraftTweaker

151M Downloads

Mod interaction with Baubles: smelting iron no longer yields experience

lOmicronl opened this issue ยท 4 comments

commented

Issue Description:

If CraftTweaker and Baubles are installed, and a script is used, some weird interaction ends up deleting the experience output for smelting iron ore. Yes, only for iron ore. Other ores are unaffected.

If CraftTweaker alone is used, the issue does not appear. If Baubles alone is used, the issue does not appear. If both are present, but no scripts are loaded, the issue does not appear. All three need to be present to trigger it.

What happens:

When taking smelted iron ingots out of the furnace, you get the item and... that's it. No experience. I tried with 16 furnaces that each smelted 64 iron ore, multiple times. Zero experience.

What you expected to happen:

The furnace is supposed to reward the sum of (ingots)x0.7 points of experience to the player that takes iron ingots out of it, as per vanilla game mechanics.

Script used:

https://pastebin.com/A4SKDQ7T
Note: This is the specific, self-made script I am using in my small homebrew instance, but when discussing on Reddit, people have mentioned seeing this in large modpacks like Stoneblock and Project Gear.

crafttweaker.log file:

https://pastebin.com/DKhdGPWw
Note: The above script modifies recipes of the mod Food Expansion. To make sure that no distracting errors show up in the log about references to missing items, I had Food Expansion loaded when I recorded this log. However, the issue happens regardless of whether Food Expansion is loaded or not.


Affected Versions:

  • Minecraft: 1.12.2
  • Forge: 14.23.4.2760 (but I've also seen it in .2705)
  • Crafttweaker: 1.12-4.1.11
  • Baubles: 1.12-1.5.2
  • Using a server: No, this is singleplayer

Your most recent log file where the issue was present:

https://pastebin.com/vSVssxpk
This was me just loading into a superflat world, popping some iron ore into a few furnaces, waiting a few minutes, and taking out the resulting ingots.

commented

Then why do I get experience with CraftTweaker and the script loaded, but Baubles not loaded? I did test that case. That's the thing that makes this so strange.

commented

I have no idea what baubles has to do with this, but the way that the furnace works is that experience is based on the output, so if you made a furnace recipe that was smelt a nether star into an iron ingot that would give 5000 XP, all furnace recipes that output an iron ingot will give 5000 XP, it is just how the furnace works.

So in your script, you add a furnace recipe for an iron ingot that gives 0 XP, overriding what vanilla set.

commented

Case in point:

I reduced the script to a single line, namely "furnace.addRecipe(minecraft:iron_ingot * 2, minecraft:iron_door, 0.0);". According to what you said, I should now see no experience from smelting anything that results in iron ingots.

  • Loaded up my test world with only CraftTweaker installed. Tossed iron ore in one furnace, and several iron doors in another, to verify that the added recipe actually worked as intended. Upon removing the ingots from each furnace, I got experience. Yes, even for the ingots I got from the doors, despite the recipe not defining experience output.
  • Closed the game, activated Baubles, restarted the game, repeated the test. I now get zero XP from both furnaces.
  • Closed the game, deactivated Baubles, restarted the game, repeated the test. Once again I receive experience from both furnaces.
  • This can be repeated infinitely often.

So yes, Baubles does demonstrably have an effect here. The question is, what is the actual bug? If I was not supposed to receive experience after adding my custom door smelting recipe, then does the presence of Baubles actually fix something that wasn't supposed to happen? Maybe it is related to the load order of mods and/or recipes somehow?