Railcraft

Railcraft

34M Downloads

Disabling ingots in the items.cfg file disables the Steel Forger villager career instead of using Thermal Foundation steel

TheDeviantCrafter opened this issue ยท 10 comments

commented

Description of the Bug
The item.cfg file allows you to disable certain items in the mod. I set this line to false: B:ingot=false

Doing so appears to have disabled the Steel Forger villager career. I spawned about 500 villagers and saw at least a dozen cartmen and trackmen, but no steel forgers.

I disabled the ingot to hopefully replace all of the ingots with their Thermal Foundation counterparts. This worked fine with recipes, but not villagers.

Also, it creates this message exactly 400 times:

I noticed this in my latest.log, which I assume is related to the bug. It popped up exactly 400 times according to Notepad++:

[20:11:06] [Client thread/WARN] [railcraft]: mods.railcraft.common.util.misc.Game$Logger.trace(Game.java:151)
[20:11:06] [Client thread/WARN] [railcraft]: mods.railcraft.common.worldgen.VillagerTrades$GenericTrade.func_190888_a(VillagerTrades.java:175)
[20:11:06] [Client thread/WARN] [railcraft]: jeresources.collection.TradeList.addITradeList(TradeList.java:65)
[20:11:06] [Client thread/WARN] [railcraft]: java.util.ArrayList.forEach(Unknown Source)
[20:11:06] [Client thread/WARN] [railcraft]: Tried to define invalid trade offer for (2xitem.emerald@0,1xtile.air@0)->1xtile.air@0, a necessary item was probably disabled. Skipping

To Reproduce

  1. Install Railcraft and Thermal Foundation
  2. Spawn villagers until a Steel Forger appears.
  3. In the items.cfg file, change B:ingot=true to B:ingot=false
  4. Repeat step two. No Steel Forger villagers should appear.

Expected behavior
I expected disabling disabling Railcraft's ingots to alter the villager trade to give another ingot with the same ore dictionary tag.

Instead, the villager career was disabled completely.

Logs & Environment

Additional context
Villagers don't support the ore dictionary, so the mod would need to choose one steel ingot if multiple mods add a steel ingot. I recommend adding a config option that lets you choose which mod to use for villager trades.

If you want to be comprehensive, you could let people supply a list of mods in the config. Any time a villager item is missing, it would look for an item with the same ore dictionary tag from this list. If multiple are available, it would pick the first one in the list. It would look something like this:

S: mods <
    thermalfoundation
    immersiveengineering
>

In this example, since both mods add steel, it would prioritize Thermal Foundation.

commented

I haven't tested it, but I suspect the same issue will happen if coal coke is removed. I plan to disable that item since the rest of my pack uses Thermal Foundation coal coke.

commented

I'm just going to say it. Railcraft expects railcraft's items to be present, not other mods.

There is no easy way for Railcraft to find and use the other mod's items.

The Ore Dictionary is not an item equivalency database, its a crafting equivalence database not suited for these uses in any way.

commented

@TheDeviantCrafter Steel forger is a career under the vanilla smith profession. You cannot find it if you are looking for blue overall villagers (trackman profession)

commented

Definitely something wrong with the logger for that though.

commented

Welp, I'm an idiot. I found the steel forger in about 20 seconds.

It looks like it removes the steel trade, but leaves the other trades intact. It's not ideal, but it's much closer to intended behavior.

commented

@liach Is it an issue with looking up the ore dictionary while the trades are being loaded? A config option that lets pack devs replace specific items with other items might be more practical.

commented

I marked this as an enhancement because our trade is bound to railcraft ingots for now. We can add oredict support for input/output.

commented

Swapping one item with another that has the same ore dict tag actually breaks the contract of the ore dictionary.

That's how you end up with dog poo cookies. Just because dog poo and cocoa are both "dyeBrown", doesn't mean you can make cookies with either.

commented

As a result, we need a reliable way to offer tweakable villager recipe generation (generation only, or it will break existing custom trades in maps!)

commented

That log error occurs any time a Railcraft villager is generated. I re-enabled Railcraft's items, plates and gears in the config and I still get that issue any time I fly by a village. It's a completely separate issue.