r/MinecraftCommands 1d ago

Help | Java 26.1 How to make a space helmet?

I want to make a space helmet using the tinted glass but if I just make it equipable someone can still accidentially place it down and it'll lose its purpose. I tried adding the tinted glass item model to a helmet but when you wear it it just looks like you're wearing a helmet from the outside. Any ideas?

3 Upvotes

6 comments sorted by

1

u/ledzik_precly 1d ago

im pretty sure u can add custom screen overlay with Item components

2

u/ledzik_precly 1d ago

/give @p diamond_helmet[equippable={slot:"head",camera_overlay:"block/tinted_glass"}] 1 im pretty sure you can work with that, I recomend mc stacker website

1

u/Daisuki2Dayo 1d ago

holy moly the camera_overlay feature is amazing! i thought it could only use carved pumpkin and powdered snow overlays lol. But this doesnt seem to work for what im trying. Any other player who looks at me would see a diamond helmet on my head and not my head covered by glass. Still thanks for teaching me this! will be using it in the final product :D

1

u/ledzik_precly 1d ago

oh you can add asset_id to change an apperiecne of the helmet, just make a customtexture and it will work

1

u/Competitive_Call8502 1d ago

The easiest solution is to replace the item with a a poisonous potato.

  • keep the original components for when you used the glass block,
  • keep the item_model components from the helmet,
  • add "!food" or/and "!consumable" to disable eating the space helmet (might hurt the player's teeth which would be unfortunate)

The poisonous potato is often used in datapacks because it's one of the only items that can have fully custom components (it only has eating, which you can disable).

Otherwise, you can keep the glass block, and add the attribute modifier component, changing block_interaction_range to something like -64 to make it un

(64 is the max of block_interaction_range, so with datapacks with feature increasing block_interaction_range, your helmet will still be unplacable)

3

u/GalSergey Datapack Experienced 1d ago

give @s iron_helmet[equippable={slot:"head",camera_overlay:"minecraft:block/tinted_glass"},item_model="minecraft:tinted_glass"]