From b8cbb56e6641d7307848cc5c8c1f40edb02913f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl?= <81994075+RaphProductions@users.noreply.github.com> Date: Fri, 3 Jan 2025 10:10:07 +0100 Subject: [PATCH 1/4] Update first-item.md Minecraft 1.21.4 doesn't search the model by itself anymore. --- develop/items/first-item.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/develop/items/first-item.md b/develop/items/first-item.md index 84678c998..09c493f6e 100644 --- a/develop/items/first-item.md +++ b/develop/items/first-item.md @@ -98,7 +98,14 @@ You're going to create a simple `item/generated` model, which takes in an input Create the model JSON in the `assets//models/item` folder, with the same name as the item; `suspicious_substance.json` -@[code](@/reference/latest/src/main/resources/assets/fabric-docs-reference/models/item/suspicious_substance.json) +But we're still missing a thing: the item still doesn't load? + +### Adding an Item Description {#adding-an-item-description} + +Since 1.21.4, Minecraft won't try to guess your item model's location anymore, and so, we need to provide an item description. + +Create the item description JSON in the `assets//items`, with the same name as the item; `suspicious_substance.json`. +@[code](@/reference/latest/src/main/resources/assets/fabric-docs-reference/items/suspicious_substance.json) ### Breaking Down the Model JSON {#breaking-down-the-model-json} @@ -109,6 +116,11 @@ Most items will use the `item/generated` model as their parent, as it's a simple There are alternatives, such as `item/handheld` which is used for items that are held in the player's hand, such as tools. +### Breaking Down the Item Description JSON {#breaking-down-the-item-description-json} +- `model`: This is the property that contains the reference to our model. + - `type`: This is the type of our model. For most items, this should be `minecraft:model` + - `model`: This is the model's identifier. It should have this form: `:item/` + Your item should now look like this in-game: ![Item with correct model](/assets/develop/items/first_item_2.png) From e84d9064969b4d3850ec4aab935e46c1fd548e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl?= <81994075+RaphProductions@users.noreply.github.com> Date: Fri, 3 Jan 2025 10:14:32 +0100 Subject: [PATCH 2/4] Create suspicious_substance.json --- .../fabric-docs-reference/items/suspicious_substance.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 reference/1.20.4/src/main/resources/assets/fabric-docs-reference/items/suspicious_substance.json diff --git a/reference/1.20.4/src/main/resources/assets/fabric-docs-reference/items/suspicious_substance.json b/reference/1.20.4/src/main/resources/assets/fabric-docs-reference/items/suspicious_substance.json new file mode 100644 index 000000000..a8a9334bb --- /dev/null +++ b/reference/1.20.4/src/main/resources/assets/fabric-docs-reference/items/suspicious_substance.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "fabric-docs-reference:item/suspicious_substance" + } +} From 83534ec05c61f7acedb74c4461405c49292c220a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl?= <81994075+RaphProductions@users.noreply.github.com> Date: Fri, 3 Jan 2025 10:14:59 +0100 Subject: [PATCH 3/4] Update suspicious_substance.json --- .../fabric-docs-reference/items/suspicious_substance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/1.20.4/src/main/resources/assets/fabric-docs-reference/items/suspicious_substance.json b/reference/1.20.4/src/main/resources/assets/fabric-docs-reference/items/suspicious_substance.json index a8a9334bb..6c396054e 100644 --- a/reference/1.20.4/src/main/resources/assets/fabric-docs-reference/items/suspicious_substance.json +++ b/reference/1.20.4/src/main/resources/assets/fabric-docs-reference/items/suspicious_substance.json @@ -1,6 +1,6 @@ { "model": { "type": "minecraft:model", - "model": "fabric-docs-reference:item/suspicious_substance" + "model": "mod_id:item/suspicious_substance" } } From 393006f10cacd95497989c067b217aedc9a56995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl?= <81994075+RaphProductions@users.noreply.github.com> Date: Fri, 3 Jan 2025 10:21:50 +0100 Subject: [PATCH 4/4] Update first-item.md --- develop/items/first-item.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/develop/items/first-item.md b/develop/items/first-item.md index 09c493f6e..8a9dfbfa5 100644 --- a/develop/items/first-item.md +++ b/develop/items/first-item.md @@ -98,6 +98,8 @@ You're going to create a simple `item/generated` model, which takes in an input Create the model JSON in the `assets//models/item` folder, with the same name as the item; `suspicious_substance.json` +@[code](@/reference/latest/src/main/resources/assets/fabric-docs-reference/models/item/suspicious_substance.json) + But we're still missing a thing: the item still doesn't load? ### Adding an Item Description {#adding-an-item-description}