SonarSonic / Practical-Logistics-2

All things data - Minecraft Forge Mod
MIT License
18 stars 9 forks source link

[1.12.2] Crafttweaker integration broke again #74

Closed MineWitherMC closed 5 years ago

MineWitherMC commented 6 years ago

Hello! I'm trying to add CT recipe for Forging Hammer like following:

import mods.logistics.hammer as Forging;
Forging.addRecipe(ingot_tempered * 8, item_elemental_core);

(these are global variables) and I get this error:

ERROR: no such member: hammer

I'm using Forge-14.23.4.2759, CraftTweaker2-1.12.2-4.1.9, SonarCore-1.12.2-5.0.16-16 and practicallogistics2-1.12.2-3.0.4.

ghost commented 5 years ago

This just started to show up on me as well even on the new version of forge

@SonarSonic

justinrusso commented 5 years ago

I'm getting [CHAT] ERROR: system: hammer is already defined in that package.

This looks to be caused by the Hammer class being registered twice to CraftTweaker. Prior to 3.0.5, the issue was as mentioned above, and was caused by the hammer class being registered far too late for anything done in CraftTweaker. Adding the @ZenRegister annotation will register it at the proper time now, but its also being registered later during postLoad https://github.com/SonarSonic/Practical-Logistics-2/blob/37f8e055c54638736a1b70cdbecea632e5d3060b/src/main/java/sonar/logistics/PL2.java#L115

I would recommend removing https://github.com/SonarSonic/Practical-Logistics-2/blob/37f8e055c54638736a1b70cdbecea632e5d3060b/src/main/java/sonar/logistics/PL2.java#L114-L117 as well as https://github.com/SonarSonic/Practical-Logistics-2/blob/37f8e055c54638736a1b70cdbecea632e5d3060b/src/main/java/sonar/logistics/integration/minetweaker/CraftTweakerIntegration.java#L24

Sunekaer commented 5 years ago

Hey

Im also having this issue with "[CHAT] ERROR: system: hammer is already defined in that package"

SonarSonic commented 5 years ago

Fixed in dev