diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/item/ModFoodComponents.java b/src/main/java/com/megatrex4/ukrainian_dlight/item/ModFoodComponents.java new file mode 100644 index 0000000..3437a25 --- /dev/null +++ b/src/main/java/com/megatrex4/ukrainian_dlight/item/ModFoodComponents.java @@ -0,0 +1,7 @@ +package com.megatrex4.ukrainian_dlight.item; + +import net.minecraft.item.FoodComponent; + +public class ModFoodComponents { + public static final FoodComponent VARENYK = new FoodComponent.Builder().hunger(3).saturationModifier(0.25f).snack().build(); +} diff --git a/src/main/java/com/megatrex4/ukrainian_dlight/item/ModItems.java b/src/main/java/com/megatrex4/ukrainian_dlight/item/ModItems.java index 8a2f46c..09bf029 100644 --- a/src/main/java/com/megatrex4/ukrainian_dlight/item/ModItems.java +++ b/src/main/java/com/megatrex4/ukrainian_dlight/item/ModItems.java @@ -2,6 +2,8 @@ import com.megatrex4.ukrainian_dlight.UkrainianDelight; import net.fabricmc.fabric.api.item.v1.FabricItemSettings; +import net.minecraft.item.FoodComponent; +import net.minecraft.item.FoodComponents; import net.minecraft.item.Item; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -9,7 +11,7 @@ public class ModItems { - public static final Item VARENYK = registerItem("Varenyk", new Item(new FabricItemSettings())); + public static final Item VARENYK = registerItem("Varenyk", new Item(new FabricItemSettings().food(ModFoodComponents.VARENYK))); public static Item registerItem(String name, Item item){ return Registry.register(Registries.ITEM, new Identifier(UkrainianDelight.MOD_ID, name.toLowerCase()), item); diff --git a/src/main/resources/assets/ukrainian-delight/lang/en_us.json b/src/main/resources/assets/ukrainian-delight/lang/en_us.json deleted file mode 100644 index edaf92a..0000000 --- a/src/main/resources/assets/ukrainian-delight/lang/en_us.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "item.ukrainian_delight.varenyk": "Varenyk", - - "itemgroup.ukrainian_delight": "Ukrainian Delight" -} \ No newline at end of file diff --git a/src/main/resources/assets/ukrainian-delight/lang/uk_ua.json b/src/main/resources/assets/ukrainian-delight/lang/uk_ua.json deleted file mode 100644 index ba7f1d0..0000000 --- a/src/main/resources/assets/ukrainian-delight/lang/uk_ua.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "item.ukrainian_delight.varenyk": "Вареник", - - "itemgroup.ukrainian_delight": "Українська насолода" -} \ No newline at end of file diff --git a/src/main/resources/assets/ukrainian-delight/icon.png b/src/main/resources/assets/ukrainian_delight/icon.png similarity index 100% rename from src/main/resources/assets/ukrainian-delight/icon.png rename to src/main/resources/assets/ukrainian_delight/icon.png diff --git a/src/main/resources/assets/ukrainian_delight/lang/en_us.json b/src/main/resources/assets/ukrainian_delight/lang/en_us.json new file mode 100644 index 0000000..bdd94e3 --- /dev/null +++ b/src/main/resources/assets/ukrainian_delight/lang/en_us.json @@ -0,0 +1,5 @@ +{ + "itemgroup.ukrainian_delight": "Ukrainian Delight", + + "item.ukrainian_delight.varenyk": "Varenyk" +} \ No newline at end of file diff --git a/src/main/resources/assets/ukrainian_delight/models/item/varenyk.json b/src/main/resources/assets/ukrainian_delight/models/item/varenyk.json new file mode 100644 index 0000000..c296ddf --- /dev/null +++ b/src/main/resources/assets/ukrainian_delight/models/item/varenyk.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ukrainian_delight:item/varenyk" + } +} diff --git a/src/main/resources/assets/ukrainian_delight/textures/item/varenyk.png b/src/main/resources/assets/ukrainian_delight/textures/item/varenyk.png new file mode 100644 index 0000000..f74a0da Binary files /dev/null and b/src/main/resources/assets/ukrainian_delight/textures/item/varenyk.png differ diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 9025bf9..a4c2725 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -12,7 +12,7 @@ "sources": "https://github.com/FabricMC/fabric-example-mod" }, "license": "CC0-1.0", - "icon": "assets/ukrainian-delight/icon.png", + "icon": "assets/ukrainian_delight/icon.png", "environment": "*", "entrypoints": { "main": [