#Entities General
1 messages · Page 14 of 1
So the vanilla mechanics are currently closed source?
What?
In short, I would like to do what is already possible to do on the wolf, but in my custom entity, is this possible or is it impossible because there is no way for the mob to identify that it should apply dyed armor?
That's not what I'm saying.
Custom armour is possible. The issue is whether or not you can equip that custom armour on an entity. For all non humanoid, it isnt possible since there is no slots for them.
but what about this? "equip_item_slot": "slot.armor.chest",
is used in the wolf files
I believe he is not a humanoid creature
this is kind of confusing
Is there a way i can make it where when I use the horse power jump component on the entity im riding on shoots a projectile
Certainly hope so
Anyone know why move_to_block doesn't work with doors?
why can't I kill this entity?
does anyone know how the beacon's light beam works? I'd also like to reproduce an entity that points infinitely skyward.
check the health
what's the health in the code.
does it have a minimum of 1?
I’m very surprised there are not hundreds of goblin chef addons based on the Microsoft tutorial. I want one, but I don’t feel like following the tutorial to make one. I think he’s kinda cute. I’d make him hang out in swamps and make stew. 🍲
How can I make an entity go through walls?
Are entity properties preserved when the entity turns into another entity with the same properties?
I don't think the entity will preserve it.
because it's a whole new entity with a different ID
tho it's not hard to transfer it
Do the sittable "sit_event" and "stand_event" fields just not work?
They don't seem to trigger the event
*they do work, but the documentation is wrong. The documentation says it is just a string, but it's actually like this:
"minecraft:sittable": {
"sit_event": {
"event": "minere:follow",
"target": "self"
}
}
Typically this kind of thing would work without the sub-fields. Ex...
"minecraft:sittable": {
"sit_event": "minere:follow"
}
That didn't work, though?
Incidentally, curious about what you're doing with the sittable component. I've also been playing around with it lately with wolf behavior changes.
What does your event do?
if you use a bone or stick on a wolf, it removes the "follow" component
if you make it sit or stand, it re-adds it
so you can have tamed wolves wander your base
Then also same thing for cats, but string instead of bone
this did not work
"minecraft:sittable": {
"sit_event": "minere:follow"
}
Should 'Entity.isValid()' return false if an entity is unloaded?
"minecraft:behavior.move_to_block": {
"priority": 12,
"tick_interval": 1,
"start_chance": 1,
"search_range": 8,
"search_height": 5,
"goal_radius": 1,
"stay_duration": 40,
"speed_multiplier": 1.5,
"target_selection_method": "nearest",
"target_offset": [
0,
0,
0
],
"target_block_filters": {
"test": "is_waterlogged",
"subject": "block",
"operator": "==",
"value": false
},
"target_blocks": [
"minecraft:acacia_door",
"minecraft:bamboo_door",
"minecraft:birch_door",
"minecraft:cherry_door",
"minecraft:copper_door",
"minecraft:crimson_door",
"minecraft:dark_oak_door",
"minecraft:exposed_copper_door",
"minecraft:iron_door",
"minecraft:jungle_door",
"minecraft:mangrove_door",
"minecraft:oxidized_copper_door",
"minecraft:spruce_door",
"minecraft:warped_door",
"minecraft:waxed_copper_door",
"minecraft:wooden_door"
],
"on_reach": [
{
"event": "reach"
}
]
}
This dosen't work for some reason
It has priority 12
It might be getting executed
Try priority 0 and see what happens
Also simplify as much as possible while debugging
How can I make a player immortal?
Modify player.json and add a damage sensor component that makes it immune to damage
Or give them Resistance V potion effect
The player must take damage but not die
And I have to do this without using effects
Did they removed the min in heksth component?
You can use scripts to detect when a player takes damage and set them to full health
It won't stop 1hk though
just check if the health 1, if 1 do disable the damage....
What if they have 2 health and take 5 damage?
I was about to say that
tho he got no choice.
Isn't it possible to increase the player's health?
yeah, but you need to apply it as a component groups
I don't know how to do this 
Is there a way to detect if an entity is unloaded?
IsValid() still seems to return true
just check in scripts with getEntities() and store the .id of the mob somewhere else, and if it's still in the array of getEntities() or not anymore
its possible to stop an animation in mid way and keep the positions?
can someone help me out? how does texture mesh works, because when i add a second bone to the model it simply vanish
inside the game
????
anyone know why my player json file is not working?
i have given the tag safe to myself and my other acc
and I still deal damage somehow
I also use blockception's typings
@tacit ledge What is the format version of the player definition you are editing?
Try 1.21.50
In one of the more recent versions, Mojang changed the "deals_damage" property. It went from a Boolean to a string enum
hm doesn't work still
my scripts work though
wait i lied
sorry i used wrogn tag
wqorks now!
thank you
lmao
Does anyone here know how to make a dragon that breathes fire or attacks with melee who can help me learn
How do I fix this issue where depending on what you put on first depends what will be overlay on each other. I want the saddle to always overlay the armor.
@lapis knot I've never dealt with this before, but apparently you have to put something like this in the information of the item you want to trade.
"functions": [
{
"function": "enchant_with_levels",
"treasure": true,
"levels": {
"min": 15,
"max": 25
}
}
]
Thank you so much
Hey can anyone help me learn how to make a dragon...or any entity for that matter im terrible at block bench
can i change opacity of a texture without modifying the texture itself?
My projectile entity (using arrow runtime identifier) is generating bubbles underwater despite having the breathable component with generates_bubbles set to false
Is there any other way to disable the bubbles
hi there, is there any material that allow me to change the color and also transparency?
Hey can anyone help me learn how to make a dragon...or any entity for that matter im terrible at block bench
So, i did this attack animation.
So... How i code it to work. I tried and didn't worked.
Does anyone know if we're able to add custom animations to players without editing the player.json file?
make animation out in animations folder and play it with /playanimation or Entity.playAnimation()
With an entity placer, how can you make an entity rotate to cardinal direction?
A specific or just nearest?
Just the nearest
In 1.21.70 that will be possible.
I wonder how long that'll take
thank you!
are you able to play with with priority aswell?
Do a simple math, you already have a javascript
unexpected crash out.
Hi, I would like to ask for help for something incredibly stupid but I don't know the reason for the failure:
I don't know what I touched. But trying to make the attack animation work, somehow, now the entity is invisible and I don't know what went wrong.
Helloo, would this line still work in current minecraft version?
It's part of a bat's json and was wondering if I could edit the specifics and still find it working, especially the health detection part of the mob
"filters":{
"test":"actor_health",
"subject": "self",
"operator": "==",
"value": 15
},
"event": "minecraft:bat_healt_15"
}
]
}
},
"events": {
"minecraft:bat_healt_15":{
"run_command":{
"command":[
"help they attack me",
"effect @s instant_health 1 255 true"],
"target": "self"
How do I make the transition between 2 animations smooth?
Wouldn't you need proper animation controller and timing n stuff?
Np. I didn't do anything.
I think I may have to drop this and use scripts to detect mob health and run the command
run_command has been renamed to queue_command
No, population control is used for the mob cap.
Ah, I see the confusion. Population control just controls the global mob cap. Yuo're probably htinking of weight which factors in all mobs that can spawn in that biome.
Yeah.
Now Teto does absolutely nothing, don't movie, react, anything.
It's supposed to, besides moving and everything, react to being hit or become hostile at night. But it doesn't do anything. WHY??
Look how stupid she looks
Somebody help. I can share the files for revision to find the error.
Ksasane Teto Addon tomorrow
What is more optimized? Having one damage sensor with many triggers or several damage sensors, each in a group of components
dev?
Technically the second one. But I find that pattern to not be very extendable.
Having one damage sensor with many triggers lets you combine functionality much more easily than trying to build out every damage sensor combination
Does behavior.go_home not work?
How to make a entity, not hittable ?
like invisble, i want it to have no hitbox or anything
@wary radish can u help
that's just what i wanted. thanks
Does anyone have the full list of damage sources?
The wiki says there's more but the link it directs to is not found
How to make an entity delay area attack damage, like with "delayed_attack"
Chat why does this not work? Sorta wanna make an entity immune to all damage types save for magic damage like potions
"minecraft:damage_sensor": [
[
{
"cause": "all",
"deals_damage": false
},
{
"cause": "magic",
"deals_damage": true
},
{
"cause": "fall",
"deals_damage": false
}
],
{
"cause": "fall",
"deals_damage": false
}
Does the delay_filter in spawn_rules count seconds or ticks?
Also, how to make my entity spawn twice a day? Like one at evening or night and one at sunrise or day
Do it with script api..
It's maybe possible with scripting in my perspective
ticks.
that's strange I tested it with min 200 and 300 and it spawned after like 7 or 8 minutes
Oh no you're absolutely right. It's esconds.
I just double checekd my code, my bad.
is there any way to guarantee spawn after delay
is there a way to prevent the bobbing animation on attachables?
is there any filter tags for detecting slime chunk
Hello, is there a way to access an entity inventory only if you're holding a specific item?
Does the add field present on minecraft:transformation component adds the selected groups to the entity after the transformation?
I think the code is wrong can you guys pls help?
- you should've asked it on #1067876857103536159
- just click on that abc button when adding the 3
does anyone know if we're able to make custom animation controllers for the player
yeah, why not?
My bad could you please let me know what this section is for?
np, its abt entities (aka mobs)
Thanks a lot is there a section that gives information on other sections?
no need, they are on the name of every channel
Thanks that’s all I needed
no problem
This is possible right? I want my entity to test if the block has a state
following https://wiki.bedrock.dev/entities/entity-holds-item.html , why isnt the item rendering in the correct position? sounds like the same problem this person was having but they didnt say if they resolved it #1067870133328027730 message
EDIT: for some reason, it requires the hierarchy to be leftArm -> rightItem, not rightArm -> rightItem, i have no idea why, but that fixed it, putting this here incase someone else runs into the same issue
hmmmmm is there any way to have it still work from within other groups? sucks i cant have it within my body group that is essential for existing animations to work with correct hierarchy
need it to work in main -> body -> leftArm -> rightItem for example, surprised to see bedrock still so rigid for something so important
gotta be a way to use a locator / attachable for a custom entity to display equipped item in hand that way
ah, i didnt know about the enable_attachables flag for entites xD
so i guess i accidentally found a bug then, leftArm rightItem works without enable_attachables, which is just really weird, but it doesnt allow having it within other groups, once i set enable_attachables i was able to right rightArm rightItem and put it within other groups so animations work, derp
edit: the bug is probably a fallback so ancient entities work without attachables
also this is for bartering which likes to use the left arm
Does delay_filter in spawn_rules guarantee spawn after the min or max time running out?
Hey guys, is it possible to make the death animation extend longer? (I am using custom death animations)
is there a way to make the player legs invisible when a certain armor is equipped?[i think this falls into entity, new ro coding please cprrect if im wrong!]
Is there a trick to make an entity go down stairs faster? I'm not talking about stairs that go up vertically. I'm talking about a slope. I've tried everything and I can't think of anything anymore 😔
yes, you can do it using render_controllers
how can I stop minecraft:npcchanging my entity name to NPC?
How do I make creepers run away from players with the tag "cat"?
edit the filter in the minecraft:behavior.avoid_mob_type component in the creeper.json file.
Use the has_tag filter.
thank you!
np
Is there anything wrong with this code snippet? It doesn't seem to be working
"minecraft:behavior.avoid_mob_type": {
"priority": 3,
"entity_types": [
{
"filters": {
"any_of": [
{ "test": "is_family", "subject": "other", "value": "ocelot" },
{ "test": "is_family", "subject": "other", "value": "cat" }
]
},
"max_dist": 6,
"sprint_speed_multiplier": 1.2
},
{
"filters": {
"test": "has_tag",
"value": "race_feline"
},
"type": "player",
"max_dist": 10,
"walk_speed_multiplier": 1.2,
"sprint_speed_multiplier": 1.5
}
]
}
yes, that's wrong.
you cant have multiple filters keys
edit the current filters.
ah ok
all you need to do is add a new test in any_of
this still doesn't seem to be working
"minecraft:behavior.avoid_mob_type": {
"priority": 3,
"entity_types": [
{
"filters": {
"any_of": [
{
"test": "is_family",
"subject": "other",
"value": "ocelot"
},
{
"test": "is_family",
"subject": "other",
"value": "cat"
},
{
"test": "has_tag",
"subject": "other",
"value": "race_feline"
}
]
},
"max_dist": 6,
"sprint_speed_multiplier": 1.2
}
]
}
I checked it but didn't work
Why does the entity die?
"minecraft:damage_sensor": {
"triggers": {
"on_damage": {
"filters": {
"all_of": [
{
"test": "has_damage",
"value": "fatal"
}
]
},
"target": "self",
"event": "bd:death",
"deals_damage": false,
"cause": "fatal"
}
}
},
However, the event is fired
but the entity just die
I followed this guide
how do i fix my projectile entity?
it only looks in 1 direction
and i cant do tp ^^^1
it acts as if its ~~~1
do i need a certain component to make the head look forward?
Can I ask here how I can make a spawn egg spawn a random premade variant?
Do you want natural spawns of your entity to be randomized as well, or only spawns from the spawn eggM
Does anyone have any tips on how I can make a Souls Like style boss?
Only the spawn eggs, sort of like a gacha ball, if you know one of those. :>
Gotcha. So for that, the easiest way may be to have an item to spawn a random variation of one with a script through a custom component
I'm thinking, you get a "coin" that you hit with a custom mob, and if that custom mob is hit by that specific coin, it spawns a random mob from an array through a script?
That could work with an entity hit entity event, yeah
Or I suppose a queue_command event in the entity which then triggers a script event would probably be slightly more performant overall so it isn't doing the checks every time you hit an entity
Mmm true
I'm still learning scripting so I'll play around for a bit
Thanks for your time :]
How can I make a mob use projectiles like snowballs? I tried with replaceitem but they turn it into melee using this
"filters": {
"test": "has_ranged_weapon",
"subject": "self",
"operator": "==",
"value": false
},
"event": "minecraft:melee_mode"
},
Do I have to change their filter to detecting for projectile?
"test": "has_ranged_weapon",
"subject": "self",
"operator": "==",
"value": true
}
]
},
"event": "minecraft:ranged_mode"
Wait nvm, I'm just dum. I got it
Is there a guide/standard for making tutorial books?
Would projectiles (snowballs, enderpearls, throwable potions) be considered ranged weapons, and could they activate the filter
minecraft:has_ranged_weapon
?
Nvm, stoopid again. Just gotta give the mob a crossbow while the shooter component shoots the custom projectile
How feasible is it to make a mob that can threaten a player that is flying with an Elytra?
Like an Ender Raptor that shoots homing missiles
I would think that players just move too fast and the server wouldn't be able to keep up
If I have my sounds.json setup like this:
"minere:dire_wolf": {
"events": {
"ambient": {
"pitch": [0.9, 1.2],
"sound": "mob.dire_wolf.howl",
"volume": 5.0
},
"angry": "mob.dire_wolf.growl",
"death": "mob.dire_wolf.howl",
"hurt": {
"pitch": [0.9, 1.4],
"sound": "mob.dire_wolf.growl",
"volume": 1.5
},
"step": {
"pitch": [0.8, 1.2],
"sound": "mob.wolf.step",
"volume": 0.85
}
},
"pitch": [0.8, 1.2],
"volume": 1.5
}
Does "1.5" overwrite the volume for "ambient"? Or do they get combined into 7.5?
Does hurt_on_condition not fire an event?
Maybe find a way to spawn an entity riding the player flying, and then hurt the player when it's riding them. This way you don't have to try to match speed etc..
I recall older addons having trouble with modifying the player model. Mainly bedrock player models that in turn changes the player's skin to either a bugged out mess, or defaulting to something else. Either way, it makes player with bedrock models and their cosmetics unusable and thus force them to use a skin similar to Java.
My question is there in fact a way for an addon to modify these player models?
Or is it truly hardcoded to simply not allow these cosmetic bedrock models to not work.
This is when you have addons that either change part of a player's model (ex. adding or replacing body parts), or even modifying the player's animations.
And that said, if it is not possible. Would a user rather be able to make a custom model of a player, and assign that model to a specific player?
Namely one or more players have customised models, but any other player (regardless of what type of player model/skin they are using) can still join with their default appearance.
¿someone can tell me if is possible to make that an hostile entity able to add effects to its target (only player) when you look at the entity?
Example: Tinky Winky in Slendytubbies 1, he ONLY can kill the player when the player LOOKS AT HIM, ¿how can i make something similar like that but instead of a insta kill it gives a wither effect to the target?
Is there any documentation of the pre-defined materials resource file(s) used for all entities in the game (like a sheep or a chicken), and if so where to view it?
Is it possible to activate the creeper with a custom item without changing the entity's json?
either use the /event or Entity.triggerEvent() in scripts.
Are there plans for EntityCustomComponents?
what?
you want to make making entities hard?
It doesn't make it harder
It's only used for scripting
It's an alternative to having to listen for entity damage events, entity spawn events, etc
You just attach the component and you can write all of the logic for an entity in one place
A lot cleaner
uhh, entityHurt? entityDie? entitySpawn? entityHitEntity?
why would they make another one if that exists already? Also the only missing parts are before vents in entity hurt and entity die
also iirc they don't plan to do it in entities at all, not rn but future probably but it's kinda useless to add the custom components thing yet.
custom components are not even Custom components more like custom tags
They did for item components
It's a cleaner way to attach events to a specific entity
Instead of having something like
-
entity hurt event
-
Is entity a yeti?
-
Do something
You would just have a component attached to the yeti, and when the hurt event triggers you already know what it is
Same logic behind Item and Block custom components
You could implement the logic without the custom components, but the components make it a lot nicer
sigh
in that case, make a post or ticket you want to implement.
imo, it's not needed to support custom components like blocks and items.
Nothing known. I wish though.
🙂 Custom components for entities won't be harmful.
It's just additional stuff utilising the scriptAPI. Ideally, using custom components for custom navigation.
V2 changes that 🙂
i mean yah, I never said they shouldn't add it.
You implied so. To me anyways.
I said they wouldn't add it yet
tho idc, if they add it then add it lmfao
Oh yeah I forgot about that.
I did not see "yet" in your previous messages.
not specifically saying yet
Some oen can help me #1349847728024191057 ?
could be set with a tag, it would be more practical and there would be no need to edit the entity file
If a mob uses a function command, for example,
Tp @s ^^^0.75
Function tp_2
tp_2
Tp @s ^^^0.75
Would this work? Like, if the mob activates it through events, would the second function still teleport the mob "@s"?
Yeah, it's the initiator of the command
although you might need to use execute at @s since the position of the command isn't given
Someone else also said, thank you
Hello!
I have a quick question, how can I make custom geometries appear in the menu/hotbar instead of an icon?
How to make my entity break blocks but not instantly. Break it like like the player taking time?
Also what's the maximum start_chance number in move_to_block?
You can do this with scripting
Dmm. What scripts shound work exactly?
If I have both sonic boom attack and summon (used by evokers) Should I set priority lower for Summon attack so it uses that first before any sonic/melee attack?
A lot but not super a lot.
can anyone help
unhandled request for unknown variable 'context.item_slot'
error on attachable
tl
is it possible to not render the item that the player is holding on to?
in first and third-person
I tried to set the model's rightItem to 0 but it won't help
try using render controllers
i see there is some possible files
item_default.render_controllers
item_sprite.render_controllers
persona.render_controllers
player.render_controllers
i am not sure which one can affect the item
Use the first person of the player's render controllers
is it possible to find "geometry.humanoid.custom" ?
i think i can't do it
it must be replaced by something
i tried to adjust rightItem position but it is not working
mc keeps me from doing it
i tried to bypass it by making a array in geometry
but it turned out that the item stuck at 0,0,0 , like everything is affected except the item
(╯°□°)╯︵ ┻━┻
thx for helping anyway 🙏
Is it possible to change the texture of the nameTag of 1 entity?
Chat, when I add fingers, should I keep them straight before I animate them? Like how the guardian's spikes are only animated to the entity rather than being sculpted directly on the entity?
help me?
Hi, has anyone had trouble running large functions? Like 500 or 1000 commands in a single function? In my addon they lag sometimes they are not even 50 command functions
I'm not sure if it's my addon, or the latest version has problems
It works fine on PC, but not on mobile.
I swear to god the hives uses another render controller for its cape rendering
When trying to enable persona for the player, I’ve done anything to remove the hive’s cape but it’s still there!
There must be a hidden render controller that they are using
why does my armor stand still break in survival {
"minecraft:entity": {
"description": {
"identifier": "minecraft:armor_stand",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"components": {
"minecraft:type_family": {
"family": [
"armor_stand",
"inanimate",
"mob"
]
},
"minecraft:collision_box": {
"width": 2.0,
"height": 2.0
},
"minecraft:health": {
"min": 600,
"value": 999,
"max": 999
},
"minecraft:knockback_resistance": {
"value": 1.0
},
"minecraft:nameable": {},
"minecraft:persistent": {},
"minecraft:physics": {},
"minecraft:pushable": {
"is_pushable": false,
"is_pushable_by_piston": true
},
"minecraft:conditional_bandwidth_optimization": {},
"minecraft:damage_sensor": {
"triggers": [
{
"cause": "all",
"deals_damage": false
}
]
}
},
"events": {}
}
}```
what's the vanilla knockback_resistance value for players?
0 ( prob lmao )
do you guys know the best way to create entity containers
and why people use the despawn componend?
Chat can I edit the family type to be a custom family?
"priority": 1,
"duration": 1.0,
"attack_time": 0.5,
"cooldown_time": 0.0,
"knockback_damage": 8,
"knockback_horizontal_strength": 3,
"knockback_vertical_strength": 2,
"knockback_range": 3,
"knockback_filters": {
"test": "is_family",
"subject": "other",
"operator": "!=",
"value": "player"
},
"damage_filters": {
"test": "is_family",
"subject": "other",
"operator": "!=",
"value": "player"
}
},
Yes.
Nice
i trying to make the worm but the 3rd teeth keep geting disappear even i change to alphatest or alphablend. Pls someone help
nvm remove and add back the geometry fixed it. Weird bug :/
I was doing stuff with my custom mob and it suddenly stopped working. The log tells me this:
the part of the code looks like this:
idk why there's an error, i couldn't find anything (but i am probably just blind :P)
can someone help please?
How to make my entity spawn in the air? Like 20-30 blocks high from the player
It's missing 3 closing brackets "}"
no they close further down, i just wanted people to look at the component group cr:tamed_raven
Can I do something like this? Because I have so many items
"minecraft:behavior.tempt": {
"priority": 5,
"speed_multiplier": 1.0,
"within_radius": 16,
"items": [
{
"tags": "query.any_tag('hycraft:is_food')"
}
]
},
How to make my entity spawn in the air? Like 20-30 blocks higher from the player
with commands or spawnrules?
Spawn_rules since with commands the spawning postion may not be ideal or valid
i dont think it's possible to make an entity spawn in an exact location, since spawn rules define the bioms entitys can spawn in, i think
No like the distance_filter
Hmm honestly, I think I might have to teleport it up in the after it spawns or give it levitation or smth
ye
One message removed from a suspended account.
Probably #1327317984338776189 will be useful for you
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
I don't really know much about materials to be able to help you 🙏
someone know how to fix this? i'm using slime outer and looks like this when i step out
@proud wharf sorry for the ping :<
+states DisableDepthWrite
Hey does someone know how to make multiple variants of an entity that can spawn? E.g. I spawn zombie but then zombie2 gets spawned with the chance of 50% or zombie3 with the chance of 10%
you have to make a companent group for each varient like this:
"zombie": {
"minecraft:varient": {
"value": 0
}
},
"zombie2": {
"minecraft:varient": {
"value": 1
}
}
for the spawning, you have to write like this inside events:
"minecraft:entity_spawned": {
"randomize":
[
{
"weight": 50,
"add": {
"component_groups":
[
"zombie"
]
}
},
{
"weight": 10,
"add": {
"component_groups":
[
"zombie2",
]
}
}
thank you
im guessing you just want to make the zombie to have visual variants right?
no
custom zombies?
yep
you can add the namespace of your mod infront of the component groups name
btw how can I change the speed of a mob?
its mostly a parameter inside of a component
depends on which kind of movement
wait a sec
you mean when you hit it or when it spots you?
ty
hi I wanted to know if someone can help telling me how can I make zombies snore blocks like doors
you german?
Yes
cool im german too
You have the German flag in your name how could you not be German xd
You joined discord on my birthday
omg lol
Hi, can someone help me with this? I want to make an entity that traps the player when hit in this way, but I've been trying for several months now, but I can't get it to work properly.
How can I make an entity sit inside another entity and have their hit box override the entity they're riding on so they get hit instead?
make the hitbox of the ridden entity smaller and the one of the riding entity larger ig
Might make it harder to fight once the riding entity dies.. but I'll consider it
you could give the player a tag and make the entity teleport the player when close enough to the player using either functions or scripting
I'd have to set the rider's seat position to be 0 0 0?
For it to be like, inside the entity
Is entity hitbox proportional to their size?
how do i do that sorry i'm new hahahahaha
my idea was that it is as shown in the image a mountable entity and that when this attack on the player the player gets on it and it is not heard to go down until the entity dies or reaches a certain height
well you could also do the ride command, as long as the entity is ridable that should work
Has anyone worked on replicating a warden's targeting behavior? Which components are responsible for targeting a valid entity? Or is the warden summoned via sound and will target any entity after that? I'm not exactly sure how it works
I managed to make the phantom a raidable entity and compatible with the commando ride. Now, how do I make it so that the player cannot get off by himself, that he can only get off when he reaches a certain height or when the phantom dies, and that the player gets on when the phantom attacks him?
what's the vanilla damage animation called? the thing that makes entities become red when they're hit
it's not an animation
is there any way to trigger it without applying damage?
no
The warden has an anger meter based on nuisances (noise, etc) it also has a filter for what doesn't cause it nuisance (other wardens and inanimates = armor_stand). If you want it to target any entity immediately, just lower the anger required for it to target anything faster than having it sniff and approach slowly.
Forgot to add that whatever causes it nuisance will be the target
disable the dismount button.
You could use /inputpermission command
but it only deactivates when I press shift if I press space if it is unmounted
then disable jump and sneak.
as
One question, can't I make this command affect only one entity?
It only works on players
So yeah you could.
how do I do it hahaha
I just want him to not let the player of a specific entity go down.
Could use radius
I did see the components that control this. Thanks 🙏
Happy to help.
Helloo. Will a mob's hitbox remain the same even if the size component of the mob is small? Like, a baby villager for example. I think it shrinks with the size xe
no
Question: I've seen people create custom storage containers with entities. But doesn't that slow the world down if there is too much?
Yeah.
That was fast lol.
No.
Now I suddenly feel myself joining the group wanting tile entities. Or at least some sort of chest component.
Aren't tile entities already a thing?
I am very certain they are not.
{
"format_version": "1.16.0",
"minecraft:entity": {
"description": {
"identifier": "cw:tick",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false
},
"component_groups": {
"cw:despawn": {
"minecraft:instant_despawn": {}
}
},
"components": {
"minecraft:tick_world": {
"never_despawn": true,
"radius": 6
},
"minecraft:damage_sensor": {
"triggers": {
"cause": "all",
"deals_damage": false
}
}
},
"events": {}
}
}```
How do I get my "cw:despawn" to run after some time after the entity spawns?
You can use the timer component that triggers an event that adds the CG.
Is there some way other than a custom spawn rule to make it so spawn rates of mobs are adjustable using for example a scoreboard value
How can I make a mob reliably equip any equipment or weapon I drop towards it?
I have been out of the loop for a few months, has anything changed that would allow an item to store entity NBT like a bucket does?
Not yet, our best is still the dynamic properties storing the available components.
any change to the available components for dynamic properties?
Cannot recall off the top of my head.
Uh
Is it possible to make an entity that once spawned does a command?
},
"wiki:execute_event": {
"queue_command": {
"target": "self",
"command": [
"function bos_initiate1",
"function bos_initiate2"
]
}
Like I got this, But even if the function part is changed to another command it wont work
WAIT
I think I fixed it with an animation controller code, Just looked through the wiki and found one for it for the behavior pack
minecraft:entity_spawned
The event name should exactly be that.
Is there anyway I can create a new look_at_target behaviour that allows both the head bone and a neck bone to move
I have a rather odd bug.
In my addon on a server, I cannot see a mob though can tell it is in fact there (water is splashing and killing the entity confirms it). But for some reason the entity's model and name does not appear correctly.
I asked other players who play on switches and pc. And they can see it. Though I cannot even though I am on pc and can see other creatures from the same addon.
What on earth? lol
do you have the documentation for entity event responses?
i can't find it on the offcial page
im looking for "set_home" in specific
not documented on the wiki yet
uh whats the default swim speed for the player I've set it to 1 and that is too high
ok the default speed is 0.02 lol
What component can I add to make an entity pursue targets from further distances, or at least not lose sight of them? Like, losing their aggro if the mob just moved 10 blocks out of their range
Someone helps me with these error is that it does not open my ui menu with the custom item
"controller.animation.horse_idle_move": {
"initial_state": "default",
"states": {
"default": {
"animations": ["idle_timer"],
"transitions": [
{
"idle_move": "query.all_animations_finished"
}
]
},
"idle_move": {
"on_entry": [
"variable.idle_move = math.random_integer(0, 1);"
],
"animations": [
{
"idle_move1": "variable.idle_move==0;"
},
{
"idle_move2": "variable.idle_move==1;"
}
],
"transitions": [
{
"default": "query.all_animations_finished"
}
]
}
}
}
Can anyone help me. I'm trying to make a various animation of my mob to play base on the variable value that has been randomize but the animation isnt playing. Its like the variable value cant be read in the controller.
Fuck that someone can nose I would appreciate it very much but please please
can anyone help me
in block bench
my animation is not exporting
with entity wizard
hi,someone can help me?
I've been struggling with a question for a long time. I'm making attack animations for vanilla mobs, but if I use v.attack_time to detect, the actual situation is that the damage is already dealt, and then the attack animation starts playing. The normal logic should be that the damage is caused after the attack action is made during the attack animation, but I can't detect the moment just before the attack damage is dealt. However, if I use delay_attack, some vanilla mobs like husks or cave spiders lose the potion effects that come with the damage after the attack, and they stand still while attacking, which greatly affects the vanilla experience. Is there a good way to solve this?
Since when did entitys not allow numbers at the start of an identifer
You can do it with items
Go onto the bedrock wiki
there is a sample for animation controller
Yes, but I think I have a good grasp of animation controllers
"controller.animation.ghost.attack": {
"states": {
"default": {
"transitions": [
{
"attacking": "q.is_delayed_attacking"
}
]
},
"attacking": {
"blend_transition": 0.2,
"animations": ["attack"],
"transitions": [
{
"default": "!q.is_delayed_attacking"
}
]
}
}
}
My current issue should be how to check before an attack occurs, for example, I want to predict whether an entity will attack
Yes, that's what I'm doing now, but if I use delay_attack, some vanilla mobs like husks or cave spiders lose the potion effects that come with the damage after the attack, and they stand still while attacking, which greatly affects the vanilla experience
I dont think you can 'predict' when it will, But play the animation at the same time as the attack im pretty sure you can do
yes
But it's not perfect
you didnt register the custom component
What entity uses the "minecraft:move_around_target" component?
I guess no vanilla mobs uses it, welp. Time to sink hours testing it out :3
Is it possible to make it so that you put something in an entities inventory but you can take it out
I placed my aggressive entity above 7 blocks but it doesn't jump to attack me, is there some component that makes it ignore the fear of heights?
Resist fall damage?
"minecraft:damage_sensor": [
{
"cause": "fall",
"deals_damage": false
}
],
"parent_centric_attribute_blending" not set Array of strings [EXPERIMENTAL] List of attributes that should benefit from parent centric attribute blending. For example, horses blend their health, movement, and jump_strength in their offspring. DOES ANYONE KNOW what other attributes can benefit
Someone help in the posts, heheh.
Do hostile mobs only spawn at light level 0? The spawn rules for zombies, skeletons, etc say they can spawn up to level 7. Is there something in the runtime identifier that makes them only spawn at 0?
Just set the min and max light brightness level to 0
Did they add input air controlled after the happy ghast was introduced?
Or just colliable
Does someone has the entity file for the happy ghast?
Found this tidbit
Are spawn density caps for spawn rules global for a whole dimension, or just in a radius around a player?
Ex: can more than 2 ghast spawn in the nether if there are multiple players?
Any idea what that radius is?
#1067876948858118185 message
The question is about entity spawning
Yeah...you already asked this question.
Ah, sorry 😞
how do i remove the entity collision?
How can I calculate this to know the % of the second option coming?
{
"weight": 20
},
{
"weight": 1,
}
hey, quick question. when i animate an object and change its position does it actually change the position of the entity in space? or does it just move it in the animation and then once the animation is over it moves to its actual coordinates in the world
(weight / totalWeight) * 100
Animations do not change the entity location, when they finish the model returns to its initial state.
is there any way that it can be the opposite? im trying to:
test if entity(2) is under another entity(1)
if thats true, trigger an animation that moves entity(1) in an animation.
im trying to make a train addon with curves with the track being entity(2) and with the animation I can make a more smooth turn for entity(1)
You could do the animation and at the same time as it ends teleport the entity to the same location
hmm... how could i get the length of the animation in script api?
and also track the length
You would have to calculate the distance between the two locations and with that know how long the animation should last until the entity reaches the other location in the animation
since i know the animation length i could probably just wait for that time and then teleport
Pls tell me problem why my crawl Animation not working
Send the resource pack entity file and animation file and animation controller
all from resource pack
How do I create an entity only spawnable(via the player using an item) on certain blocks(blocks implemented via the same addon for the entity)
I fixed it
All collision for the entity, or just collision with other entities?
If you set the collision box size to 0, 0, I think that will disable collision
It does for blocks
Which material makes the whole skin glow instead of having to select which parts glow using emissive?
I think there's entity_emissive
I want that my entity don't collide with anything. I'm using it as a sensor, and it gets in the way when the player is mining or attacking
Try the collision box with size 0 then
Guys is there an animation for the player blink?
I mean not having to erase out the parts of texture in blockbench
If I just place this on my entity, would it just explode?
"minecraft:charged_exploding": {
"minecraft:explode": {
"fuse_length": 1.5,
"fuse_lit": true,
"power": 6,
"causes_fire": false,
"destroy_affected_by_griefing": true
}
},
Not on its own. I assume you mean placing this component group on your entity
The full "minecraft:explode" component on its own would make it explode, yes.
That component in a component group would need to be applied in an event to do anything, though
@vale mantle
I see, thank you
Entity emissive should make your whole entity emissive
Is there any proper way to rotate entity to given rotation degree. Using tp ~~~ yRot xRot doesn't seem to work, the entity seems to turn against the given rotation
The entity is actually rotating the model probably doesn't have the animation that shows the current rotation of entity
Really, but when we run it on player, it does rotate the player entity (not the model)
because that's the default
Also, do you have the locked rotation in entity?
no matter what you do the rotation in horizontal axis always works.
the vertical axis also works not just visible.
How do you lock rotation?
Hmm, what does lock_rotation do anyway?
Pretty obvious
Locked the rotation, only visually.
Ok, I'm completely stumped on how to get entity animations into Minecraft. I have an entity with a single bone that I'm just trying to spin on its axis continually, and I can't for the life of me figure out how to set up the animation controller to make it work. Can I get some help?
There is this step by step tutorial on how to set up animation on an entity in https://wiki.bedrock.dev
I'm not quite familiar with that actually. I once ever heard it but forgot where to put lock_rotation. Is it entity component or something
I got the basic animation at least working in the game, but now I'm stuck on some molang nonsense. This isn't working, even though I defined that property in the entity's behavior pack. I know it's defined, because in the script associated with it I'm debug messaging out the value and that value is correct. Why does the query.has_property and query.property not work here?
"scripts": {
"animate": [
{
"rotate1": "query.has_property('my_namespace:my_prop')"
}
]
}
How am I supposed to query the entity's custom properties?
Also frustrating, there is a query.relative_block_has_any_tag, but nothing for block state. I am using the entity as a display entity for a block by summoning the entity in on placement. The inability to access states or properties is driving me crazy.
Does client sync in property toggles true?
You're a genius. That's the thing I was missing. Thank you so much! It's working now!
Is there more to body rotation axis aligned then just adding the component. Entity just shakes, I paired it with blocked and it still just shakes
So, is there any way to rotate it? I was rotating vanilla entity btw, so they should have the rotation animation
how do i make an entity play no animation or particles when killed, such as when killed by a command. Pls ping if you know 🙏
What do I need to add to an entities behaviour to make them able to rotate on their x axis when using the summon or tp command?
Just kill it again using on_death?
I did that but it still makes it red for a split second
Absolutely unacceptable 😤
I've seen some addon do It where there was no red
On death, add a component of "instant_despawn"
Or on damage sensor detects fatal damage, event adds instant despawn component
I'm trying to rotate an entity vertically, but I can't figure out how to do it. Right now, when I do entity.setRotation({ x: 0.0, y: 90.0 }), the Y rotation will do what I want and rotate it about the y axis, but no matter what I set the x value to, the entity never rotates on the x axis. Essentially, I'm trying to make the entity be facing the sky instead of the horizon. How do I accomplish that?
thank you, that worked, jsut had to call entity.triggerEvent
Umm did you properly set it in resource pack?
Looking up and down isn't visible without animations.
How do you mean set it? What do I need to set in the resource pack to control x rotation?
whats the difference between setDynamicProperty and setProperty?
setProperty is used in the entity properties where it can be read in resource pack while dynamicProperty is native in scripts only, it can't be read outside of scripts... No way to do that
ah i see. dynamic seems nicer as since its not defined it should be able to store arbitrary strings
those two are different things, they have pros and cons....
I just needed to store some stuff in my entity, for what im doing with scripting only they seem very similar
woah items have it too
I think if the info is specifically unique to each entity, you should probably use an entity property.
dont you just add a gravity component to you entity and use the hitBlockEvent / hitEntityEvent?
Store it in entity itself.... ItemStack, Entity and World
Is possible, no Blocks yet.
tho, that dynamic property isn't accessible to otehr packs who doesn't have the the same uuid, since dynamic property is stored in manifest uuid
Hello, can I make mobs with the same name or tag not attack each other but attacks everyone else?
Yes and no, you can only make hardcoded names, you can't do it with custom names.
hey sorry to bother, i was sure that worked but upon further inspection it seems to just make the particles go away, entity still makes the hurt sound and beomes red for a split second. I'm using the entityDie event and I'm simply triggering an entity event that adds that instant_despawn component. What am i doing wrong?
why do that? entity.remove() already exists tho....
because the game doesnt call remove when the kill command is issued, neither it applies max damage to the entity like it does in java where one could react to damage dealt
so anybody knows how to do this? seemsto be quite common tech used by many addons, cant believe i cant figure it out 💀
Is there a filter that detects player gamemode
none
Is there any way to make my entity spawn in caves inside blocks and then mine to the player?
is there a way to open an entity inventory gui on request?
Thats super dumb 💀💀
I swear entities are so limited. What about a way to run some scripts form an entity event?
yes
there's an listener for entity events
Documentation for @minecraft/server
oh thank god
its great
I'm looking for some documentation on how to make my own custom events and then register callback functions for them... any idea where some resources are for that? I haven't found anything yet.
json part: https://wiki.bedrock.dev/entities/entity-events
scripting part: #1067535608660107284 message
"minecraft:damage_sensor": {
"triggers": [
{
"on_damage": {
"filters": {
"test": "has_tag",
"subject": "self",
"value": "protect"
}
},
"deals_damage": false
},
{
"cause": "starve",
"deals_damage": false
}
]
}```
for some reason this doesn't cancel damage on starvation.
The protect tag thing is a seperate system
I’m having trouble with getting a biome variant to work, should I ask here or make a new thread?
Is there any way to make my entity spawn in caves inside blocks and then mine to the player?
Other than
"priority": 4,
"speed_multiplier": 1.2,
"cooldown_time": 0.0,
"melee_fov": 180
},
And
"minecraft:behavior.delayed_attack": {
"priority": 4,
"reach_multiplier": 2,
"speed_multiplier": 1,
"attack_duration": 0.4,
"track_target": true,
"hit_delay_pct": 0
},
Are there any other way to increase entity attack speed?
Im pretty sure scripts could also increase speed based on an attack through custom componments?
Ya, but I was wondering. Does the first component actually increase attack speed?
Please don't confuse movement speed and attack speed.
Script might be able to change the movement speed, but it's temporary. Attack Speed is something else, and Script can't change it directly.
But do the components work?
The ones I sent-
Try it in-game, last time I checked it kinda works. Just need to pathfind to the target.
I'll try it out
iirc you need to use "no" if your entity's format version is 1.21.40 and above
I didnt confuse them tho, I had though that script could do both. This is only due to the fact ive never touched scripts and only know things others say and what I think they might do
Hence me saying "Im pretty sure"
please tell me you don't code in that font
I do code in that font
Someone know why my foxes are not running away correctly? Sorry for my bad englih
Weird entity issue... I am summoning a display entity when placing a block. Most of the time it works fine, but if I am placing it while looking up and I select an adjacent block's side to place it, the entity y location ends up about 0.005 below where the block is. That's causing the block onDestroy event to not remove the entity when I destroy the block, and I can't place any other blocks below it because the entity is in the way. If I place a block below first and then place above, then the entity doesn't fall slightly and everything keeps working fine.
Debugging message output:
The top line is the location of the display entity that is leftover from destroying the block at y-70. This message was triggered when I destroyed the block at y-69
So the y-69 one works fine, but the y-70 one should NOT be affected when I destroy y-69, and it SHOULD be affected when I destroy y-70.
How do I keep this entity from falling ever so slightly down?
how do i render entities that are only visible to a certain player
I just figured this out. The documentation is wrong. Use this instead:
"triggers": {
"cause": "all",
"deals_damage": "no"
}
},
Running /kill @e will no longer affect your entity. I don't know why it needs the string "no" there instead of the boolean value the documentation says, but it's very annoying that the docs are incorrect. At least for "format_version": "1.21.50"
not that the documentation is wrong but the documentation uses the old format version and the new format version uses no and yes instead of true and false
Ok, I solved my own problem. Adding the "has_collision": false solved the issue.
Yeah, documentation is out of date, and I don't see a way to switch between different documentations for the various format versions.
because there is none
Why delete message void?
Yeah. It can be frustrating sometimes because of that.
because I was telling him that it was outdated, right after he said he acknowledged it was outdated
didnt read his msg
In which version were Entity Properties added?
1.19.50 I believe
Pop quizzes be like
lol
is it possible to add minecraftTen font to player nametags above their head?
Has anyone else been attempting to use the minecraft:behavior.swim_up_for_breath AI goal? It seems to be broken even on the vanilla Dolphin, they can't seem to actually breach the water surface and instead just hover under it and drown.
There seems to be a report here for it, guess I'l just recreate the functionality myself
https://bugs.mojang.com/browse/MCPE/issues/MCPE-37229
To Do (Open)
Unresolved
Turns out using minecraft:navigation.swim actually works with this component but breaks lateral movement
Why does NPC no longer have their nameable always_show to true anymore 😔
Can a TNT give a random effect when it explodes?
Maybe use scripting to detect nearby entities around the tnt. And give random effect to them.
there's a listener for when an explosion occurs
check if the source is tnt, then use the getEntities, loop it, apply effect to them.
here's the docs relating to it: #1067535608660107284 message
so the microsoft docs show the filter has_equipment_tag, but it gives me an error ingame saying it does not exist, and I never seen anyone here mention it
Are you in preview?
it's a new filter?
Yws.
thank you.
sweet, looking forward to it.
i added a tnt like entity, also their own entity textures and models
but got invisible and their egg too
Yeah i have the same bug
Or well
Issue
Could someone help me?
The name like that is probably due to missing a .lang file. To get the item texture for the inventory, you need to include it in the item_texture.json file. I don't know about the spawn egg. Does the item work as expected, just doesn't render?
the entity as the egg, are invisible
I guess my question is, does the behavior pack work as expected? Is it ONLY a rendering issue?
You should have a file: RP/textures/item_texture.json And it should look something like this:
{
"resource_pack_name": "My mod pack",
"texture_name": "atlas.items",
"texture_data": {
"tnt_fool": {
"textures": "textures/items/tnt_fool.png" // This is the path to the inventory icon picture
}
}
}
I haven't messed around with spawn eggs, but you should then put a key entry in the entity's description section of its resource pack file. Something like this:
"spawn_egg": {
"texture": "tnt_fool",
"texture_index": 0
}
.png shouldnt be included in texture paths
no?
All of mine does that it and it works perfectlly.
Or maybe you meant it shouldnt but it will work
I wonder if it's possible to force an entity with an "is_collideable" component to actually drag the player with it. I was trying to make an elevator with it, but it only works downwards with the default setup 🙃
Question about mob spawns
Vanilla monsters seem to only spawn at light level 0, despite their spawn rules saying they can spawn up to level 7. I think this is block light level 0 and overall light level 0-7.
Should add on monsters be set the same way, or should they be explicitly set to only spawn at light level 0?
how can i implement the blinking animation like a tnt?
Make another shape that is the same as the rest of your entity but slightly smaller and make it slightly translucent white. Then create your own animation that increases the size of the white layer for a few milliseconds, shrinks back down and does that in a loop
Is there a way to cancel the player being dismounted when they sneak while riding an entity?
You can use the inputpermission command or api.
Thanks, Smokey
Why is the background like this?
what is the best way to get back in to minecraft 'modding' its been about 3-4 yearssince i last worked with minecraft a lot has changed.
and i don't really know anything anymore.
I tried to make something simple (a pig that explodes when i hit it) but i can't even get that to work :/
I assume you have alphatest material and the texture has some pixels left from removing the background. In the graphic editors they are almost invisible, but the alphatest turns their visibility to 100%.
Try clearing it manually with an eraser
Is there a way to disable NPCS right click menu
remove npc component in the npc...
or override the open npc screen with on interact component.
or just scripts before events of playerinteractwithentity.
I got it
Well you need a-bit of knowledge about JS since that is what Scripts are based on then you could do something like:
use entityHitEntity event > check if damagingEntity is a player > check if hitEntity is a pig > create an explosion(using createExplosion function) at the pig's location.
Is behavior pack modifications not a thing anymore?
Wdym?
Like instead of using scripting? I used to be able to do it with just json
All those have migrated to scripts
Most things nowdays require a bit of both to make the best thing possible.
Also, you can still do a lot of things with JUST JSON.
I need some help i made a post but no one looked at it
what should I put here? this is a component is giving me errors: it says that the exit event and dismount mode properties dont exist and throws an error on reload
Are you in Preview? What version? Content log?
not in preview, 1.21.60
is there a component to change how much a player's health naturally regenerates by?
It was added in 1.21.70.
oh i see,makes sense thanks
Hi, I have a question. Is there a way to remove the riding animation on a custom entity?
I have a ticking entity, but I think it, ironically, unloads itself until a player is within simulation distance. My issue is each entity is ~2000 blocks from the next and all of them are +10000 blocks away from spawn. Is there something I did wrong?
{
"format_version": "1.16.100",
"minecraft:entity": {
"description": {
"identifier": "lambda:tickingentity",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false
},
"component_groups": {
"tickingentity:despawn": {
"minecraft:instant_despawn": {}
}
},
"components": {
"minecraft:physics": {
"has_gravity": false,
"has_collision": false
},
"minecraft:pushable": {
"is_pushable": false
},
"minecraft:push_through": {
"value": 1
},
"minecraft:tick_world": {
"distance_to_players": 128,
"never_despawn": true,
"radius": 6
},
"minecraft:damage_sensor": {
"triggers": [
{
"cause": "all",
"deals_damage": false
}
]
},
"minecraft:collision_box": {
"height": 0.1,
"width": 0.1
}
},
"events": {
"tickingentity:despawn": {
"add": {
"component_groups": [
"tickingentity:despawn"
]
}
}
}
}
}
I don't think you can set it to 6 chunks. At least for default ticking areas the limit is 4 chunks.
I added this component to the chest_minecart entity but I'm still able to hit and kill it. Is there a way to prevent chest minecarts from dying?
"minecraft:damage_sensor": {
"triggers": [
{
"cause": "all",
"deals_damage": false
}
]
}
The docs say 2-6
Hi, does anyone know how to change the player's riding animation but on a specific entity?
Change the deals_damage to "no" instead of false. It's an undocumented change.
It's documented tho...
I'm glad it is now. It wasn't when I was struggling with it. Also, a bunch of the examples on that page still is the old boolean values.
It was never undocumented. It was stated in the changelogs.
I just wanted to share this because it's the first ever entity I try to implement and I laughed so hard when this happened
You have has_gravity false don't you?
Thanks for sharing, I needed a laugh today 😄
I didn't add the physics component I thought it was by default ahahah
At least the poor creature could join heaven
anyone have a floating text entity I can use?
Is there no pale_garden biome tag?
I just tested it and it seems like there is one, might need to be updated in the docs.
Is the "minecraft:behavior.move_to_block" component bugged? My entities only move towards minecraft blocks, but not my custom ones for some reason.
Are you adding the namespace?
Yes, I did.
Try without it?
Still didn't work.
I wonder if its due to it not being solid?
Let me try a solid custom block then...
I think I know the issue. Any block that is connected to an item with the replace_item option in the block-placer component doesn't work, any other custom block does.
No, the only blocks that work are ones that do not have an item with the same name with the replace_item in the block placer component. Regardless if they are solid or not.
Npc custom skin?
How i cancel fall damage if player have a tag?
"damage_conditions": [
{
"filters": {
"all_of": [
{
"test": "has_tag",
"value": "<put_tag_here>",
"subject": "self"
},
{
"test": "has_damage",
"value": "fall",
"subject": "self"
}
]
}
}
]
}```
Add this to your player.json
how do I make an entity not take any damage? do I need to add a damage sensor trigger for all known damage sources or is there a better way
try <namespace>:item.<identifier>
some vanilla entities use that for doors
It didn't work.
i got this projectile component in my entity. the gravity bit seems to work but the inertial doesnt. shot projectile completely stops after a short while. Any idea?
"minecraft:projectile": {
"power": 1,
"gravity": 0.05,
"inertia": 1,
"liquid_inertia": 1,
"anchor": 1
},```
Projectiles require a runtime identifier to work properly. Try "runtime_identifier": "minecraft:snowball" in your entity's description
@main cedar
thats very dumb they dont work on their own. are runtime identifiers something that can be used in marketplace addons? I thought it was not allowed
Nope, not allowed. That's the grand flaw
Either you have these weird in-between projectiles with crappy physics, or you can try designing a custom projectile driven by commands/scripting
it does sound like a huge hack anyways.
anyway is there anothe way to alter entity intertia/friction while traveling throgh air?
the one it has now seems to be very aggressive and inconsistent even
well the thing with scripting is that they are server side so they rely on entity communicating its velocity and position and that doesnt happen instantly so stuff looks jittery. Have you done similar stuff?
Not any way that I know of.
I know Spark Universe uses such a custom projectile system in the SpongeBob Add-on. (Granted, it doesn't seem to work super well, but that could be due to rough implementation)
I have been working on a custom projectile system for a personal project too. Uses purely scripting to track velocities and locations
Given a location, velocity, acceleration, and inertia, this is what I put together. Acted every tick
//https://gamedev.stackexchange.com/questions/15708/
location = Vector3.add(
this.location,
Vector3.scale(
Vector3.add(
this.velocity,
Vector3.scale(this.acceleration, 10 * DELTA_TIME)
),
20 * DELTA_TIME
)
);
velocity = Vector3.add(
this.velocity,
this.acceleration,
Vector3.scale(
this.velocity,
// |v| * 1-i / (1 - 0.05 * (1-i))
-Vector3.magnitude(this.velocity) * (1-this.inertia) / (1 - 0.05 * (1-this.inertia))
)
);
Well I thought of doing something like that but problem is being entirely server driven it relies on constant communication to the entity client counterpart and what I noticed before is that it tends to look jittery as the entity interpolates with the previous location so movement doesn't seem responsive. Did you also notice that?
Mine uses particles for visuals 🤷 but I can see that being an issue
I wonder if the entity component "minecraft:conditional_bandwidth_optimization" could help?
If your projectile will follow a deterministic, static path, I suppose you could animate the visuals on the client and let the server handle the logic. Build the trajectory out of Molang and all that
That sounds like a whole new way to desync stuff though
Perhaps not if it used query.time_stamp ...? That would need some R&D
i think that would actually make it worse, what that does is probably avoid sending velocity updates all the time
yeah i guess i could store initial velocity in entity. path is a parabula so that is deterministic if you allow it for the same friction in all liquids and air. Crazy that entities given a velocity act so janky
One message removed from a suspended account.
One message removed from a suspended account.
Anything else I could try?
that's about right - the Creaking does this if you want a live example
Doesn’t works
I've added one that checks for the entity own family so it returns always true

you could've just set "cause" to "all"
for some reason i had it like that before and it gave errors, couldnt find that on the wiki so i did with the always true target thing
i likely had it wrong somehow
Is it possible for me to create a fully functional villager? Like vanilla where I place a certain block they change profession?
No.
How to make player invisible using player.json ?
something like this iirc
"minecraft:scale": {
"value": 0
}```
is there a place i can get the current biome tags list for the enviroment_sensor component cause the microsoft wiki thing hasnt been updated
Is there a set entity spawn limit for mcpe?
that'll edit the collision as well.
If I make my own addon can i make it so Mc original mobs cant spawn
(model is the same, random color is just picked each time the model is loaded)
ah wait this maybe the wrong channel\
mb
yes
just edit the spawn_rules for them to not spawn in any light level or any mode (peaceful to hard)
difficulty and brightness filter are only min and max.
you could trying using minecraft:spawns_on_block_filter and use a block that does not exist
Thanks bro
Quick question
Do vanilla monsters only spawn at light level 0 in Bedrock?
The spawn rules say they can spawn up to level 7, but I think that's a lie and the runtime identifiers make them only spawn at 0
Which of course means that spawning is all messed up if you base custom mob spawn rules on the vanilla rules
Im pretty sure they can spawn at 7, But hardly do
I mean some mobs with helmets and that do tend to (Ive seen it, but it could be a bug)
I have an entity that I've set immune to all damage. with this
Despite that however when damaged by a lingerig potion not only does it play the red hurt animation but it also jumps up
I'd do this:
{
"minecraft:damage_sensor": {
"triggers": [ { "cause": "all", "deals_damage": "no" } ]
}
}
Entity tag as applied by /tag or dynamic property?
dynamic property that can be edited with script api
but I guess that would be impossible
Someone help me with this
The walk animation doesn't play
And it doesn't drop anything when killed
thanks this also worked. turned out tho that the raeson was i had an old format version 💀
Is there a way to show entities hitboxes? for debug purposes?
is there a way to fix/workaround the little lag that happens whenever you rotate an entity? Like you can rotate them with a command or scripts but they always take a few seconds to actually finally rotate to that direction.
nvm i figured sumn out
Somebody please find me the link to where I can learn to set up an entity breeding and growing up T-T
How did you do it? Lag is the time it takes for client communication to happen from the server, made worse by entities interpolation that they do
I used animations so it's client side and overwrites the interpolation. I made a custom property for the rotation of the entity, and the RP I made animations for the cardinal directions by just rotating the root
So it's technically a visual rotation, not an actually rotated entity
would you mind showing? Im super new to molang stuff and anything animation wise
If you make a forum post I can send stuff there, I don't wanna clutter this general chat
just @ me
Yes.
I just made this entity, which is supposed to be like a painting. How can I make it so it doesn't take damage and has no shadow below it
Scroll up some for no damage. For shadow you make the hitbox all 0
There is a way that when you put the entity it does not appear diagonally.
axis aligned component
How do I make a part of an entity glow?
Use a render controller, separate geometries, textures and materials if the material you want to use is entity_beam_additive as your material
Use differences in opacity, 1 texture, and 1 material if you want to use entity_emissive_alpha as your material
If you do not know what these materials are, please ask for further information
you can make specific bones on your entity use different materials.
Oh I can do it with bones? How?
you dont need to do seperate geo.
in your render controller, in materials
"materials": [
{
"*": "Material.default"
}
],
np
trying looking at flying entity files
!q.is_on_ground?
thats what I used for my bird
no problems
or you could just use entity_emissive_alpha for all and change the transparency of the pixels to make them glow
I dont know how your entity is, because you might want transparent and emissive textures at the same time.
That's why I said that they may want to use entity_beam_additive in case that is the kind of entity that they want
I'll play around with that after I fix animations
Fly is never being played:
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.kai.lumenbug.general": {
"initial_state": "state_picker",
"states": {
"state_picker": {
"transitions": [
{ "explode": "q.hurt_time > 0" },
{ "fly": "!q.is_on_ground && query.modified_move_speed >= 0.2" },
{ "idle": "q.is_on_ground && query.modified_move_speed <= 0.1" },
{ "play1": "math.random(0,10) <= 2" },
{ "play2": "math.random(0,10) <= 2" },
{ "play3": "math.random(0,10) <= 2" },
{ "play4": "math.random(0,10) <= 2" }
]
},
"idle": {
"transitions": [
{ "state_picker": "q.is_on_ground && query.all_animations_finished && query.modified_move_speed <= 0.1" }
],
"animations": [
{ "idle": "(1.0)" }
]
},
"fly": {
"transitions": [
{ "state_picker": "!q.is_on_ground || query.modified_move_speed < 0.2" }
],
"animations": [
{ "fly": "(1.0)" }
]
},
"play1": {
"transitions": [
{ "state_picker": "query.all_animations_finished" }
],
"animations": [
{ "play1": "(1.0)" }
]
},
"play2": {
"transitions": [
{ "state_picker": "query.all_animations_finished" }
],
"animations": [
{ "play2": "(1.0)" }
]
},
"play3": {
"transitions": [
{ "state_picker": "query.all_animations_finished" }
],
"animations": [
{ "play3": "(1.0)" }
]
},
"play4": {
"transitions": [
{ "state_picker": "query.all_animations_finished" }
],
"animations": [
{ "play4": "(1.0)" }
]
},
"explode": {
"transitions": [
{ "state_picker": "q.hurt_time <= 0" }
],
"animations": [
{ "explode": "(1.0)" }
]
}
}
}
}
}
Any ideas?
Why did you use query.modified_move_speed?
Fixed fixed
How can I make my entity fly more often
"minecraft:behavior.random_fly": {
"priority": 0,
"xz_dist": 6,
"y_dist": 2,
"y_offset": 3,
"speed_multiplier": 1,
"can_land_on_trees": true,
"avoid_damage_blocks": true
},
"minecraft:behavior.look_at_player": {
"priority": 1,
"look_distance": 8.0
}
These are all my priorities
it can take a whole minute for it to fly
okay fixed
random_fly is trash
hover is the way
lol
how can i make an entity be imune to all damage but the one from players?
Use minecraft:damage_sensor
Would someone be able to should be how to code my custom entity in bridge some time?
I have to make the pixels emissive or transparent?
No, it can be both if you use entity_beam_additive
Won’t the material cause the other parts of the texture glow or look bad though?
If you use the render controller to control which parts are glowing no it shouldn't, but that is a more specialised question since it is dependent on how you want your model to look
I have this entity but not all of it should glow
It should only be this part, and those pixels are emissive
What do I have to do exactly to make only that part glow? Do I just have to use the material you said or something more
Do you want emissive or additive
Or would you like an example of how additive looks
Yes please
Here's an example from one of my addons
Emmisive and ignores lighting
But compatible with transparency
That’s additive?
Yes
I see, hm
what the cause of this?
the geo does exist, blockception do detect it
Basic question. I have a parameter for an animation rate. I wish to increase or decrease based on the entity's testable behaviour state. Looking at other a few examples of code, they just hard code several near identical animations with different rates, one for each state. Is this the way to go? I could test the entity's state for each frame (I think?) to set the rate but I'd rather pre-calculate using a certain rate value for a set amount of animation time, and then test state and transition to another rate if the state changes.
This is not related to entity speed or distance.
fixed, didn't know the models need to be in an entity folder inside the models folder
thanks tho
It's about an entity gnashing its teeth faster when it gets more agitated.
I assume this is a common animation goal but I can't seem to find an answer yet.
I don't understand your question, sorry
Aight fair enough maybe I'll just open a question and phrase it in a longer more visual way. Cheers.
How to make my entity visible from very far away without needing the Ender Dragon runtime indentifier?
Persistent/persist
What's the error? Why isn't it working?
"minecraft:damage_sensor": {
"triggers": [
{
"on_damage": {
"filters": {
"all_of": [
{
"test": "has_damage",
"value": "fatal"
},
{
"test": "is_family",
"subject": "other",
"value": "player"
}
]
},
"deals_damage": false,
"event": "fatal"
}
}
]
}```
you havent shown the error.
nothing seems to be wrong, but depending on your format version deals_damage is no longer boolean.
can this be fixed by custom materials?
No error appears in the log, it's just not working.
What do you mean? Can you explain it to me better?
in higher format versions, deals_damage is no longer boolean and accepts 3 values.
"no" "yes" "no_but_side_effects_apply"
If I have dyeable(with cauldron) attachables, is there something I can add to the files that when you put it on other entities it's still the custom dye or is the only way dyeing it with dyes after it's on the entity?
So just change "false" to "no"?
depending on your format version...
which is what?
My entity version is "1.21.40"
It didn't work, the entity is still dying, it's not denying the fatal damage
@formal veldt I discovered that it is the filters that are not working, the "event" happens, but the damage still continues, because the filter is not working.
But I don't know how to fix it
Has anyone used the ‘has_equipment_tag’ filter test?
The game says it doesn’t exist lol
its in preview.
I find it weird that it's showing in the stable docs.
I'm facing a very odd issue with an entity I have. Itsa rideable entity, despite the fact that im rotating at various angles (with scripting, right after i spawn it), when i ride it it only lets my player face north
do not lock rider rotation
i dont have that component, nothing with rotation, i checked. Maybe i didnt explainright, its not the fact that the rider cant rotate, it can, but its preferred sitting position is facing north
so obviously cant rotate 180 degrees and such
its not a component, its a property in the rideable component
within seats
lock_rider_rotation
you dont have it?
yeah i dont have that
these are the other components if that matters
this im using to set the yaw and i know thats being set ok
oh
thats odd, seats should rotate
bet its another component overriding something
or maybe not? I swear they did.
yup i nuked all the components and low and behold it now works
because think of the player with a parrot
the parrot rotates obviously with the player's body
...
it would be nice to know which component was doing that.
im getting to that
perhaps it was minecraft:body_rotation_axis_aligned
trying adding that back
tell me if it works or not
first that i tried but actually its not, none of the physics ones too
its type family
i had a family of mine and inanimate. im doing more testing but it seems to not be tied to those
im getting inconclusive results. it could be that buoyant component is also related
My geometry file is correct, so is the path, but when I put the geometry in the entity, I get this error [Geometry][error]-crafter:custom_test | crafter:custom_test | geometry not found?
The geometry is in the entity of crafter:custom_test, and it's the exact same as the geometry identifier in the geometry model file
I have a script that adds and removes a tag to a specific entity when the player is currently looking at it. Is there a way I can change the entity's geometry based on whether it has that tag or not? The goal is to have the entity switch geometry while it's being looked at by the player and removed when it's not.
can I have an entity that visually displays the armor it has equipped?
How do I make it so that I am not slowed by cobwebs?
Set "enable_attachables": true it'll let your entity make all armors and swords show
Use the spider runtime identifier
Any mob that uses it is unaffected by cobwebs
i want to be able to actively enable and disable this behavior
Not really possible
I am just wandering, is it possible to have an texture array switch to a different one depending on if the mob is a baby or not?
Yes.
One message removed from a suspended account.
How do I make my entity immune to lightning_bolts
How can I play an animation with a random chance while still playing another
Also, what material should I use for this?
None of what I've tried are working well. Is either translucency as transparency or mess everything else
Oh, entity_custom seems to work great
nvm
Not from the bottom, lol
Wdym?
If the queries other than excluding math.random are the same, the animations would play simultaneously
I'm having a bad time figuring what to do here mostly:
"pre_animation": [
"variable.state = (!query.is_on_ground && query.modified_move_speed >= 0.2) ? 0 : 1;"
]
My brain isn't braining when doing a new variable with math
I made that for idle and fly
Works perfectly
Now I have to make a new variable (I think) to choose randomly between 4 animations
And you've tried entity_alphablend
Hello guys!
Is it possible to stop the player from using an item when interacting with my custom entity?
Example: if holding a piece of armor, stop the player from putting on the armor when interacting with my entity
help, it's not working at all.
is there any material that can get render controllers' "color" to work for attachables?
That should already happen. Just tested with the horse, at least.
What is not working?
Any content log errors?
What are you trying to achieve?
[Molang][error]-jurassic:triceratops | render_controllers/triceratops.render_controllers.json | controller.render.triceratops | textures | query.is_baby ? array.baby[v.index] : array.textures[v.index] | Error: unhandled request for unknown variable 'variable.index'
[Molang][error]-jurassic:triceratops | MolangScriptArg::get<>() called on incompatible type
[Rendering][error]-jurassic:triceratops | Render Controller: controller.render.triceratops is missing its default texture
I am trying to have a different model/texture for the baby varient and have the hot and cold varients like a chicken or cow.
I fixed it, apparently I was just missing something in the entity file
Sorry, I should’ve clarified that my entity is a fake block, so I think the problem might be related to the barrier block
A fake block using what method?
Why is this not working? The event is not being triggered:
"minecraft:looked_at": {
"search_radius": 64.0,
"set_target": "once_and_stop_scanning",
"find_players_only": true,
"looked_at_cooldown": 5.0,
"looked_at_event": {
"event": "kai:blind_player",
"target": "other"
},
"filters": {
"test": "has_equipment",
"domain": "head",
"subject": "other",
"operator": "not",
"value": "carved_pumpkin"
}
},
w h a t (doesnt make sense at all!)
The component is Minecraft:lookat
Passed tense 💔
Really? I checked the docs and the enderman code and they both say looked_at
It must be an update, you must use the latest version in the manifest.json and in your entity version format
It's look_at
If it doesn't work use lookat
"minecraft:lookat": {
"search_radius": 64.0,
"set_target": true,
"look_cooldown": 5.0,
"filters": {
"all_of": [
{
"subject": "other",
"test": "is_family",
"value": "player"
},
{
"test": "has_equipment",
"domain": "head",
"subject": "other",
"operator": "not",
"value": "carved_pumpkin"
}
]
}
},
From enderman
Yes, It has always been this way, although they could have changed it in the latest version, if you check the page it is from this month to
Fair. Though I'd assume lookat still works
It should work fine with the correct format version.
If we use format version 1.21.30 it will probably work fine.
The min version right?
Format_version
I think that depends on the entity's format_version
And of course the minimum version of manifest.json should be the current one, to avoid similar problems
Thanks guys, I’ll give this a try
Is there a way to put back the discount stacking when you cure villagers multiple times? Thank you!
hello i have an entity how do I make it be ignored by mobs?
Give it an undefined family, or a random family
By that I mean don't name it "Mobs" "Zombie" or any hostile/non-hostile mob
How to cancel fatal damage on an entity?
How does one make my entity move to within a couple blocks of the player?
How to increase or decrease player hunger without player.json?
You can't, even with the player.json
hello, anyone knows how it is possible to hide an item held by an armour stand? (like in actions and stuff)
Does anyone know how to reference vanilla textures in your custom entities? I have my entity and render controllers all working with my custom textures.
RP/entity/myentity.json:
"textures": {
"default": "textures/blocks/default_texture",
"texture1": "textures/entity/texture1",
"texture2": "textures/entity/texture2"
},
But I want to change texture2 to use a vanilla texture, say oak planks. How would I reference that to make it work?
probably just change the filepath to "textures/blocks/planks_oak"
That was exactly it. Thanks!
Another question... can I make the texture selectable via querying the entity's property states?
maybe but im not sure what that means exactly
So if I set the entity file in the BP to have a property, say material = oak, birch, mangrove, etc... Can I then in the RP definition for that entity query that property and set "texture2" equal to the applicable plank texture?
I just tried "default": "query.property('wfir:prop_1') ? textures/blocks/brass_block : textures/blocks/planks_oak; ", and it didn't like that. Couldn't find the textures.
Is it possible to make my entity when looking around not adjust its body?
Add the body rotation locked component
ty ty
Is it possible to have it like the player where it only rotates when the head gets to a certain point?
I'm trying to make a slime that splits infinitely, but Idk how to make each generation smaller
how do i do this 🙏
how can i set the pitch of a sound in an animation?
I've tried doing animations by copying the animation for holding a heavy core but it doesn't seem to run every tick compared to the original heavy core animation
anyone knows another way?
how to make entity textures emissive in vibrant visuals?
Does anyone know how I can modify a Minecraft entity? Like the cow, for example.
Epic
How do I detect a punch with animation controllers
You can read the variable attack_time. It returns a value between 0 and 1, indicating the percentage duration of the current attack.
Attacks last 0.3 seconds.
@spare peak
anyway to fix the issue where an entity turns black when it is inside a block i set the collision to false but it doesnt seem to work
Why do I get this errors?```[Molang][error]-test:abc | test:abc | controller.render.test.abc | Geometries | friendly name 'geometry.test.abc' not found in entity friendly name list (geometry.default:texture.default) - check your spelling?
[Molang][error]-test:abc | test:abc | controller.render.test.abc | Materials | friendly name 'material.default' not found in entity friendly name list (geometry.default:texture.default) - check your spelling?
[Molang][error]-test:abc | MolangScriptArg::get<>() called on incompatible type
[Molang][error]-test:abc | Error processing expression geometry.test.abc
What does your render controller and entity file/ attachable file look like
We can't help if we don't see since we won't know how
like this
I had a suspicion of your mistake
This confirms it
You named the geometry wrong in the render controller
Your supposed to use the short name of the geometry, defined in the entity.json file, not the actual file name
what is the short name?
thanks, but I still get this error```[Molang][error]-test:abc | test:abc | controller.render.test.abc | Materials | friendly name 'material.default' not found in entity friendly name list (geometry.default:texture.default) - check your spelling?
[Rendering][error]-test:abc | Mesh material doesn't exist
You didn't make a material
In the entity.json file
Anyone have issues with entities sometimes falling through the ground?
Not very consistent, but I'm finding when I use an entity placer my entity just does not have collision ~5% of the time
how do i stop fall damage from a player ONLY if they have a certain tag?
How can I give my Mob a component group if a player is nearby?
Can't really work
There's no real way to disable fall damage per player
You only actually have 2 options
Both need to be scripted