wisp-forest / accessories

A extendable and data-driven Accessory Mod for Minecraft
Other
28 stars 10 forks source link

Fix repeated logger creation #104

Closed Kneelawk closed 2 weeks ago

Kneelawk commented 3 weeks ago

This PR

This PR prevents new loggers from being created for each instance of AccessoryAttributeBuilder, by making the logger static.

The Issue

AccessoryAttributeBuilder is created multiple times each time AccessoriesEventHandler.onLivingEntityTick() is called. This means that the logger was re-created multiple times for each player for each tick.

Testing

This fix has been tested on my server and seems to have fixed some of the server-lag issues we were experiencing.

Dragon-Seeker commented 3 weeks ago

🤦‍♂️ Whoops sorry about this issue... thanks for catching this, I will see about pulling this in tomorrow and making a release for such.