I created a custom entity with some functionality, and one of the things I added was the ability to sit. It does sit, but I cannot get it to change/execute behavior when it's sitting. It appears the minecraft:sittable code doesn't work for custom entities:
"minecraft:sittable":
{ "sit_event": "minecraft:taking_a_seat", "stand_event": "minecraft:time_to_go" }
Steps to reproduce, add the following:
Component group to enable sitting:
"buckbeak:tame": {
"allow_sitting": true,
"minecraft:sittable":
{ "sit_event": "buckbeak_sitting", "stand_event": "buckbeak_standing" }
,
"minecraft:behavior.stay_while_sitting":
{ "priority": 0 }
}
Then the sittable event:
"events": {
"buckbeak_sitting": {
"add":
{ "component_groups": [ "buckbeak_sitting" ] }
}
and then the component group (in this case, I want to set it on fire when sitting so I can easily see the code is working:
"component_groups": {
"buckbeak_sitting": {
"minecraft:is_ignited": {}
}
Nothing ever happens when you make the entity sit. You can get the animation to trigger, just not the events/component group for it. Other parts, like the "on_leash" event and subsequent component group do trigger.
This is on the Windows 10 (bedrock) version
Comments 5
you are correct, when writing this down I used the wrong component, I actually used the minecraft:burns_in_daylight one.
I need to get back to it then, I perhaps made a mistake, but when looking it up I found an old ticket and natually assume it was still not solved (MCPE-109399).
Will revert once I try again from scratch.
Ok. Maybe it doesn't work to just put the event name directly?
In my project, I have:
"minecraft:sittable": {
"sit_event": {
"event": "on_sit",
"target": "self"
},
"stand_event": {
"event": "on_stand",
"target": "self"
}
}
You have the content log enabled and it isn't giving you any errors though, right? Because if this is the cause and it isn't, that could be a bug of its own.
So I tried again with similar results. I did get the component group (burns in daylight) to work when sitting, but the "on standing" event never triggers.
So in my case, my intention was to not make the entity rideable when sitting, and then rideable again when standing. With the code above it simply becomes unrideable after sitting once.
Looking into the content logs, there were some remarks about the sittable part not being parsed correctly, but when putting it through the various JSON parsers and validators, the code appears to be 100% correct. And it should, because I simply copy/pasted it from another section which is 100% correct.
I will attempt a whole new, blank entity with only a sittable component and see how that works. Will revert back again.
Thanks for your insight @TheRedSmarty (I'm still fresh as a pickle with all this, just 2 weeks of "experience")
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
Could you please attach a behavior pack with which this issue can be observed?
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📓 Project Summary – 📧 Suggestions – 📖 Minecraft Wiki
minecraft:is_ignited doesn't set the entity on fire. It does nothing at all on its own, it's only intended to be tested for.
I'm actually using the events in my custom entities to change their hitboxes and it works just fine.