Enigmatic Legacy

Enigmatic Legacy

10M Downloads

Stats get registered under the minecraft resource key

JustRed23 opened this issue ยท 1 comments

commented

Versions (Be specific, do not write "latest"):

  • Enigmatic Legacy: 1.18.2-2.25.0
  • Curios API: 1.18.2-5.0.7.1
  • Patchouli: 1.18.2-71.1
  • Forge: 1.18.2-40.2.0

Description of a Bug:

Stats get added to the minecraft: namespace. I am working on a mod that looks for ResourceLocations in the registry that do not belong to the minecraft namespace. Your stats (ex. 'play_time_with_seven_curses' (EnigmaticLegacy:L678)) get registered under the minecraft: namespace. See image

A better way of doing this would be by passing the ResourceLocation two times during register.
Right now you are using register(Registry, String, ResourceLocation) but register(Registry, ResourceLocation, ResourceLocation) would be better for this.

How to Reproduce:

  1. Boot up the server
  2. Wait for the message '[Enigmatic Legacy/INFO]: Registering stats...'
  3. Have a mod that loops through all ResourceLocations in Registry.CUSTOM_STAT and prints them to the console
  4. Behold!

Logs:

Crash Log:
latest.log

commented

I made a pull request with the fix #405 i have tested on magma and forge and nothing seems to be broken,awaiting Aizistral