#visually disambiguate breedable entities

1 messages · Page 1 of 1 (latest)

naive cairnBOT
#
effect clear @e[type=minecraft:chicken, distance=..20, nbt=!{Age: 0, InLove: 0}, nbt={active_effects: [{id: 'minecraft:glowing'}]}] minecraft:glowing

effect give @e[type=minecraft:chicken, distance=..20, nbt={Age: 0, InLove: 0}, nbt=!{active_effects: [{id: 'minecraft:glowing'}]}] minecraft:glowing infinite 0 true

those commands are currently being used in two separate [repeating] command blocks, and work as expected; I what I need help with is to do it properly...

for instance, I'm unsure whether the InLove NBT property is required in both selectors.
and maybe avoid calling these, every tick--perhaps using a condition to evaluate the entities first, and if there's a match; only then apply the effect command.

as an aside, if you have better alternatives; your suggestions are welcome!

flat lava
#

You should definitely try to not run NBT checks every tick, they're very expensive.

Regardless of frequency, you don't need to do the check twice. You can check it once and run a function as that entity if the check succeeds, which can then apply the effects. You can also precede the effect commands with execute if predicate and use a predicate to check if they do or don't already have the effect.

flat lava
#

Realms do support data packs

dense magnet
#

Also chicken can be bred again after 5 minutes so you can make the glowing effect last 5 minutes and you don't have to worry about removing the effect

acoustic basaltBOT