Guarmanda / LootChest

Plugin to reload chest with hologram, particles, and editing menu
GNU General Public License v3.0
9 stars 21 forks source link

Increase performance for hologram-less chests #61

Closed GorgeousOne closed 2 months ago

GorgeousOne commented 3 months ago

Hi, I am a plugin developer of a maze generator. I'm interested in working with your plugin to integrate loot chests into mazes. I've been experimenting with hooking into LootChest and spawning loot chests. However, while lookibg into your code, I noticed that LootChestHologram objects are created regardless of whether UseHologram is set to false in the config.

Would it be possible to modify the code so that hologram objects are actually only created when the setting is true? Running on my PC holoeasy is causing some performance issues when creating a hologram text (tested on a local server, 1.12). When multiple chests are spawned simultaneously, it leads to significant lag. It would be awesome if the performance for hologram-less chests could be improved.

Guarmanda commented 3 months ago

Well for the setting, you're totally right O_o yes it is easy to edit this. For the performances, it's weird, holoeasy only uses packets :/ Anyway it's the best api for me for now

Guarmanda commented 2 months ago

The useHologram parameter will now be used in setText function to block its action