Open IAISI opened 8 months ago
I'm not sure on implementing anything like this in Sakura. There are alternatives such as allowing spawners to blow up while watered which would be less intensive than looking for spawners or sponges on water flow, and plugins could check if there are any tile entities in the adjacent chunks before looking for spawners in the radius as an optimisation.
Performance would depend on radius that would be checked? I think at least some of the blocks are already checked in
public abstract class FlowingFluid extends Fluid
tho only 1 block at the time...
Similar patch was added for sponge blocks in blossom: https://github.com/Samsuik/Blossom/blob/8779d5efcd74b034e0d3730ac30da29791cc52bd/patches/server/0118-Customise-Sponge-Mechanics.patch
essentially what I was suggesting was doing same mechanics but for spawners, but I could see how performance would be an issue. I guess it would be nice idea but not really doable efficiently...
On factions server players often water spawers to make them hard to raid, while preventing liquid flow/placement near spawners could be done with plugins, performance usually isn't great, it's been awhile since I've really messed with custom .jars aside from editing a few minor things here and there, but I figured this would be good suggestion.
Something like min-range with 0 resulting in vanilla behavior, 1 blocking liquids 1 block around spawner, 2 in 2 blocks and so on... should also check diagonal blocks, possibly with option to ignore blocks below the spawner (probably not worth the hassle tho).