Mobs inside a region cannot ignite
LadyCailinBot opened this issue ยท 10 comments
WORLDGUARD-3758 - Reported by Enatras
After this patch:
It is no more possible to set fire to cows and other mobs within the own region. The event is canceled.
Comment by wizjany
don't really understand what behavior changed due to that commit...going to need to do testing or something.
to be clear, how do you reproduce this? also does setting damage-animals to allow fix this? i have a feeling whatever they did broke our ability to check if a player (region member/owner) caused the fire...
Comment by Enatras
Before that commit, EntityCombustEvent.setCancelled(true) does not cancel the event. After that commit, it should be fixed. So my idea was, that WG always canceled that event, but it's noticeable since that commit. I'll try damage-animals and give here some feedback.
This was the spigot issue: https://hub.spigotmc.org/jira/browse/SPIGOT-2653
Comment by Enatras
Yes, thanks.
Adding damage-animals allow to global fixed this.
You can choose: Change something in the default behavior of protections or just close this issue.
Thanks wizjany :)
Comment by wizjany
i'll leave this open in case i get time to look into it. ideally we should be able to check if the person setting the animal on fire is allowed to, and cancel it conditionally, but that might not be possible
Comment by Enatras
Ok, damage-animals is NO GOOD SOLUTION!
Because every player now can damage passive mobs, even if not a member or owner of a region...
Very sad :(
Comment by wizjany
how exactly do you go about setting animals on fire? from what i can see in the code, the cause data (i.e. the information telling us who set what on fire) is forwarded correctly, so the protection mechanisms should work exactly the same if you punch a cow vs if you click it with a lighter.
of course, that assumes that the events spigot is throwing us have that data correctly...
Comment by Enatras
Players are trying to ignite the cows by placing lava for a small time into the cow (on their own region). That's why cows should take fire and burn to death and drop cooked beef. But they don't take fire, if damage-animals is not set to allow.
Comment by wizjany
er ok yea i just double-checked with spigot and that code change isn't even related to a player setting an animal on fire, so there is no player associated with that event, cancellable or not.
that change only works with EntityCombustByBlockEvent, not EntityCombustByEntityEvent
after the player places the lava, there is no correspondence between the lava and the player anymore
Comment by Enatras
Oh okay, I didn't know that there are 2 events. Is this fixable in any way? Because damage-animals leads to griefing by killing passive mobs on protected regions.
I guess this would be a new configuration setting... block-mob-ignite. Setting this to allow would allow to take fire because of a lava block. Placing a lava block is only available for players that are members / owners of that region, so that would be no risk.