Crash when crafting with TFC tools on primaltech's workstumps
ChaosTheLegend opened this issue ยท 5 comments
Description:
I tried to craft a TFC sandwich on primaltech's workstump
the game crashed, world got corrupted...
upon further inspection, crash happens every time someone tries to craft something on workstump(both tiers) with TFC tool in the recipe
crash does not happen with tools from other mods(tested with Immersive engineering)
To Reproduce:
- Craft anything involving a TFC tool in the recipe on a workstump
Modpack:
custom pack with 40-ish mods
TFC version - 1.7.6.164
primaltech version - 0.3.5
Log:
latest.log
Crash report:
crash-2020-10-28_07.35.53-server.txt
If you want to re-enter your world, you can go to config/forge.cfg
and flip removeErroringTileEntities=false
to true
.
I believe I know what's happening here:
In vanilla, calling CraftingManger#getRemainingItems
is done in exactly one place, and it is guarded by two forge hooks:
net.minecraftforge.common.ForgeHooks.setCraftingPlayer(thePlayer);
NonNullList<ItemStack> nonnulllist = CraftingManager.getRemainingItems(this.craftMatrix, thePlayer.world);
net.minecraftforge.common.ForgeHooks.setCraftingPlayer(null);
Resulting in the fact that ForgeHooks.getCraftingPlayer()
is not null during the process of getting the remaining items. TFC's shapeless damage recipe uses this fact - damaging items requires access to a player (e.g. to test if the player is in creative mode).
In Primal Tech, it calls CraftingManager.getRemainingItems
without setting the crafting player at all, and moreover, does not seem to have any access to a player at the point where this is called. So while I strongly think this is their issue and should be resolved as such, we can also assume that other modders may not properly handle the crafting player and also screw this up.
So:
- Please also report this to primal tech with the description above of what they should be doing to set the crafting player.
- We'll need to add null checks to everything that uses this method I guess.
I fixed the world by removing and reinstalling primaltech. Few items got deleted, but I'm not playing seriously anyways, so not a big deal