#I want to put a custom hat on a chicken
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1724527389:t>, feel free to use the Summon Helpers button to ping our helper team.
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
Chickens don't render armor.
I meant as an item placed on its head or an armor stand if that’s not possible but I think it is.
A custom mob
you might be able to have an invisible armor stand ride the chicken and have the crown on the armour stand be offset to roughly sit on the chickens head, not sure if you'd have some wierd lining up issues though
oh yeah, you can make item display ride a chicken and there you go
why complicate things though?
nah true, forgot about item displays
if you're the one spawning the chicken then just go ahead to https://mcstacker.net and generate a summon command with a passenger of item_display that has your custom model data.
Would it be possible to place via commands the display entity on a preexisting chicken rather than spawning in a chicken with the display entity?
might you know why the texture for my custom item looks like this? It's just supposed to be yellow
Is there any way to have the display follow the chickens head movements?
Entities riding other entities don’t match the rotation, so you need to constantly tp the item display to the chicken
The easy approach would be to tag the chicken and all chickens tp the nearest item display (at a certain distance) to themselves but that is a little inconsistent
The safer way would be an id system:
Player Id System
>>> ## Give each player a unique ID
Create a scoreboard in a load function that runs on /reload
# namespace:load
scoreboard objectives add playerid dummy
Create a function to assign a unique id to the player
# namespace:assign_id
scoreboard players add .global playerid 1
scoreboard players operation @s playerid = .global playerid
Create a tick advancement to assign an id to a player when they first join
{
"criteria": { "requirement": { "trigger": "minecraft:tick" }},
"rewards": { "function": "namespace:assign_id" }
}
Check if an entity has the same ID as the player
Create a predicate that compares the id
// namespace:match_id
{ "condition": "minecraft:entity_scores", "entity": "this", "scores": {
"playerid": {
"min": { "type": "minecraft:score", "target": { "type": "minecraft:fixed", "name": "#this" }, "score": "playerid" },
"max": { "type": "minecraft:score", "target": { "type": "minecraft:fixed", "name": "#this" }, "score": "playerid" }
}}
}
To use it in a function, you can do that following
scoreboard players operation #this playerid = @s playerid
say @e[predicate=namespace:match_id] HAVE THE SAME PLAYERID
This is written for players but can easily be generalized for a chicken - display entity relation instead
You don't actually need this if they're riding
You can just use execute on vehicle to detect the chicken that an item display is riding
This thread has been inactive for some time, so I'm going to archive it.
If you're still using the thread, just send a message and it'll pop back on the thread list.
How exactly would I do that?
You probably need to tag the chicken, then reference that
So something like:
execute on vehicle run tag @s add vehicle
execute rotated as @n[tag=vehicle] run tp @s ~ ~ ~ ~ ~
tag @n[tag=vehiclie] remove vehicle
Sorry I really know nothing about commands. So first of all what’s the /ride command to get a display item riding a chicken?
Well the command is /ride, why don't you try writing it out in-game so you can see the syntax?
I just see @s and such
This thread has been inactive for some time, so I'm going to archive it.
If you're still using the thread, just send a message and it'll pop back on the thread list.
This thread has been inactive for some time, so I'm going to archive it.
If you're still using the thread, just send a message and it'll pop back on the thread list.
Also how can I make the item display disappear upon the chickens death?
Do you have an ID system?
Oh, I didn't look at the date... Has it been decided yet?
If it's riding the chicken, you can detect that the chicken has died and kill it once it no longer has a vehicle, like so:
[35mtag [36m@s [34madd [35mkill
execute [34mon vehicle on passengers run [35mtag [36m@s [34mremove [35mkill
kill [36m@s[33m[[37mtag[34m=[32mkill[33m]
That essentially gives the item display the kill tag, but if there's a vehicle (i.e. the chicken is still alive), it removes the tag. Then, if it still has the tag, that means there is no vehicle and it should kill itself.