Spawners freezing randomly
Minecraft's Version
1.8.8
Plugin's Version
2022.6-b390 (I cant go to latest versions as it bugs out bosses from this report https://github.com/BG-Software-LLC/WildStacker/issues/736)
Describe the bug
Spawners randomly freeze on my server, I'm using SuperiorSkyblock. They only freeze (sometimes) when rejoining / leaving the island. I already tested if it was due to chunk loading but this is not the case. This happens as I have a custom collector plugin, so when you leave the chunk after a while the spawners just freeze randomly.
To Reproduce
Cant really reproduce unless you're on my server.
Additional Information
No response
Having the same issue!
We are too, maybe instead of closing my issue for being a "duplicate" actually investigate it. https://github.com/BG-Software-LLC/WildStacker/issues/744
We have the same issue on our server. It helped when we changed our ladders in the config to this:
ladders:
'1':
entities: []
default:
next-upgrade: coal
min-spawn-delay: 600
max-spawn-delay: 700
nearby-players: 16
max-nearby-entities: 6
The freezing still happens, but it's less common. I don't know what else there is to do about it. It happens when TPS is at 20 and we have no plugins that would decrease the tickrate on the server.
Freezing or ticks are delayed (aka, each tick takes more time than needed)?
Freezing or ticks are delayed (aka, each tick takes more time than needed)?
The spawners completely freeze, as you can see here https://imgur.com/ay2CWjP
Run /ws debug while looking at a frozen spawner, do you see any messages in console?
ws debug
It doesnt print anything in console when I do that looking at a frozen spawner
This means that the server does not tick the spawner at all, which makes me believe it is not a direct cause of WildStacker Are you able to replicate it on a server with only WS installed?
This means that the server does not tick the spawner at all, which makes me believe it is not a direct cause of WildStacker Are you able to replicate it on a server with only WS installed?
It doesnt happen with just WildStacker, but that is not the point. Its when the WildStacker API gets used it makes those freeze. As we have custom Chunk Collectors linked with WildStacker and its only when the API is used it makes them freeze.
This means that the server does not tick the spawner at all, which makes me believe it is not a direct cause of WildStacker Are you able to replicate it on a server with only WS installed?
It doesnt happen with just WildStacker, but that is not the point. Its when the WildStacker API gets used it makes those freeze. As we have custom Chunk Collectors linked with WildStacker and its only when the API is used it makes them freeze.
How is it used that causes it to freeze? Give me code snippet that triggers the bug.
This means that the server does not tick the spawner at all, which makes me believe it is not a direct cause of WildStacker Are you able to replicate it on a server with only WS installed?
It doesnt happen with just WildStacker, but that is not the point. Its when the WildStacker API gets used it makes those freeze. As we have custom Chunk Collectors linked with WildStacker and its only when the API is used it makes them freeze.
How is it used that causes it to freeze? Give me code snippet that triggers the bug.
Will get back to you ASAP, my dev is currently ill. So soon as they check Ill respond ASAP here.
Hello, the only piece of WildStacker API I'm using is the following:
` LivingEntity livingEntity = (LivingEntity) event.getEntity(); StackedEntity entity = WildStackerAPI.getStackedEntity(livingEntity);
Collector collector = plugin().getCollectorManager().getFromChunk(event.getLocation());
if (collector == null) return;
if (collector.getType() == CollectorType.INSTANT) {
plugin().getServer().getScheduler().runTaskAsynchronously(plugin(), () -> {
List<ItemStack> drops = entity.getDrops(0);
for (ItemStack drop : drops) {
if (!WorthManager.get().canPickup(drop.getType())) continue;
collector.add(drop.getType(), drop.getAmount());
}
});
entity.remove();`
This will not cause any spawner to freeze.
This will not cause any spawner to freeze.
It does, it only happens when that part of the code is used. If its not used then they dont freeze at all.
Any update on this? We have tested it with and without the API being in.
Any update on this? We have tested it with and without the API being in.
Its your code, debug it yourself. Might be because you remove the entity async, idk.
We have debugged, many times. We tried multiple different things and cannot seem to fix it. Can you possibly checkout the source code and help with this? It would really be appreciated.
We have debugged, many times. We tried multiple different things and cannot seem to fix it. Can you possibly checkout the source code and help with this? It would really be appreciated.
Comment out parts of the code until it doesn't occur anymore, so you can narrow down to the exact line that causes the issue.
Is this still relevant?
I have still encountered this issue multiple times. However, I don't use SuperiorSkyblock I have my own skyblock plugin. We don't use Wildstacker API either. We just have tons of tickets being made of spawners not working randomly (as in entities not spawning) and we fix it by breaking and placing the spawners back...
This means that the server does not tick the spawner at all, which makes me believe it is not a direct cause of WildStacker Are you able to replicate it on a server with only WS installed?
It doesnt happen with just WildStacker, but that is not the point. Its when the WildStacker API gets used it makes those freeze. As we have custom Chunk Collectors linked with WildStacker and its only when the API is used it makes them freeze.
.
Any news regarding this?
we have the same issue here but not when only ws i installed , if that can help its hapenning ONLY ON THE CHUNK where a player disconnect and the island get unlaoded for exemple if there is 4 spawners each one on a different chunk only the spawner on the chunk i logged out will not work anymore as explained on that screen
@meStormBits @Rhys00 @Rockin21 do you guys have CMI installed ? after sometesting installing CMI caused the issue to come back , currently i have the issue with only thoses plugins installed
https://github.com/BG-Software-LLC/WildStacker/assets/62488520/60d2e44d-e36a-48df-94a7-1538140e2310
as you can see it only spawns at the chunk outside of the one i disconnected, can replicate the bug constently
i dont know if my lasts 3 messages can help @OmerBenGera i'll let them repsond if they all have CMI, if yes we have found the issue if not i'll need to investigate further finding the plugin
After some testing I managed to get the bug without cmi so it has something to do with chunk loading as it happen only on chunk unload or load
another information , when disconnecting and reconnecting multiple times and the bug appear , all spawners inside the chunk i logged in and out are displaying this
spawners on other chunks are fine
@OmerBenGera i think that can help you this is exactly whats hapenning when the bug occur , as you can see on the video the time on spawner go well until it start going slower and then freeze check the end of video https://www.youtube.com/watch?v=uo__HdLY7qU
outsite of the test server , on prod it only says
but i am next to the sapwner