Bees never lose their effects or reduce the effect duration while inside a bee nest or beehive
This relates to MC-166135, which was acknowledged as a valid issue and subsequently fixed. If a bee has an effect, the remaining duration does not decrease while the bee is inside a bee nest or beehive.
Steps to reproduce
- Place a bee nest or beehive
/weather rain
/summon bee ~ ~ ~ {Tags:["bugtest"],active_effects:[{id:"minecraft:fire_resistance",amplifier:0,duration:200}]}- Wait 10 seconds
- Set the bee nest on fire to make the bee leave the nest
/data get entity @e[type=minecraft:bee,tag=bugtest,limit=1] active_effects
Observed result: The bee still has the fire resistance effect even though it was spawned over 10 seconds ago.
Expected result: The bee should no longer have the effect.
How to fix
Similar to the fix for MC-166135, use the `ticks_in_hive` NBT tag to calculate the remaining duration of the effect on the bee when it leaves the nest, similar to the Age NBT tag.