#Entities General
1 messages · Page 12 of 1
"minecraft:can_power_jump": {},
"minecraft:input_ground_controlled": {},
"minecraft:movement": { "value": 0.0 },
"minecraft:horse.jump_strength": { "value": 0.0 },
this achives what i want but the entity still moves
Still
If you want the player to stay completely still you can use a command
inputpermission set @p movement disabled
ah, are you avoiding using commands?
can you try to take control away from the rider?
maybe changing controlling_seat to 1
bro, that's not possible, I've tried it and it works
Did you tried it by minecraft:totem_of_undying
I think i have to try again
yes
it shows a lot of messages and before player die
does that prevent the passenger from leaving by pressing jump?
You need to return the state to default, (0.1) does not work, try using q.health>2
I don't know, that just indicates that the rider who has control is 1, and only seat 0 is available, maybe it works, but I recommend you use the command
i understand the concept
Like this?
It only works once
Its okey thxx
Guys, is there a way to force a player to walk towards a specific entity? I've added this components in player.json and a new event that adds this component group, but when the entity spawns, the player won't walk towards it. Is it possible?
"minecraft:behavior.melee_attack": {
"require_complete_path": true
},
"minecraft:behavior.nearest_attackable_target": {
"priority": 10,
"must_see": false,
"reselect_targets": true,
"within_radius": 64.0,
"entity_types": [
{
"filters": {
"test": "is_family",
"subject": "other",
"operator": "==",
"value": "cinematic_marker"
},
"max_dist": 64.0,
"must_see": false
}
]
}
}```
Oh it's goal component thanks a lot
have you tried forcing knockback via scripting?
Don't know how to do that 😕
Those components only work on mobs, you can create a custom mob and have the player follow it with tp or ride
So I create a custom mob that moves to the point I want the player to move, and have like a repeating command block with a /tp @p @e[family=X] or something like that?
anyone got any idea how I can scale down my baby model?
It seems that you are trying to add a group of components inside "components"
oh, that makes sense
how can I give my entity a different model and texture when its a baby with query.is_baby
cause they do breed right now but the adult model comes out
and it doesnt scale down
you should check pig.json, or any other animal that has its baby phase
thanks
I’ve looked at it but just can’t seem to figure it out , would you mind if I dm you my codes and you looking into it ?
why could it not be valid? outdated? do I need to enable something?
Can you send your file?
here is the file
it works when in 1.10
but when I change it to 1.18 or 1.20 it no longer works properly
here is the whole entity file
It's because you have a colon in must_see. Replace "must_see:":false with "must_see":false
Easy mistake to make, happens to all of us
DANG
fixed it but still doesn't work tho...
Same log error?
no log error but it doesn't attack entities
on format version 1.10 it attacks
where is the docs for "minecraft:movement"? can't find it in the entity component list
Doesn't seem to he docs on just movement, only the subsets
Make sure the filters are right I guess?
yeah
can't create a thread in #1067869022273667152
the thread wasn't even created
{
"format_version": "1.16.0",
"minecraft:entity": {
"description": {
"identifier": "remnant:flying_sword",
"is_summonable": true,
"is_spawnable": true
},
"components": {
"minecraft:collision_box": {
"width": 0.625,
"height": 1
},
"minecraft:health": {
"value": 10,
"max": 10
},
"minecraft:movement": {
"value": 0.3
},
"minecraft:attack": {
"damage": 2
},
"minecraft:navigation.hover": {
"can_path_over_water": true,
"can_path_from_air": true,
"avoid_damage_blocks": true
},
"minecraft:movement.hover": {
},
"minecraft:can_fly": {
},
"minecraft:flying_speed": {
"value": 0.2
},
"minecraft:physics": {
"has_collision": true
},
"minecraft:behavior.nearest_attackable_target": {
"priority": 1,
"within_radius": 25,
"must_see": false,
"reselect_targets": true,
"entity_types": [
{
"filters": {
"any_of": [
{
"test": "has_tag",
"subject": "other",
"operator": "!=",
"value": "alchemist"
}
]
},
"max_dist": 35
}
]
}
}
}
}
I don't know what's wrong but the entity is not even attacking
should I just stick to 1.10?
Maybe it's the flying? Not entirely sure tbh. No other content logs?
Try switching it to ground movement to see if it fixes it
Why are you updating the format version anyway?
I need someone to teach me how to make something breed-able and make sure that the baby model shows, I need something to be tame-able, something to follow me and to be able to be picked up . I’m making a huge pet mod which I can model but I can’t code for the love of god. Paying in PayPal if taught right and if it works !
how can i make an entity pass through walls but not ground
yeah no logs
cause I think it's necessary
but should I not?
here's a vex sample
I mean, it is good to have it updated, but jo reason to do it if it's working and you don't need new components. Just a waste of effort
Thanks for the advice i'll stay at 1.10 then
🫡
is "minecraft:movement" necessary for all movement?
for example flying
for some reason the issue was
"minecraft:behavior.nearest_attackable_target" needs minecraft:behavior.delayed_attack" to attack mobs
I removed the "minecraft:behavior.delayed_attack" and it won't attack
Did mojang remove the ability of using the ender dragon runtime identifier to increase the entity render distance? 🤔 I saw people saying it worked, but I tested it and had no effect
Ah man if we can increase the entity render distance that would be sick
Lmk I guess
What component should i add to make entity to run from sun into the shadows, like skeleton
?
have you not checked the behavior of the skeleton?
I did
},
"minecraft:behavior.flee_sun": {
"priority": 15,
"speed_multiplier": 1.4
},
You meant this right?
then why do you ask?? :v
Well it have highest priority but still entity walks under sun
It have no effect

Should i send json file of entity?
ah ok, so if you adjust the priority, it won't be the same for all entities
Send it if you want, so I can guess what the priority should be
ok, you should use priority 3
Are you sure? Because it will be much lower then other priorities
and avoid block with priority 2
Okey
When the number is low, the priority is higher
:OO i thought opposite
no
K i will test it now
Well yes, but I mean obviously if someone has priority 1 it's because they're the first :v
It still wonders under sun like nothing
Nothing changed

It avoids blocks it should avoid but not sun
then alternate 3 and 4, if you want delete avoid block to test that flee_sun component works correctly
I removed it but results are still same
:((
look at player priority 5
Okey
Still same
Maybe problem is something else
Mb format version?
Or
},
"minecraft:behavior.flee_sun": {
"priority": 1,
"speed_multiplier": 1.4
},
This itself
Maybe it does not work on format version 1.20.80?
Skeletons and zombies have always fled from the sun :v
Go to the folder of the world in which you test it and send the file of this entity
I already sent file previously
This
I said go to the world, and copy the file, I don't need another one, I just want to see that file specifically
just to see if you are testing the file correctly
can your mob move?
Yes
It walks around
Btw should point out if it accidentally goes under shadow for example under tree it will not came out from it
But i have to push it to go there or it should go under tree accidentally while wondering around
ok try this, i saw you had a duplicate component and i removed it, i also changed flee_sun to restrict_sun
Okey lets see
Still same
Lets wait for someone more experienced mb they can help
mmm i guess, that's weird
how would i make an entity thats visible to only one player at a time?
Entities aren't client sided
I believe your best option would be a particle 🤔
Can anybody help me with an entity that can be paint-able.
is there a filter to tell if the entity has naturally spawned or not?
is it a custom entity?
yes, but never mind my question, i have found a solution
i used minecraft:spawn_event in the spawn rules file of the entity and it worked
ah ok, i was going to mention it XD
actually it's minecraft:herd with an event that worked
is there a native way to make mobs despawn when the difficulty is changed to peaceful or do i need an environmental sensor for that?
can you elaborate on what you mean by "paintable"?
oh that's just render controller
wait let me get the docs
that's the same how sheep works
here properties
let me explain briefly to you how it works
Inside the Entities in BP
you put properties
e.g.
"properties": {
"property:ore_type": {
"type": "int",
"range": [0,6],
"default": 0,
"client_sync": true
}
},
ore_type will be your property name
in your render_controllersyou create an array
e.g.
"textures": {
"Array.ore_type": [
"Texture.coal",
"Texture.iron",
"Texture.gold",
"Texture.copper",
"Texture.emerald",
"Texture.diamond"
]
}
//Below it you have this which will check the property in the entity and change the texture
"textures": [ "Array.ore_type[query.property('property:ore_type')]" ]
@mental trench
Ohh, I am following it
it might be hard at first, but ask me if you need mroe info
So it will mostly focus on render_controllers and properties on the entity behavior, am I right?
yes
you create and change the property in the entity behavior and the render_controller will check it and change the texture
that's the gist of it
Does it still need events on the entity behavior ?
yeah I guess
I am gonna do first what you told to me
events on entities still exists only on the items it's removed cause it's on scripts now
@lofty citrus nothing changes
How can i add attack animation to my parrot-like entity? I already have a "attack" animation variable but it's not showing
how to lock entity look at target?
send me your json files here
@lofty citrus
you missed a comma
Oh yeah HAHAH
Can you check this file if it's correct?
"arrays": {
"textures": {
"Array.variants": [
"Texture.texture1",
"Texture.texture2",
"Texture.texture3"
]
}
},
it's not you need to put it inside "arrays"
like this @mental trench
arrays -> textures->Array.variants
That looks good, note that arrays count from 0, so the property must be within the range 0-2
Okay let me check if it's gonna work
Man it works HAHAH
But it doesn't change into a next texture variant
you have to see the behavior
Then?
can you send it?
The addon?
The behavior right?
yes
ok, there are 2 problems,
- it uses version 1.20.80
- there is nothing that makes your properties change
How can I solve it?
1, just change 1.16.0 to 1.20.80
2, I don't know how you planned the texture change
The texture will changed when holding a stick
Do you mean, if I equip a stick to the armor stand, it will change texture to the following one?
or if I hit him with a stick?
@mental trench
I think like equip
First of all, is your entity functioning as an armor stand?
If it's the runtime identifier then yes
Ohh does the interacting will not work?
Yes, that would be simpler, but, did you want to equip it to the armor stand or interact?
Interact, I'm so sorry huhu
In this case I just randomize the states, but you can try it, it's still so simple that it can't fail
Thanks man for the effort, I'm gonna try if it's gonna work
Man it works 100%, thank you so much.
what is the alternative to this?
"domain": "msd:entity_id",
"subject": "other",
"operator": "!=",
"value": "q.property('msd:player_id')"```
The value is wrong, you can't use it like that
Oh, sorry, you're just looking for an alternative
I think the easy way is to use scripts
Although I don't understand its application, it seems somewhat useless.
how would i use scripts for that?
i was hoping to set an int property
It's really strange what you're trying to do.
why? 😂
in short, i have multiple entities of one type that i want to control individually where each one goes
so i thought a random property, copied to a dummy, then "attacked"
{
"test": "has_property",
"value": "msd:entity_id",
"subject": "other",
"operator": "!="
}
Ok. I think I misunderstood, tell me, does this make sense to you?
@steady tundra
yeah
you're testing if the other entity has the property, regardless of value
i basically want 1 entity, 1 pathfinder dummy. Times X
so each entity goes to it's one pathfinder
Yes, that's exactly what you're trying to do here.
Filters do not alter properties, if not that is what you expected, I'm sorry but I really don't understand it is very strange, perhaps you should create a post in entities so that your question is not lost
Quick question. If we want our add-on to include refreshed models for pre-existing mob, as per the guideline requirements they have to be new mob as we cannot change he vanilla version ?
How do I make render controller when you hit a mob I doesn't turn red like an item when held
It's working 100%, currently I'm doing an animation of my entity where it can be rotate-able
nice
but i am having trouble HAHAH, cuz instead the animation will be triggered when crouching (like armor stand). It spinning endlessly
Hello guys, how do I add sound effects when an entity is spawned?
Is there a render controller for like a tnt
welp goodlock mate
check for on_entity_spawn component or soemthing
No. What are you trying to achieve?
Color transitioning to other color and then repeat
Check the creepers RC.
Ok
@lofty citrus will check thanks for the reply
How can I make an entity attract/follow others entity to it's position without modifying the other entities?
Anybody know what can cause my entity to not show?
Main Article: https://wiki.bedrock.dev/guide/troubleshooting.html
Troubleshooting Blocks: https://wiki.bedrock.dev/blocks/troubleshooting-blocks.html
Troubleshooting Items: https://wiki.bedrock.dev/items/troubleshooting-items.html
Troubleshooting Entities: https://wiki.bedrock.dev/entities/troubleshooting-entities.html
I tried all the solutions provided but nothing is working
Do you have the content log on? It may tell you what the issue is if that article didn't help
does anyone know why this may be happening ?
Model appears different with random shading on certain cubes (no determining factor). Exact same HEX code for colour for the shaded and non-shaded sections
#1299675741289447506 messageAny help? It seems its very easy thing to fixs but i do not know how
Send the geometry file
And texture uv
how do you make an entity only face 1 direction? or specifically always face north?
Because of your teaching, I kinda understand a bit creating a custom component for block. You're a big part of my learning in creating addon.
how do i fixed this error?
[Molang][error]-minecraft:player.0.persona-e136c41816740d77-7 | entity/player.entity.json | variable.helmet_layer_visible = 1.0;variable.leg_layer_visible = 1.0;variable.boot_layer_visible = 1.0;variable.chest_layer_visible = 1.0;variable.attack_body_rot_y = math.sin(360*math.sqrt(variable.attack_time)) * 5.0;variable.tcos0 = (math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;variable.first_person_rotation_factor = math.sin((1 - variable.attack_time) * 180.0);variable.hand_bob = query.life_time < 0.01 ? 0.0 : variable.hand_bob + ((query.is_on_ground && query.is_alive ? math.clamp(math.sqrt(math.pow(query.position_delta(0), 2.0) + math.pow(query.position_delta(2), 2.0)), 0.0, 0.1) : 0.0) - variable.hand_bob) * 0.02;variable.map_angle = math.clamp(1 - variable.player_x_rotation / 45.1, 0.0, 1.0);variable.item_use_normalized = query.main_hand_item_use_duration / query.main_hand_item_max_duration;variable.has_tale = !variable.is_first_person && q.property('ct:has_tale');variable.has_hat = !variable.is_first_person && q.property('ct:has_hat');variable.has_cape = !variable.is_first_person && q.property('ct:has_cape');variable.has_cape_2 = !variable.is_first_person && q.property('ct:has_cape_2');variable.has_cape_3 = !variable.is_first_person && q.property('ct:has_cape_3');variable.has_pet = !variable.is_first_person && q.property('ct:has_pet');variable.has_crown = !variable.is_first_person && q.property('ct:has_crown');variable.has_halo = !variable.is_first_person && q.property('ct:has_halo');variable.player_moving = query.modified_move_speed * 2 && query.modified_move_speed >= 0.015;variable.player_idle = query.modified_move_speed <= 0.1;variable.is_sneaking = query.is_sneaking; | Error: query.property does not have an actor.
its show me every pre_animation that the player have
Send your entity.json
how to import prisma 3d animations
Anyone know how to make an entity detect and target an entity hundreds of blocks away?
best of luck in you adventures 🫡 and may the odds be with you.
What is the height of the nametag based on?
It is based on the hitbox
minecraft:collision_box
"format_version": "1.20.80",
"minecraft:entity": {
"description": {
"identifier": "nd:death_skull",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"component_groups": {},
"components": {
"minecraft:inventory": {
"inventory_size": 45
},
"minecraft:physics": {
"has_gravity": true,
"has_collision": true,
"push_towards_closest_space": true
},
"minecraft:behavior.pickup_items": {
"can_pickup_any_item": true,
"goal_radius": 2
},
"minecraft:health": {
"value": 998
},
"minecraft:damage_sensor": {
"triggers": {
"cause": "all",
"deals_damage": false
}
},
"minecraft:collision_box": {
"width": 0.9,
"height": 0.9
},
"minecraft:knockback_resistance": {
"value": 998,
"max": 1000
}
},
"events": {}
}
}```
for some reason, i cant open the inventory of the entity
i also cant see its texture and model
Thank you very much
Guys, can you change the interaction where the player should have a stick on the mainhand to interact in this code.
Yes use filters.
Check the cow code.
Like this one?
"wiki:on_interact": {
"trigger": {
"filters": {
"test": "is_family",
"subject": "self",
"value": "pig"
},
"event": "wiki:interacted",
"target": "other"
}
}
Yeah! Except use a different test.
How do i fix this? 😭
Anyways here's the code
{
"format_version": "1.8.0",
"minecraft:client_entity": {
"description": {
"identifier": "witherstormmod:sickened_snow_golem",
"materials": {
"default": "snow_golem",
"head": "snow_golem_pumpkin",
"emissive": "entity_emissive_alpha"
},
"textures": {
"default": "textures/entity/sickened/sickened_snow_golem",
"emissive": "textures/entity/sickened/sickened_snow_golem_emissive"
},
"geometry": {
"default": "geometry.snowgolem"
},
"spawn_egg": {
"base_color": "#B1A6BC",
"overlay_color": "#4E2374"
},
"animations": {
"move": "animation.snowgolem.move",
"arms": "animation.snowgolem.arms",
"look_at_target": "animation.common.look_at_target"
},
"animation_controllers": [
{
"move": "controller.animation.snowgolem.move"
}
],
"render_controllers": [
"controller.render.snowgolem",
"controller.render.emissives"
]
}
}
}
Shoot i can't send the BP entity code
Rip
and what is the problem?? 🤷♂️
have you equipped the pumpkin to your entity?
The pumpkin is not part of the model, it's like a helmet
Ohhhh
If it doesn't work try to enable attachables in entity client

mmm is it working now?
Yes
ok
{
"format_version": "1.16.0",
"minecraft:entity": {
"description": {
"identifier": "jay:bullet",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"components": {
"minecraft:scale": {
"value": 1
},
"minecraft:damage_sensor": {
"triggers": [
{
"cause": "all",
"deals_damage": false
}
]
},
"minecraft:type_family": {
"family": [
"npc"
]
},
"minecraft:health": {
"value": 32767,
"max": 32767
},
"minecraft:movement": {
"value": 0
},
"minecraft:jump.static": {
"jump_power": 0
},
"minecraft:physics": {
"has_collision": true,
"has_gravity": true
},
"minecraft:pushable": {
"is_pushable": false,
"is_pushable_by_piston": false
},
"minecraft:knockback_resistance": {
"value": 1
},
"minecraft:collision_box": {
"width": 0.72,
"height": 2.01
},
"minecraft:nameable": {
"alwaysShow": true,
"allowNameTagRenaming": false
}
}
}
}
my entity just wont die even with /kill
damage sensor
thats still not working
you have made it so that it does not take damage, including /kill
i changed it to true
ooo that makes sense when its false 0 damage can be taken
then you haven't done it correctly
{
"format_version": "1.16.0",
"minecraft:entity": {
"description": {
"identifier": "jay:bullet",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"components": {
"minecraft:scale": {
"value": 1
},
"minecraft:damage_sensor": {
"triggers": [
{
"cause": "all",
"deals_damage": true
}
]
},
"minecraft:type_family": {
"family": [
"npc"
]
},
"minecraft:health": {
"value": 32767,
"max": 32767
},
"minecraft:movement": {
"value": 0
},
"minecraft:jump.static": {
"jump_power": 0
},
"minecraft:physics": {
"has_collision": true,
"has_gravity": true
},
"minecraft:pushable": {
"is_pushable": false,
"is_pushable_by_piston": false
},
"minecraft:knockback_resistance": {
"value": 1
},
"minecraft:collision_box": {
"width": 0.72,
"height": 2.01
},
"minecraft:nameable": {
"alwaysShow": true,
"allowNameTagRenaming": false
}
}
}
}```
I removed it but its still not working sorry entities arent my specialty
then you haven't done it correctly
Many have the same problems when testing updated addons
Idk if this still matters cause it's just format version try using 1.16.100
Tbh I noticed since updated a lot of things got broken
I don't think it will affect much, since it is not using new components.
although yes. it is advisable to use updated versions, I usually use 1.20.80
yeah guys im not to sure whats going on here none of this is working
how are you testing it?
okay so.. it is working? but theres still old entities here. thats why it wasnt working but they wont disappear
the one taking damage works but idk why this old one is here
You need to add an event called despawn and a component group with the component minecraft:instant_despawn
okay I added that in but it cant be executed on my bullet
{
"format_version": "1.8.0",
"minecraft:entity": {
"description": {
"identifier": "jay:text",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"component_groups": {
"jay:bullet_despawn": {
"minecraft:instant_despawn": {}
}
},
"components": {
"minecraft:damage_sensor": {
"triggers": {
"cause": "all",
"deals_damage": false
}
},
"minecraft:type_family": {
"family": [
"text"
]
},
"minecraft:nameable": {
"alwaysShow": true,
"allowNameTagRenaming": false
},
"minecraft:health": {
"value": 1,
"max": 1,
"min": 1
},
"minecraft:collision_box": {
"width": 0.0,
"height": 0.0
},
"minecraft:push_through": {
"value": 1
},
"minecraft:scale": {
"value": 0.0
},
"minecraft:knockback_resistance": {
"value": 100,
"max": 100
},
"minecraft:physics": {
"has_gravity": false
}
},
"events": {
"jay:bullet_despawn": {
"add": {
"component_groups": [
"jay:bullet_despawn"
]
}
}
}
}
}```
bro why are you reducing the version, who uses 1.8.0?
By the way, what command are you using? Send it.
oh wtf 😭 i didnt even notice that idk how that got there
do i have to add a "queue_command"
eh? I want to know what command you are using to execute the event
ooo I thought u meant inside of the json
/event entity @e[type=jay:bullet] jay:bullet_despawn
jay:text
your entity is called jay:text
that was the complete wrong file im so sorry
{
"format_version": "1.20.80",
"minecraft:entity": {
"description": {
"identifier": "jay:bullet",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"component_groups": {
"jay:bullet_despawn": {
"minecraft:instant_despawn": {}
},
"components": {
"minecraft:scale": {
"value": 1
},
"minecraft:type_family": {
"family": [
"npc"
]
},
"minecraft:health": {
"value": 32767,
"max": 32767
},
"minecraft:movement": {
"value": 0
},
"minecraft:jump.static": {
"jump_power": 0
},
"minecraft:physics": {
"has_collision": true,
"has_gravity": true
},
"minecraft:pushable": {
"is_pushable": false,
"is_pushable_by_piston": false
},
"minecraft:knockback_resistance": {
"value": 1
},
"minecraft:collision_box": {
"width": 0.72,
"height": 2.01
},
"minecraft:nameable": {
"alwaysShow": true,
"allowNameTagRenaming": false
}
}
}
},
"events": {
"jay:bullet_despawn": {
"add": {
"component_groups": [
"jay:bullet_despawn"
]
}
}
}
}```
this is the correct one im so sorry
ok
sorry it was my other testing one
Do you know if there is a way to make it so that only the player himself can see an bone in its geometry when in third person?
Is there a way to get an entity to drop items not from a loot table but from their inventory?
as in if your entity has items in its "minecraft:inventory" it drops on death?
not on death no, as some behaviour
Any ideas why there is an error query.property called on an actor without a property component? I'm trying to use q.property in RP entity, I have
"properties": {
"nubs:rotation": {
"type": "int",
"values": [
0,
1,
2,
3
],
"default": 1,
"client_sync": true
}
},
in my entity behavior file.
Game says that it doesn't have any properties.
Fixed it:
"nubs:rotation": {
"type": "int",
"range": [
0,
3
],
"default": 1,
"client_sync": true
}
Help!! My entities are falling into hoppers and can't get out to continue their behaviours. What sort of movement component stuff could I be missing?
what am I doing wrong? how do I get the animations to work
always never put spaces whe naming atransition thats not valid in json's syntax
the die fall should be die_fall or dieFall
I have an entity that I've setup to do trades with and after only a few trades, its telling me that it will not do that trade anymore. I think I have trade_resupply being added/removed correctly??
Why would it do this?
O
I'm trying to control which entites pickup which items. I have 3 in an area and I've tried telling them with the pickup_items behavior and sharables components but they insist on picking up everything around them as soon as they pick anything up. Any pointers?
How do entities decide on exchanging items between themselves? I've seen my custom entities do it once but I didn't think I did anything to make that happen.
More questions.. I'm trying to make an entity that fishes. I'm trying to use the villager_v2 as a template. I've set dweller and behavior.work but the entity doesn't do anything (even after trading which the documenation mentions).
How do I make the entity can take damage but will never die
"minecraft:health": {
"value": 1,
"min": 1
},
Is it possible to read information from, say, a book item in the world and then use that information to control the behaviour of an entity?
I don’t think so
What materials should I use for this
entity_alphablend makes the cube of the inside not show
got it!
Why does my projectile stays floating?
{
"format_version": "1.13.0",
"minecraft:entity": {
"description": {
"identifier": "kai:death_eye_laser",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"component_groups": {
"kai:despawn": {
"minecraft:instant_despawn": {
}
}
},
"components": {
"minecraft:collision_box": {
"width": 0.5,
"height": 0.55
},
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"filters": {
"test": "in_lava",
"subject": "self",
"operator": "==",
"value": true
},
"cause": "lava",
"damage_per_tick": 4
}
]
},
"minecraft:projectile": {
"on_hit": {
"impact_damage": {
"damage": 5,
"destroy_on_hit": true,
"destroy_on_hit_requires_damage": false
},
"definition_event": {
"affect_projectile": true,
"event_trigger": "kai:despawn"
}
},
"hit_sound": "bow.hit",
"power": 1.6,
"gravity": 0.05,
"anchor": 1,
"offset": [
0,
-0.5,
0
]
},
"minecraft:physics": {},
"minecraft:pushable": {
"is_pushable": false,
"is_pushable_by_piston": true
},
"minecraft:conditional_bandwidth_optimization": {
"default_values": {
"max_optimized_distance": 80.0,
"max_dropped_ticks": 7,
"use_motion_prediction_hints": true
}
}
},
"events": {
"kai:despawn":{
"add": {
"component_groups": [
"kai:despawn"
]
}
}
}
}
}
That's funny.. If it travels in lava, it will die?
Yeah, this is a modified arrow code so haven't removed that part yet
slime outer and enderman materials I guess?
just used slime outer and slime
I don't think so cause if player kills the entity manually it will die it only save the entity when you use /kill
Ooh, I thought you want to make it gloww
min health 1 won't allow the entity to die in any way
From last time I checked
Ohh, I thought it was already patched... Nice
do you happen to have an idea sir coddy
What's the problem?
Use runtime identifier
I can't
?
Can't use runtime_ids nor think I need them
But did you try atleast to use arrow as your runtime identifier?
Nvm
Guys, is there a component able not make entities receive any effects
minecraft:mob_effect_immunity
Seems odd, never saw this when I search in the documentation just now
thanks, I guess?
Is there a way to capture entity interactions with script instead of just the interact component?
world.beforeEvents.playerInteractWithEntity(({ target, player }) => {
console.error(`${player.name} interacted with ${target.typeId}`);
});```
ahh nice, I was hoping it would be that simple
I fuckin knew it that's it's an array. @wanton venture
https://bedrock.dev/docs/stable/Entities#minecraft%3Amob_effect_immunity
I'm trying to use this little script: javascript: world.beforeEvents.playerInteractWithEntity.subscribe((event) => { const { player, target } = event if (target.typeId == "utilblocks:droidalphadesign") { //const component = target.getComponent("minecraft:npc"); //component.defaultScene = "ducky_intro" event.cancel; player.runCommandAsync('dialogue open ' + target.id + ' @s "ducky_intro"') }. The entity targeted has the minecraft:npc component but I couldn't seem to use it. I get an error that the entity has no permission to execute?? I'll get the exact error in a sec...
"[Scripting][error]-ReferenceError: Native function [Entity::runCommand] does not have required privileges. at <anonymous> (events.js:578)"
You need to wrap it around system.run
oh okay
argh now it won't let me use id as a string. How do I do that?
.toString didn't work.. 😦
What?
What are you doing?
If your question is now related to scripting then I recommend you moving to #1067535382285135923
Yep, is an array. You define all effects that your entity is gonna be immune to
How can an entity get a "scoreboardIdentity"?
by making it participate
Maybe I need to go back to my other question about getting an id from an entity that I can use with a command
you need the "minecraft:is_chested": {} component
is_chested is a useless component like is_baby or is_stunned
"minecraft:inventory": {
"container_type": "inventory",
"private": false,
"inventory_size": 45
},
I guess this would be the correct configuration
I remember that you need that component to open inventories. Also, if you kill a mob with that component, it drops a loot chest. So it's not useless as you say.
Wow, I didn't know about the loot chest, although to see the inventory, you just need to configure the inventory component correctly.
Apparently you need that component, it's not enough to set "private": false. If you look at the donkey's file, you'll see that it has an inventory when tamed, but it can only be opened when it has the "minecraft:is_chested" component.
"minecraft:donkey_tamed": {
"minecraft:is_tamed": {
},
"minecraft:equippable": {
"slots": [
{
"slot": 0,
"item": "saddle",
"accepted_items": [ "saddle" ],
"on_equip": {
"event": "minecraft:donkey_saddled"
},
"on_unequip": {
"event": "minecraft:donkey_unsaddled"
}
}
]
},
// ..interact component..
"minecraft:rideable": {
"seat_count": 1,
"crouching_skip_interact": true,
"family_types": [
"player"
],
"interact_text": "action.interact.ride.horse",
"seats": {
"position": [ 0.0, 0.925, -0.2 ]
}
},
"minecraft:behavior.player_ride_tamed": {
},
"minecraft:inventory": {
"inventory_size": 16,
"container_type": "horse"
}
// ..Breedable component..
},
"minecraft:donkey_chested": {
"minecraft:is_chested": {
}
// ..interact component..
}
No, actually the private is not that important, you just have to define the type of container , initially you didn't have it.
I've now got an entity that I can interact with to get either a trade or dialogue by using a stick when I interact with them to control which. However, the entity is consuming the sticks! How do I stop that? Is it some member of the minecraft:npc component or is it in the dialogue scene members?
Ahh.. I think its the stupid example scene I copied
Is there a way to give an entity a selection box?
For an entity to be able to hold an item do I need more than these 2 components ?
"minecraft:inventory": {},
"minecraft:equip_item": {}
How did you figure it out?
Is it possible to use the behavior.eat_block to only eat fully grown crops? Can I filter it by some value?
Is it possible to use query.block_state to control the success_chance perhaps? I don't know how to use the queries
With behavior.move_to_block is there a way to use target_block_filters to actually refer to the block and states?
I used slime and slime_outer materials
Whag materials should I use that works like entity_alphablend but won't have the face culling?
"+states": ["DisableCulling"]
Where does that goes?
In your custom material json
is it possible to change the size of an held item?
attachables.
Not using one, I need to? Will the game crash?
but for vanilla items?
attachables.
like if I want the diamond sword to display in the hand like an apple would
I'll check that out then thanks
found another way without attachables
How do I make an entity follow you from a certain range, but not shooting projectiles until its at a smaller range?
it will only crash if you mess up really bad, just create resources/materials/entity.material and paste in this code
{
"materials": {
"version": "1.0.0",
"material_name:entity_nocull": {
"+states": [
"Blending",
"DisableDepthWrite"
]
}
}
}
Hey I'm wondering, is it possible to cause an entity to do an emote or is it player and user interface only?
How do the armor stand poses work? Is that for any entity?
ahh.. /playanimation?
argh no command line autocomplete
Oohh, thanks!! ❤️
that on hit stuff has never really worked for me
mb, didn't realize that was on the fourth
I need some help with an error I'm getting on a mob...
[Animation][error]-kuma:gray_comun_rat | Error: can't find animation breath
[Animation][error]-kuma:gray_comun_rat | Error: can't find animation walk
I can't understand why this error is happening, because the animations are working fine, and everything looks to be working in spite of it. Does this error come from the animation? or from the controller?
rat.entity.json
"move": "controller.animation.Ratita.move",
"moving": "animation.rata.walk",
"static": "controller.animation.Ratita.static",
"staticking": "animation.RataComun.breath",
"sit": "controller.animation.rata.move",
"sitting": "animation.RataComun.sit",
"look_at_target": "animation.common.look_at_target",
"sniffing": "controller.animation.newrat.sniff",
"sniff": "animation.RataComun.sniff"
},```
Controller.json
"initial_state": "default",
"states": {
"default": {
"animations": [
"look_at_target",
{
"walk": "query.modified_move_speed"
}
],
"blend_transition": 0.1,
"transitions": [
{
"sit": "query.is_sitting"
}
]
},
}
},
"controller.animation.Ratita.move": {
"states": {
"move": {
"animations": [
{
"moving": "query.modified_move_speed"
}
]
}
}
},
"controller.animation.Ratita.static": {
"initial_state": "static",
"states": {
"static": {
"animations": [
"breath"
]
}
}
},```
animations.json
```"animation.rata.sitting": {...}
"animation.rata.static": {...}
"animation.rata.walk": {...}
"animation.RataComun.sniff": {...}
"animation.RataComun.sit": {...}
"animation.RataComun.breath": {...}
There is no breath or walk animation, your walk animation has been set as moving or move (I don't know which of the 2 is the one you need) and your breath animation has been set as staticking
So in the controller, I go by the definition in the entity? Rather than the animation name?
yes
Cool, thanks!
Hey... Is there a way to make an entity permanently invisible?
Well, at least until I change it again from script
or something
What do you mean by invisible?
can't be seen or interacted with nor attacked but they will be invulnerable anyway I think
You should delete the entity file or archive it in a separate folder :v
Nooooo
I need to be able to interact with it from script at any time
I want to create a kind of follower that you can summon and send away again and that has certain other interactions, particularly with other player's followers
But it has to be spawned at all time
so you have an entity without a model? you just want it to be uninteractable with the minecraft:interact component?
no, sometimes it will have a model I guess...
I don't think that component will help me
Hmm... I can make them invisible with effects for 11.5 days apparently.. Maybe I can update that on some interval
ok so you want it to be invisible sometimes, you can use properties, variants or mark_variant, to toggle visibility, or just use effect invisible command
"toggle visibility"?
You say that Effect works for you? Then why don't you keep using it?
why 11 days?
I don't know what works yet I am only trying to figure out how to do something
Because the maximum duration that you can apply an effect for is 20000000 ticks
just make it permanent with a tag
effect @e[tag=tag_example] invisibility 1 1 true
just make the command run permanently
Sounds lag inducing
Do entities get despawned if they aren't in the simulation distance of any player?
Ok, it would just be the repetition of a command, if you don't like it then you can use properties or variants
if you haven't set the persistent component then it may disappear
To be frank it wouldn't really lag at all caus eyour just setting invisibility which is 1 effect..
Do I put that in the tick.json file or something?
not directly inside tick.json
How do you detect the wither's charging skull event using a Molang? Is there even any? I tried query.is_charged and is_charging but they don't work.
has_target enables upon wither detecting you.
Aww there is nothing in the example source data for it that tells me
But it looks to me like they are just special behaviours with no links to any other components or properties
the wither has no charge time
Oh okay, thanks for responding.
Does anyone know if its possible, in the behaviour json events, can an entity add a tag to itself?
Is it possible to run commands in events?
Yes, just add the command with queue_command
"custom_event": {
"queue_command": {
"command": [
"say hello"
]
}
},
Yes, I found it, thanks!
Guys can I make a projectile hold item? I want to fake that entity throws a block
And position the item to looks like a full bloc
hi, anyone know why my spawn egg texture is giving error in the code?
How do you make entity projectiles drop on the ground if it does not hit an entity
If you code it properly, I dont see why not
Bind the itemslot to the model and add the equippable component
Yeah I did that
is there a way i can make a mob i can control? like, when i right click it i go into control mode, and can move the mob, and use its abilities with certian keys? like if i made a wardenlike control mob, i could move it, use space to make it sonic screech, and use key g to make it do something else
Does anyone know how to use texture animations that uses hold on last frame?
Could I get some help with this spawn rule?
"format_version": "1.8.0",
"minecraft:spawn_rules": {
"description": {
"identifier": "pto:ostrich",
"population_control": "animal"
},
"conditions": [
{
"minecraft:spawns_on_surface": {},
"minecraft:brightness_filter": {
"min": 7,
"max": 15,
"adjust_for_weather": true
},
"minecraft:weight": {
"default": 100
},
"minecraft:herd": {
"min_size": 2,
"max_size": 5
},
"minecraft:biome_filter": {
"test": "has_biome_tag",
"value": "savanna"
}
}
]
}
}```
I want my entity to spawn in savanna biomes in herd of 2 to 5 but it won't spawn at all
How do I remove the death animation from an entity?
I'm wondering, for player entities, do the enchanted items they are wearing use effects? Is there a way to detect quickly, by examining the effects that are applied to the player, if they have some kinds of enchanted items?
In particular, I want to know if they have frost walker or haste (?) or such things that would affect their movement.
They don't use effects, enchants are a hardcoded behavior. You can check for enchanted items using scripting. As in for check whether an entity has a particular effect or not, I am not sure, but my guess it that you would have to check for all possible ways the player could have the effect, for haste it would be the beacon and potions I believe? If you don't care about commands.
Try
"minecraft:biome_filter": {
"any_of": [
{
"test": "has_biome_tag",
"operator": "==",
"value": "savanna"
}
]
}
Yes that is possible. You need to make the entity ridable, once you ride it, you get invisible, and from there use scripting or BPACs to do the other functionalities
What problem are you facing?
Like for an example when you have an entity that runs on event and then the animated textures work until it gets hold on last frame
"components": {
"minecraft:damage_sensor":{
"triggers":[{
"on_damage":{
"filters":{
"any_of":[
{"all_of":[
{"test":"has_tag", "subject":"self","value":"clickingTooFast"}
]}
]
},
"deals_damage":false
}
}]
},
Why does this damage sensor not work?
"triggers": [
{
"deals_damage": false,
"on_damage": {
"filters": {
"any_of": [
{
"all_of": [
{
"test": "has_tag",
"subject": "self",
"value": "clickingTooFast"
}
]
}
]
}
}
}
]
},```
Is there any documentation available for render controller json files? Anything comprehensive about entity jsons?
Sorry found the https://wiki.bedrock.dev/entities/entity-intro-rp.html gosh the offical doc is lean
Are there any tutorials about rideable entities? Is it possible to control the entity being ridden with the velocity methods/properties? I'm thinking, to completely control the movement of the player as well since you can't do that directly.
Sometimes, my projectiles go inside walls or floor. How I fix this?
Is there a way to prevent a player from dismounting a rideable entity?
Is there way to not dismount with jump, at least?
Can I forcefully add the riding component to a player perhaps?
In 1.21.50 there is a new command that will allow that.
awww
Sorry its the wrong channel but while you're giving answers, how do I make the preview the default version?
I'm just trying to find the reference for that and I can't find anything in the wiki related to rideable changes. Can you direct me a little more?
Oh wait... is it "/set_movement_authority"?
no inputpermission.
oh there is something new in that class?
Yes.
PlayerInputPermissionCategoryChangeAfterEvent?
InputPermissionCategory
dismount false I suppose
But it says that dismounting may still occur?
Can I still use PlayerInputPermissionCategoryChangeAfterEvent in 1.21.44 to detect the Dismount category change when they do dismount?
And then try to force them back on by setting the component perhaps
Anybody know an alternative to replacing the mount health bar?
Hay I need some help editing this entity. I have a submarine and I need help making my submarine rise and lower in water when you look up and down.
Can someone recommend a sfx editing program?
What is that
Idk I mostly record my own voice and edit it with a video editing software
Like lumafusion
Im doing this right now
Im a girl, so, this was hard to do
Thanks
Is it possible to separate 2 materials on single models?
For example, I'm making a hologram entity that glows and is semitransparent. However, I can't separate the materials due to my limitation about materials.
the stand should be solid and the hologram beam should be glow-semitransparent
(screenshot of Bahavior pack code) I made an airplane add-on where when we get in it will run a function that makes the plane fly according to the function above. But this doesn't work, does anyone know where the error is?
is anyone alive?, i used "minecraft:interact" component to play the swing animation while interacting with the entity to open the entity inventory, but for some reason i am no longer able to open the entity inventory
what should i do to fix that?
You can't use 2 components that use the same interaction (right click), if you want to separate them you simply have to define the interaction with a filter, for example sneaking, in some cases these interactions are done automatically
but i want the swing animation to happen when i open the entity inventory
You could also try using query.is_in_ui to play the animation with an animation controller.
I'll see about that later
I know this affects the 3d model in the UI, though I'm not sure if it would work for an external animation.
you don't have an initial_state
Guys a quick question. I want to display a entity name on a dummy entity. I need it so i can display text above a block in the game. Even dough i have the nameable component defined and i spawn the entity with a name, the name does not show to the player. Why is that?
guys i have a question. why can my mob cant spawn in custom blocks. Can you guys help me please.
i did change the top layer of the plains biome into my custom block and try to make the mob spawn in that block but nothing spawn there.
Custom blocks arent really considered solid.
are there any way to make it consider a solid block
Not really. I think you can use blocks.json,,instead of geometry and material instances.
no way to detect item tags in filters right?
Does anyone know if baby nitwit villager is a thing on BE? If so, how do you find them in the game. I need to ensure so I will create a model for them.
It looks like villager_v2.json only transforms babies into unskilled and nitwit adults. But I could miss something.
how in the world do I get something like this to work?
how would i make an entity place a giant sphere of blocks around itself?
Make it run the commands to place the blocks. Probably you’d prefer /structure
I’m on mobile and can’t see that, can you explain what you want to do?
I don’t think so
so when it reaches a curtain amount of health it switches to a death animation controller so that it's animations line up with it's behavior
how do i make it run the commands
queue_command on the entity event
That would be done in the entity client file
wait, is it a component? im new
Not a component, check https://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/entityevents/minecraftevents_queue_command?view=minecraft-bedrock-stable
can you elaberate?
In the scripts section of the entity client file, call your animation controller once the entity reaches a certain health value using actor_health
is there a way to set it on a timer?
Yes, you can use minecraft:timer to call the event which will place the structure
what if i wanted it t be a sphere of air?
Same story! You can save whatever block you want in a structure, including air
doesnt have to be a structue too
is it possible to spawn an entity with no selection box?
so the player can't interact with it in anyway
i have found a way, i can use the evocation fangs runtime identifier
Hay I need some help editing this entity. I have a submarine and I need help making my submarine rise and lower in water when you look up and down.
what does the ender dragon use to destroy all blocks around it?
yes, but a structure block does squares
i cannot make a sphere of air
Magik
You will build a sphere of any block and then fill the remaining part of the structure with minecraft:structure_void, then you will replace the block you built the sphere with with air. Done, your structure placed a sphere of air.
people tend to forget the existance of structure void
a structure void? thats a thing?
That's correct
How can I query properties of a different entity, now that "q.get_riders" and "q.get_nearby_entities" is deprecated?
Or is there a way to make an entity which is riding the player be visible in first person?
Yo is there a way to highlight a player?
Like the glow effect on Java, I seen an addon do it but it was from a long time ago
I just wanna make the player whiteish.. like, a ghost. Like this color "⬜"
is there any way to make a playing sound via /playsound or some other way follow an entity as it moves?
A constant sound?
yeah, working on a vehicle, trying to keep it attached to the vehicle
Yeah it's possible, by lots of methods
Do you want scripts or mc functions or command blocks?
scripts ideally
yep that works
Alright do you have any idea of the game api?
yeah this entire project is very typescript heavy
Alright then
You should know how to play a sound by now but sure
import { world, system } from "@minecraft/server";
system.runInterval(() => {
let entities = world.getDimension('minecraft:overworld').getEntities({type: 'yourEntityType'});
for (let i = 0; i < entities.length; i++) {
world.getDimension('minecraft:overworld').playSound('yourSound', entities[i].location, {volume: 3, pitch: 1});
}
}, 3);
@spring root
that doesnt seem to follow the entity, it just keeps playing it at the location it was set to play at unfortunately, i mean it updates every 3 ticks, but id have to have a very short lasting sound
Uh no, it follows the entity, plays the sound to all players near the entity, just change the volume depending on your liking, and 3 ticks is so it doesn't create lag.
Alternatively you could do a music command that loops ur sound on the players in the car. But it wouldn't be following the entity exactly...
hmmmmm ok, ill play around with it more, tyty
A VitePress-powered documentation site
Ngl I kinda need this too
Thanks yo
No worries, I just found it here somewhere as well ✌️
{
"minecraft:entity": {
"format_version": "1.14.0",
"description": {
"identifier": "jay:raft",
"is_summonable": true,
"is_spawnable": true,
"is_experimental": false
},
"components": {
"minecraft:buoyant": {
"apply_gravity": true,
"base_buoyancy": 1.0,
"simulate_waves": false,
"big_wave_probability": 0.03,
"big_wave_speed": 10.0,
"drag_down_on_buoyancy_removed": 0,
"liquid_blocks": ["water"]
},
"minecraft:underwater_movement": {
"value": 5
},
"minecraft:navigation.walk": {
"can_sink": false
},
"minecraft:rideable": {
"seat_count": 1,
"family_types": ["player"],
"interact_text": "action.interact.enter_boat",
"seats": {
"position": [0, 0, 0]
}
},
"minecraft:input_ground_controlled": {},
"minecraft:health": {
"value": 10,
"max": 10
},
"minecraft:movement": {
"value": 3
},
"minecraft:movement.basic": {},
"minecraft:collision_box": {
"width": 1,
"height": 1
},
"minecraft:physics": {}
}
}
}```
any reason my boat goes the speed of light?
"minecraft:damage_sensor": {
"triggers": {
"on_damage": {
"filters": {
"any_of": [
{
"all_of": [
{ "test": "has_tag", "value": "ds:team_1" },
{ "test": "has_tag", "subject": "other", "value": "ds:team_1" }
]
}
]
}
},
"event": "ds:hit_team_player",
"deals_damage": false
}
}
How would I make the entity hitting trigger the event.
Actually nvm
How'd I make multiple triggers with their own actions?
Basically an array of triggers and their own outcome
Yea, simply make "triggers" an array. Each entry in the array is an object much like the "triggers" one you have now.
"minecraft:damage_sensor": {
"triggers": [
{
"on_damage": { /* ... */ }
},
{
/* Another one */
}
]
}
With their own action?
Or what exactly?...
Oh yea right
IIRC the "event" key goes inside on_damage. Here's one trigger:
{
"on_damage": {
"filters": { /* ... */ },
"event": "ds:hit_team_player",
"target": "self"
},
"deals_damage": false
}
Is there any way to make tradeless villagers shake their head when clicking on them? Something similar to the one in Java edition.
You can modify their code to play an animation when interacted, yes
How can I play an animation when an entity is summoned/spawns in the world, but not when the world is simply reloaded?
You could trigger the animation trough a queue_command that is triggered from the entity_spawned event.
That will work, but do you know if there is a more straightforward way of doing so, like a query?
You can set a property and query that.
That'd work, thanks
Hey does anyone have an idea how I could have a mob change its behavior when it goes below a certain amount of health
I want it to have the behavior of a phantom when above 16 hp and the behavior of a basic melee mob when it is below that
I’ve tried to learn how to use events and component groups but it’s not really clicking 😅
You could use query.health in an server side animation controller. then trigger the event from in there.
Do you have any links or aides to help get me started on that?
https://wiki.bedrock.dev/animation-controllers/entity-commands.html#animation-controllers
This page is better.
Thanks man
@deep patio Sorry for the ping but when setting up component groups do I leave any components in the default components folder?
If you have components that you are not planning to change across the different groups then you can leave them in the default component object.
Got it, thanks!
Can I do it with minecraft:interact component? If so, how can I link it to an animation in animation controller? Can I use query.property to do that?
any way to disable the fishing rods ability to grab and pull entities?
Make a particle that only the player sees ?
Hi, everyone! I’ve got a problem that may have an easy solution. I have an item called "brush" that, when I interact with an entity, changes the item to "brush_red" via /replaceitem command.
The issue is that "brush_red" launches a projectile when used, triggered by a q.is_using_item inside an AC. But when using the /replaceitem command, the game thinks that I'm actually using the new item obtained, so it launches the projectile as soon as I get it.
Any clever ideas on how to solve this? I'm looking for an easy fix, so I don't have to change my entire system. Thanks!
A solution will involve either finding some way to delay the invocation of /replaceitem to after the state transition occurs, or to store the state of whether the player holds brush_red or not sometime before /replaceitem is invoked. I would probably go with the former
OK, but I don't know how to even start hahaha
If the entity interaction uses transform_to_item that might be tricky. What I suggest necessarily involves another system, like a "minecraft:timer" component or a behavior pack timeline
No no, the interaction just triggers a /replaceitem command inside an event
Oh right, duh. You literally just said this—sorry, made me lol
The state transition is triggered when I use "brush_red" on a regular basis. What I don't want is to transition to "is using" in the exact moment when I one item for the other
"brush", the first item that I need to use over an entity to change for "red_brush", doesn't have a projectile or any states whatsoever
My first idea is to create a blank animation with a similar duration of the vanilla "pick up item" animation and trigger that animation with a /playanimation command right before the /replaceitem. Then I can add a query to check if that specific animation has finished before the player uses the item to shoot the projectile. Since this animation will only play when you get the item, it won't shoot the projectile at that time, but you can shoot it any other time. But I'm not sure if you can check if a specific anymation has finished via queries, I've never done that before, just used all animations finished
That is a good thought, but I'm afraid to share that /playanimation has client-sided effects only. You cannot use it for timer logic in the behavior pack
But you're on the right track, you could certainly introduce a delay using server-sided animations
Hmm... How so?
I can also use a timer as you said. Since this AC that triggers the projectile is linked in the player.json (long story...), I can add a boolean property in that behavior file, set it to true with a /event command right before the /replaceitem command and, in the same event, set a component group with a small timer that, when finished, sets the property to false. So I can check the state of that property with a query too, and since that property will only be true when I replace the item, then it won't launch the projectile at that time, but it'll launch it any other time
Those where the main two ideas I had. But I came here thinking that there might be an easier fix for this. I mean, this can't be THAT tricky, right? 😅
I could see that working. I was going to suggest something somewhat like that earlier 😓
Yeah, but should I get to that? I mean, isn't there a more direct approach?
(btw thanks for the ideas!)
I'm not sure if there's a simpler solution. The problem inherently comes from the fact that q.is_using_item and the state transition is acting too slow, and the /replaceitem command changes the item before your state inspects the player's held item (I'm making an assumption here)
You could try a different query ...? Like q.main_hand_item_use_duration > 0, but I don't know if that will have any notable improvement
My thinking is it could somehow evaluate to true a tick sooner, since on the client it appears to act a couple of frames faster. But that's me being hopeful
I'll test that and let you know!
I've also tried solving this via scripts, by adding system run delays, but that didn't worked
I ran a test and they appear to act simultaneously :(
So the timer approach is the most likely solution, right?
I'll recreate your setup and fiddle around with some stuff, see if there's a simpler/better solution
Is it something like this? Some entity that, when interacted with, runs an event on the player that invokes /replaceitem; then an animation controller on the player that changes states when q.is_using_item evaluates to true, which then reads the player's held item (here I am using /execute, not sure what you use)
Is similar, I just have the replaceitem directly in the interactable entity, inside an event with a queue_command. And I use another player's event to trigger the projectile instead of en execute command. But it kinda works like that
Hi, everyone! Is there a way to launch custom projectile if it doesn't have a runtime_identifier? I tried to do this with the command "summon xxx:projectile" and also with adding the component "minecraft:spawn_entity", but the projectile does not move after spawning
What's the fastest way to trigger a command when a projectile hits a NPC entity? (having in mind that since it's a NPC, it can't take damage)
@sterile flint Assuming that the plain brush is usable, the controller only switches states if I hold the Use key. Hitting it briefly while looking at the interactable entity does replace the item, yet it doesn't make the controller change states.
Is there anything else different about my setup from yours?
It's a large project, so there may be other things messing with it. But I just managed to prevent the switching to fire the projectile with a minecraft:timer component added to the player.json as we talked about yesterday
Now I'm facing a secondary issue: the "red_brush" can also be interacted with a specific block to replace that item for another one called "orange_brush". In this case, the "red_brush" does trigger a projectile, not like the "brush", which doesn't have any projectile attached
So in this case, I'm still unable to prevent to fire the red projectile when I interact with the "red_brush". I was able to prevent to fire the second projectile on the switch, meaning the projectile attached to "orange_brush", the same way I prevented to fire the "red_projectile" on the first switch. But since I already have the "red_projectile" item in hand, when I do right click to interact with the block to change the item for the orange one, it fires the first projectile no matter what
I've faced with this issue a couple of weeks before and I tried to solve it by trying to prevent to fire any projectile when the player interacts with this specific block (which is the one that does the item switching via scripting), but I haven't got any luck yet
So I just used "sneaking" to change the brushed and added a query to fire the projectile that checks if the player is not sneaking. So, when you're sneaking, you won't fire any projectile but you can switch the brushes
But to be honest, the audience for this project can have a hard time learning about the sneaking thing
It'll be confusing for them
So I rather just have them firing projectiles when trying to switch brushes (which won't do any harm more than just looking weird) than adding a secondary action (sneaking)
But if I have a way to solve this projectile firing thing, that'll be perfect
So from what I understand about the specification:
- the player is given a Brush item that rotates to various colors, each color being its own item;
- the colored Brushes fire projectiles on hitting the Use key;
- the player presses the Use key on some entity/block to switch Brush colors
Would it be unintuitive for users to perform the last instruction with the Attack key instead of the Use key? I'm not sure if that fits within the scope of your project, but that could avoid the problem entirely
That's exactly it. The switching is done by pressing the use key on different blocks (one for each color)
The last you mean the projectile firing?
Or the brush switching
If you mean the projectile firing, chaging that right now is not a possibility since it would mean to change a lot of files
Brush switching, yes
And if you mean changing brushes with the attack key, that was my first option
Let me tell you what I've tried and didn't worked
First, have in mind that this will be played in adventure mode, meaning that the world will be unbreakable, which also means that when a player attacks a block, is not registered as a hit. So I had to do some workarounds first to register an attack as a hit
That's easy to solve by a /give command with a "minecraft:can_destroy" NBT tag
So the hit will be registered
Now, what I did managed to do, is to use scripting to replace the brushes after a block breaking
But since I don't want to player to actually break the block, it won't do anything with just 1 hit
(I added a "minecraft:destructible_by_mining" with 9999 seconds, so the block won't break)
So if I find a way to change the brushes with just 1 hit to the block, with the specific brush in hand, that'll solve my problem
I believe there is an EntityHitBlockAfterEvent in scripting that is stable
Besides, I prefer not to have the same action button to switch the brushes and to fire the projectiles
Yes there is. Let me check with chatgpt if I can get a code working... (by the way, I'm new to scripting, so I've created every script with chatgpt and the help of some fellow dev 😅 )
Ok, at least this code is not working:
world.events.entityHitBlockAfter.subscribe(({ entity, item, block }) => {
if (block.typeId === "let:maceta_flores_amarillas" && item?.typeId === "let:pincel_red") {
entity.runCommandAsync("say item reemplazado");
}
});```
GOT IT WORKING! @frank carbon
world.afterEvents.entityHitBlock.subscribe(({ damagingEntity: source, hitBlock: block }) => {
if (source?.typeId === "minecraft:player") {
const itemStack = source.getComponent("minecraft:inventory")?.container.getItem(source.selectedSlotIndex);
if (itemStack?.typeId === "let:pincel_red" && block.typeId === "let:maceta_flores_amarillas") {
source.runCommandAsync("replaceitem entity @p slot.weapon.mainhand 0 let:pincel_orange");
}
}
});```
Now if I hit the block, it'll change to the brush!
@frank carbon done, I have the entire system working, left click to change the item, right click to shoot the projectile. That's exactly what I was looking for. Thanks for motivate me to look into it!
¿that train is using the Minecart Runtime?
{
"format_version": "1.8.0",
"minecraft:client_entity": {
"description": {
"identifier": "jay:goblin",
"materials": {
"default": "entity_alphatest"
},
"textures": {
"default": "textures/entity/goblin"
},
"geometry": {
"default": "geometry.goblin"
},
"scripts": {
"animate": ["walk_controller", "attack_controller"]
},
"animations": {
"walk_controller": "controller.animation.goblin.move",
"attack_controller": "controller.animation.goblin.attack",
"attack": "animation.goblin.attack",
"idle": "animation.goblin.idle",
"move": "animation.goblin.move"
},
"render_controllers": ["controller.render.default"]
}
}
}
goblin.entity.json^
my animations arent valid for this?
format version 1.10.0
where you have placed your animation controllers
Also send the file
how do i make an entity constantly looking at player
"minecraft:behavior.look_at_target": {
"priority": 0,
"angle_of_view_vertical": 360,
"angle_of_view_horizontal": 360,
"look_distance": 40,
"probability": 1.0,
"look_time": [200, 200]
},
"minecraft:behavior.look_at_player": {
"priority": 0,
"angle_of_view_vertical": 360,
"angle_of_view_horizontal": 360,
"look_distance": 40,
"probability": 1.0,
"target_distance": 40,
"look_time": [200, 200]
},
using this but not working
rp | animation_controllers | <file>
{
"format_version": "1.12.0",
"animation_controllers": {
"controller.animation.goblin.attack": {
"states": {
"default": {
"transitions": [
{
"attacking": "q.is_delayed_attacking"
}
]
},
"attacking": {
"blend_transition": 0.2,
"animations": ["attack"],
"transitions": [
{
"default": "!q.is_delayed_attacking"
}
]
}
}
},
"controller.animation.goblin.move": {
"initial_state": "standing",
"states": {
"standing": {
"blend_transition": 0.2,
"animations": ["idle"],
"transitions": [
{
"moving": "q.modified_move_speed > 0.1"
}
]
},
"moving": {
"blend_transition": 0.2,
"animations": ["move"],
"transitions": [
{
"standing": "q.modified_move_speed < 0.1"
}
]
}
}
}
}
}```
You don't need look_at_target, probably that component is interrupting the look_at_player component.
controller.animation.goblin.attack has no initial_state
Is it possible to make a boat like the vanilla one?
ooo, I should put "initial_state": "attacking", correct?
where have you put your animations?
yes
initial state: default
I cant send my animation file
rp | animations | <file>
🤷♂️
Did you make sure that the animations folder does not have capital letters? Something like this "Animations"
yes none
should I make the animation file 1.10.0?
I assume that the names of your animations match the names in the entity client
yes
ok, there is a mistake in your animations
the look at player alone isnt working for me
the file? or the animations itself
you have manually manipulated your animations it seems
You have put an animation inside another
wait working now, just have to modify the time lol. thanks all
wdym?
the only animations I have are my goblin one and I put those all in 1 file
the one I snet
You don't need to set the angles
okay yes the old ones went away thank you! but I have some new ones
with the animation controllers
try adding "loop": false in your attack animation and use version 1.10.0 in your animation controller,
omg i love u
Does the on_attack parameter on the behavior.delayed_attack working
what did you use to fix the animations? i need to redo some of them
Your animations were poorly organized, they were one inside the other, that was never going to work.
I just organized it
I think it's bugged, it never worked for me
Yeah I was trying to use it but it just don't work hope they fix it
Had to rely on animation controllers
Yes, that error has been there for more than a year without being fixed, I guess nobody reported the bug.
is it not possible to replicate the vanilla boat?
Your movement value is too high
its 0.2?
i want to make that the engine entities works like the Lifeboat Trains. like rotating to the rail direction without using the minecart Runtime, coupling them to a tender, coach, truck or other engine
The speed multiplier when it has target
yeah its x1 shouldnt that times it by 1
Wait why is your behavior.attacks priority is 0
It should be alteast 3
Does anyone know how charge_charge range attack work I followed the documentation but it doesn't seem to work maybe I did something wrong
"minecraft:shooter": {
"def": "snowball"
},
"minecraft:behavior.ranged_attack": {
"priority": 3,
"attack_radius": 30,
"attack_radius_min": 0,
"burst_shots": 10,
"burst_interval": 0.5,
"charge_charged_trigger": 2,
"charge_shoot_trigger": 0.5,
"swing": true,
"set_persistent": true,
"attack_interval": 5,
"ranged_fov": 360
},
The goal is the entity should charge for 2 seconds before firing a baradge of attacks for 5 seconds and it will cooldown for a very long time cause it will only use this behavior once
any idea of that problem?
Heyas! I'm trying to create something like a boat where you can ride it and move it around but I cannot get it to work. Is there something special I need to do or is this just impossible?
Just copy the files of the boat in Minecraft and change its model
Ayone know what this is
I have all but done that already... Could it be the family stuff? What precisely am I looking for in the components?
The runtime identifier did you use boat
I don't want to clobber all the boats... sigh
But it is an interesting idea which I wasn't sure you could do because I definitely do want to clobber all the chickens and stop the egg laying every 5 minutes.
¿someone knows how to make an animation controller or function that rotates the engine to the current rail specific direction?
I think there is molang called q.target.body.x_rotation or q.target.eye.x_rotation that takes the rotation of your body and rotates the block you want to turn like the wheels
Plss help me
If your talking about animation in resource pack
How can i do it in BP?
You can use desired path where chooses a specific type of block to walk on
Does distance_to_nearest_player filter inside a behavior component only check for the player that activates the component?
Hey guys, I have an entity that’s programmed to follow another entity by targeting it, but what I want to achieve is for Entity 1 to detect Entity 2 within a radius of 10, and then keep moving toward it until it gets within a radius of 1. In the behavior target component, what should I modify?
I’m not sure which specific instances I need to modify in the component to make this work
Im still new and have no idea how to script. But I think this could be achieved by taking the behavior of other mobs (baby, allay, tamed animals) and attach it to the entities json or behavior json.
Those can get pretty convoluted but easy enough to understand
I think you would just add it straight to its components. Component group if you want the behavior to be given in game
If you dm me, I can get a better idea of what you specifically want so I can work on it. I need an excuse to put things in the old experience folder.
How can i have an entity play passive particles effects?
@little cloud should I get rid of the behavior nearest attackable target to use this use?
how do i add animation applicable to a player that scales their root bone to 0
how do i change an entitie death sound?
I have an entity I want to change the .geo and the skins after a "hatching" event...I I can't figure out the render controls to make it work...it showing both .geo models and skins at the same time...how do I split them to different models for specific "component groups"
In your hatch event add a component groups where it has this skin id and set the value whatever you want then in your resource pack create 2 types of render controllers one for the not hatch and 1 for the hatch the used the skin id component to detect if the skin id value is 0 this will be the render controllers etc.
Counfused....
So...I have 2 stages where it's an egg...them need to have mark varent 1.
is it possible to make an animation that makes a player's model translucent
how do i create an animation
i have this:
{
"format_version": "1.8.0",
"animations": {
"animation.scale_root": {
"loop": true,
"bones": {
"root": 0
}
}
}
}
in rp/animations but i can't play it in-game (or then the animation itself is just broken)
You want to use a render controller for this.
@nova plume 
as i said set a to 0
how do i make an entity drop its inventory's contents (like a player does) on death
script
"exe:dropInv": {"minecraft:transformation": {"drop_inventory": true}},
sound_definitions
not needed, prob
he just have to use triggerEvent thing to give the entity this component group
Then unnecessary, just use the script entirely
anyways,
how?
{
"format_version": "1.14.0",
"sound_definitions": {
//don't use the namespace, just the name
"name.hit":{"sounds": [""]}
}
}
im not entities expert
in
RP\sounds\sound_definitions.json
just "uranium.hit":{"sounds":[""]}?
yeah
and inside of the entity.client, i should add sound effects thing
and add the hit sound inside of it
right?
mb it is
.hurt not hit
alright
🤡 wait it is not sound_definitions

what is exe:dropInv
& where do i put this exactly
also how do i add an equipment component to an entity
{
"format_version": "1.21.0",
"minecraft:entity": {
"description": {
"identifier": "tr:combat",
"is_spawnable": true,
"is_summonable": true
},
"components": {
"minecraft:equippable": {},
"minecraft:breathable": {
"total_supply": 15,
"suffocate_time": 0
},
"minecraft:health": {
"value": 80,
"max": 80
},
"minecraft:equipment": {
},
"minecraft:loot": {},
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true },
"cause": "lava",
"damage_per_tick": 4
}
]
},
"minecraft:collision_box": {
"width": 0.6,
"height": 1.8
},
"minecraft:nameable": {
"always_show": true,
"allow_name_tag_renaming": false
},
"minecraft:inventory": {
"inventory_size": 36,
"private": false
},
"minecraft:physics": {
}
}
}
}
this is what i have rn
"component_groups"
in script if i try to get the equippable component of this entity it returns undefined
i used that simple method, to drop the entity inventory
via scripts or commands
or anything
rp/sounds.json
{
"entity_sounds": {
"entities": {
"ie:name": {
"events": {
"death": "",
"hurt": ""
}
}
}
}
}
that can trigger the entity event
do u know
equippable not supported for none player entity
it doesn't work
you can't use equippable on anything other than player ??
is that what you mean
how come skeletons & zombies have armor equipped then and they can have offhand items
you can't use it in scripting
yeah
done
but u can detect if the entity is wearing the specific armor right?
with commands
lemme check something
so the RadShield Armor in my addon works only for the player, not other entities
other entities needs to be done using commands or functions, which i will not be doing
yeah
commands can be used in scripting tho
bec, why, just why would u make that armor for ur zombie pet something
i know, but its pointless to make mobs wearing the protective armor to survive the radiation
also, should i make the ore has its own particles via entity.client or via scripts?
the particles will always be played, so i think using entity.client will be slightly better than scripts
idk im not entities expert
client entity
what bone's scale do i set to 0 if i wanna hide whole player
{
"format_version" : "1.8.0",
"animations" : {
"animation.scale_root" : {
"loop" : true,
"bones": {
"scale": 0
}
}
}
}
w this it looks like that
the arms, cape & torso are hidden but not legs or head
can i make a render controller or wtv you use to change an entity's transparency to override invisibility
We can have the minecraft:loot component in component groups, right? Does that mean I can do different loot tables for, say, an angry bee and a not angry bee?
yes
all components can be in component groups
Cool, thanks!
root
@nova plume js "particle_emitters": {"isotopic_uranium": "exe:isotopic_uranium"}, "particle_effects": {"isotopic_uranium": "exe:isotopic_uranium"}which one?
i, dont think i can make those particles playable in that way
hmmmm
i think i have to use an animation file, that will have a locator thing that is used to generate the particles
and using a "script": "per_animation" thing to generate the particles
entity.clientjs "animations": {"fog": "animation.isotopic_uranium.fog"}, "scripts": {"animate": ["fog"]}
animationjs { "format_version": "1.8.0", "animations": { "animation.isotopic_uranium.fog": { "loop": true, "animation_length": 1, "particle_effects": {"0.0": {"effect": "exe:isotopic_uranium"}} } } }
uh, why no particles?
You need to add in the client the "particle_effects": {
"<short name>": "<particle name>"
]
}
this thing?
Uhuh
particle_effects is just a short name for the particle so you can call it from the animation
my brain hurts
"particle_effects": {"isotopic_uranium": "exe:isotopic_uranium"},
"animations": {"fog": "animation.isotopic_uranium.fog"},
"scripts": {"animate": ["fog"]}```?
Then in animations you use the isotopic_uranium
just had to remove the exe: from the animation
itt should spawn the particles now right?
Should be
yah i see
lol
We can make a controllable drone in the next update because of the get movement thingy²
And it's accurate to detect wasd while the movements are disabled
I want to make an entity attack that makes enemies approach peacefully to the attacker. Kinda like holding wheat makes cows follow the player. How can I make this?
Not easily possible, but you could use a damage sensor to detect projectile damage, check if the entity was put into a wall and make it unable to move with a component group.
I just used egg runtime identifier but thank you
Ah, thought you wanted to make what you said, make the entity get stuck, not just create a projectile 👍
Can someone help on how the entity that takes the texture of the ground works
i gotta learn how to do behaviors.. but is there a way to make an entity run towards the nearest of a certain type of entity if an event is triggered?
Does anyone know how I can create an event that changes the player's hit box?
I just did it
that does not support molang.
😦
is there a way to do that or would i have to create 10 events and 10 components
10 component groups and events.
yup.
😱
Hitbox not collision?
Guys, what's the best way to make a phantom-like flying entity "fly" a vertical path set by different dummy markers, without doing weird spins between each target?
This is what it's doing right now. I want it to fly straight to the targets
Which components would you use to achieve a more linear path?
Can I make an entity shoot two projectiles at the same time?
probably easier to fake it tbh
Fake it how?
animation
