Rosewood-Development / RoseStacker

A next-generation stacker plugin for Spigot and Paper servers
Other
139 stars 36 forks source link

Add config option to not affect spawner settings #20

Closed Nubebuster closed 3 years ago

Nubebuster commented 3 years ago

I want to make a custom spawner upgrade system. Unfortunately, rosestacker changes the spawner values even if you dont configure any. Could you add a condig option for disabling changing spawner values if the config setting for a specific spawner is set to -1?

The problem occurs on these lines: https://github.com/Rosewood-Development/RoseStacker/blob/140263db59709a3e2c8795bf213ab78af3a1d997/Plugin/src/main/java/dev/rosewood/rosestacker/stack/StackedSpawner.java#L174-L177

Since the spawner settings are not changable for individual creaturespawners I cannot use the API to change the spawner settings on a specific block to my liking.

Alternatively it would be even better if you add support for changing these values per spawner. But that requires databasing etc.

Nubebuster commented 3 years ago

Not sure how the spawner GUI works, but if the spawner stats menu isn't spawner specific yet, that should also be made spawner specific.

Esophose commented 3 years ago

Could you add a condig option for disabling changing spawner values if the config setting for a specific spawner is set to -1?

I think this is a great idea, will add shortly.

Not sure how the spawner GUI works, but if the spawner stats menu isn't spawner specific yet, that should also be made spawner specific.

The spawner GUI is already spawner specific I withdraw this statement actually, I now realize what you meant and I'll get that updated to use the live spawner stats instead, thanks for bringing that up.

Nubebuster commented 3 years ago

Alternatively it would be even better if you add support for changing these values per spawner. But that requires databasing etc.

That actually wouldn't require databasing since the data for the spawners is stored in the spawner block by minecraft itself. Moreover, if you add the main feature I am requesting here, then the rosestacker api wouldn't even be needed to allow this. This can then be done from spigot's api directly. Thus requiring to display the live spawner stats indeed.

Esophose commented 3 years ago

I'm having a bit of trouble deciding how to handle the spawn counts. Usually they're done entirely through config values and not part of the spawner at all, if the spawn count is set to -1 would you want it to just use the spawner's spawn count setting, or the custom one through RoseStacker's config?

Edit: Also due to the way that the max nearby entities check works, that setting won't be able to pull from the tile entity. Hopefully that isn't something you were planning to allow customizing.

Edit 2: Decided to just use the tile's spawn count if the spawn-count-stack-size-multiplier value is set to -1

Esophose commented 3 years ago

Added in 350b06b3904e489b655d0bf15c9198f762703b6b, will be released in the v1.2.7 update hopefully within the next 24 hours.