[X] I have checked for existing issues, and have found none.
Tested latest version
[X] I have checked that this occurs on the latest version.
GregTech CEu Version
1.3.0
Recipe Viewer Installed
EMI
Environment
SSP
Cross-Mod Interaction
No
Other Installed Mods
n/a
Expected Behavior
Removing veins should remove them.
Actual Behavior
Removed veins reappear.
Steps to Reproduce
1) GTCEuServerEvents.oreVeins(event => { event.removeAll(); })
2) Notice tthat veins are very much not removed
Additional Information
Commit efa865297b4cf153dbe2213080defe163863aeb6 introduced ore vein synch packets, including a log-out handler that restores the default registries (presumably, to prevent cross-contamination from playing on servers).
For insane mojang reasons, when the integrated server starts up, it fires a logout event after loading all data. This is then fed to the client, which will immediately re-call GTOres.init() and overwrite any changes or removals to the built-in ore veins. Oops. This behaviour is more apparant when you do a /reload in game too.
I don't think this logout handler actually does anything because registries are always unconditionally overwritten by either data loading (for the integrated server) or by the ore vein synch packet (for clients connected to a multiplayer server), so the easiest solution is to just delete the logout event handler.
Checked for existing issues
Tested latest version
GregTech CEu Version
1.3.0
Recipe Viewer Installed
EMI
Environment
SSP
Cross-Mod Interaction
No
Other Installed Mods
n/a
Expected Behavior
Removing veins should remove them.
Actual Behavior
Removed veins reappear.
Steps to Reproduce
1)
GTCEuServerEvents.oreVeins(event => { event.removeAll(); })
2) Notice tthat veins are very much not removedAdditional Information
Commit efa865297b4cf153dbe2213080defe163863aeb6 introduced ore vein synch packets, including a log-out handler that restores the default registries (presumably, to prevent cross-contamination from playing on servers).
For insane mojang reasons, when the integrated server starts up, it fires a logout event after loading all data. This is then fed to the client, which will immediately re-call
GTOres.init()
and overwrite any changes or removals to the built-in ore veins. Oops. This behaviour is more apparant when you do a/reload
in game too.I don't think this logout handler actually does anything because registries are always unconditionally overwritten by either data loading (for the integrated server) or by the ore vein synch packet (for clients connected to a multiplayer server), so the easiest solution is to just delete the logout event handler.