Conversation
|
This PR has pivoted a bit, since what mobs burn in daylight is now dependent on a tag and no longer hardcoded, I've opted to move the methods to the Mob interface and use TriStates. Because of that this now also covers zombie nautili and zombie horses, and allows entities that normally don't burn in daylight to do so. |
|
|
||
| @Override | ||
| public boolean burnsInDaylight() { | ||
| return this.getHandle().burnInDaylightOverride.toBooleanOrElse(this.getHandle().getType().is(EntityTypeTags.BURN_IN_DAYLIGHT)); |
There was a problem hiding this comment.
Should this method take the monsters burn environment into account?
There was a problem hiding this comment.
maybe another method for consider that? (in any case this need to be mention in docs?)
or a separate PR for checks environment values and refer to that
There was a problem hiding this comment.
I think that's fine as long as it's documented. There's already an upcoming environment attribute api for later. Maybe the method should be named canBurnsInDaylight or something too.
There was a problem hiding this comment.
Changed it to also check the environment attribute now, in my eyes this method is supposed to reliably answer "would this mob normally burn if it was exposed to daylight" which relies on the attribute as well.
I do like the current name already, canBurnsInDaylight sounds a bit too similar to isBedWorks for my liking.
This was likely broken in 1.21.11 with the addition of the burn_in_daylight entity tag, isSunSensitive is now unused by vanilla. This PR overrides the isSunBurnTick similar to how it's done for phantoms and skeletons already.