SpyglassMC / Spyglass

Development tools for vanilla Minecraft: Java Edition data pack developers.
https://spyglassmc.com
MIT License
302 stars 31 forks source link

Implement `getEntityFromItem` in mcdoc contexts #1554

Open naren932 opened 1 month ago

naren932 commented 1 month ago

image

i have an EntityTag an some stuff on it to make an item frame invisible and silent, but spyglass says that an EntityTag needs a "id" key? the command runs fine on minecraft but the error just bugs me

(i have an issue similar like this with spyglassmc doesnt recognize "EntityTag", but it was changed to this issue. but this is not a repost) also is there a way to just ignore the error and hide them to make me not rage?

Code: give @s item_frame{EntityTag:{Silent:1b,Tags:["crafting_bench"],Item:{id:"minecraft:item_frame",Count:1b,tag:{CustomModelData:1000}},Invulnerable:1b,Invisible:1b,Fixed:1b},display:{Name:'{"text":"Crafting Bench","italic":false}'},CustomModelData:1000} 1

Minecraft Version: 1.18.2 SpyglassMC Version: v4.1.2

MulverineX commented 1 month ago

id will be made optional soon, that's a bug in vanilla-mcdoc, thanks for the report. To properly fix this though, we need to implement the implicit entity type context for spawnable items.