#entity not attacking?
1 messages · Page 1 of 1 (latest)
You have to order the priorities, first target, second attack, third random stroll, fourth look player and fifth random look, the number does not matter, they just have to be in that position
oh shit i didnt know that
ill give it a try
}, "minecraft:behavior.nearest_attackable_target": { "priority": 3, "entity_types": [ { "filters": { "all_of": [ { "test": "is_family", "subject": "other", "value": "player" }, { "test": "is_moving", "subject": "other", "operator": "==", "value": true }, { "test": "is_immobile", "subject": "other", "operator": "==", "value": false } ] } } ] }, "minecraft:behavior.delayed_attack": { "priority": 3, "speed_multiplier": 0.6 }, "minecraft:behavior.random_stroll": { "priority": 1, "speed_multiplier": 0.4 }, "minecraft:movement": { "value": 0.4 }, "minecraft:attack": { "damage": 25 }, "minecraft:pushable": {}, "minecraft:movement.generic": {} }, "adult1": { "minecraft:variant": { "value": 0 } }, "adult2": { "minecraft:variant": { "value": 1 } } }, "components": { "minecraft:type_family": { "family": [ "dinosaur", "animal", "mob", "tyrannosaurus" ] }, "minecraft:breathable": { "total_supply": 15, "suffocate_time": 0, "breathes_water": true }, "minecraft:hurt_on_condition": { "damage_conditions": [ { "filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true }, "cause": "lava", "damage_per_tick": 1 } ] }, "minecraft:jump.static": {}, "minecraft:behavior.float": {}, "minecraft:can_climb": {}, "minecraft:nameable": {}, "minecraft:behavior.look_at_player": { "priority": 2, "look_distance": 8 }, "minecraft:behavior.random_look_around": { "priority": 1
here's what i did
still doesnt seem to work
you said the priority numbers didnt matter right?
Hmm. I really don't know how to explain it, but in fact it is important that this order is in the numbers, not in the position of the components.
I mean the target component can be 0,1,2,3,4 or 5, but then melee attack would have to be greater than that number
oh sorry i must’ve misunderstood what you were saying
They do not need to be in consecutive order.
Nah, I explained it very badly XD
ya i dont think im understanding 😅
yeah you can start from the number you want, that's why I told you that it doesn't matter, but you must respect the order of priorities
the numbers
I recommend starting with a number greater than 2, since you may need other priorities that require position 0 and 1.
nearest target = 3
delayed = 4
random = 5
look at player = 6
random look = 7
yeah
I should have said it like that XD
Take priorities into account, for example your entity will probably not attack if melee attack is before target. First you need your entity to detect its target to be able to attack, you must also place the random components at the end, because if you place them before your entity will move randomly and will never detect or attack
yeah, it looks good
alright i’ll give it a shot
You are also using delayed attack, do you intend for it to have a delayed attack?
yes
ok you need to adjust the times
ah ok
you haven't added the movement component
"minecraft:navigation.walk": {
"can_walk": true
},