Hi all,
I made a mobgen skript that works fine until you put the gen under the water.
Normally the gen requires players to be sneaking to remove the gen so they dont remove it accidentally, however when the gen is under the water it allows them to break it as for some reason in "On block break" events, it counts the water as the target block/event-block rather than the block actually being broken.
I have fixed this by doing the following code:
on block break:
if target block is flowing water or stationary water:
...
....
This fixes the issue in most cases, but it doesnt fix it if you break the block through a waterfall.
So i was hoping there was a "if target block is falling water", however this is not a thing. I have also tried doing water[falling=true] or flowing water[falling=true] but all do not exist.
How do i detect falling water so i can stop people from breaking the gens through it and just getting a normal block back?
Or, is there a way to just say if the target block is any kind of water?
(This works and player is not able to just break the block without removing the water)
(This does not work and player is able to break the block)
I made a mobgen skript that works fine until you put the gen under the water.
Normally the gen requires players to be sneaking to remove the gen so they dont remove it accidentally, however when the gen is under the water it allows them to break it as for some reason in "On block break" events, it counts the water as the target block/event-block rather than the block actually being broken.
I have fixed this by doing the following code:
on block break:
if target block is flowing water or stationary water:
...
....
This fixes the issue in most cases, but it doesnt fix it if you break the block through a waterfall.
So i was hoping there was a "if target block is falling water", however this is not a thing. I have also tried doing water[falling=true] or flowing water[falling=true] but all do not exist.
How do i detect falling water so i can stop people from breaking the gens through it and just getting a normal block back?
Or, is there a way to just say if the target block is any kind of water?
(This works and player is not able to just break the block without removing the water)
(This does not work and player is able to break the block)