PurpurMC / Purpur

Purpur is a drop-in replacement for Paper servers designed for configurability, and new fun and exciting gameplay features.
https://purpurmc.org
MIT License
2.02k stars 358 forks source link

TPS drop due to frequent use of sculk sensor #1494

Closed Tioplaya closed 7 months ago

Tioplaya commented 7 months ago

Spark link

https://spark.lucko.me/1o6fahHUXy

Description of issue

put a large amount of sculk sensor (I put 11,0000) and just start aggressively breaking them with double or triple click of the. more details: https://youtu.be/4NgM4lO03ZA

Purpur version

[13:35:16 INFO]: Checking version, please wait... [13:35:16 INFO]: Current: git-Purpur-2149 (MC: 1.20.4)* Previous: git-Purpur-2148 (MC: 1.20.4)

Agreements

Other

please add option to limit work sculk sensor on a chunk

Tioplaya commented 7 months ago

and sculk_shrieker also (the maximum tick increases after walking on sculk shrieker's) 2024-02-20_18 20 06

granny commented 7 months ago

Not really sure what to say other than "don't do that". With the way sculk sensors work it's pretty much understood that having a ton of them close together like that would cause lag. Same with the sculk shriekers.

What outcome are you looking for? What exactly would the "limit work sculk sensor" option do?

Tioplaya commented 7 months ago

sooner or later this can be abused by players. I want this parameter to limit how much sculk sensor's and sculk shrieker's will work on one chunk. example: player place 50 sculk sensor's, but work only 10 and display warn message to player of limit if player use sculk sensor on number 11

granny commented 7 months ago

Would be better as a plugin. This can be done through cancelling the BlockReceiveGameEvent event.