From 772c3e6a2a74f970890f189cc30b697b0824b552 Mon Sep 17 00:00:00 2001 From: blu <87286496+Bluelightning26@users.noreply.github.com> Date: Sat, 30 Nov 2024 12:28:00 -0500 Subject: [PATCH] work morning of nov 30 --- .../net/pengi/potatoperks/PotatoPerks.java | 2 ++ .../potatoperks/item/ModFoodComponents.java | 26 ++++++++++++++++++ .../net/pengi/potatoperks/item/ModItems.java | 11 ++++++++ .../assets/potatoperks/lang/en_us.json | 5 ++++ .../models/item/cooked_blue_potato.json | 6 ++++ .../models/item/cooked_orange_potato.json | 6 ++++ .../models/item/cooked_pink_potato.json | 6 ++++ .../textures/item/cooked_blue_potato.png | Bin 0 -> 409 bytes .../textures/item/cooked_orange_potato.png | Bin 0 -> 433 bytes .../textures/item/cooked_pink_potato.png | Bin 0 -> 416 bytes ...blue_potato_from_smelting_blue_potato.json | 13 +++++++++ ...ge_potato_from_smelting_orange_potato.json | 13 +++++++++ ...pink_potato_from_smelting_pink_potato.json | 13 +++++++++ src/main/resources/fabric.mod.json | 2 +- 14 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 src/main/java/net/pengi/potatoperks/item/ModFoodComponents.java create mode 100644 src/main/resources/assets/potatoperks/models/item/cooked_blue_potato.json create mode 100644 src/main/resources/assets/potatoperks/models/item/cooked_orange_potato.json create mode 100644 src/main/resources/assets/potatoperks/models/item/cooked_pink_potato.json create mode 100644 src/main/resources/assets/potatoperks/textures/item/cooked_blue_potato.png create mode 100644 src/main/resources/assets/potatoperks/textures/item/cooked_orange_potato.png create mode 100644 src/main/resources/assets/potatoperks/textures/item/cooked_pink_potato.png create mode 100644 src/main/resources/data/potatoperks/recipe/cooked_blue_potato_from_smelting_blue_potato.json create mode 100644 src/main/resources/data/potatoperks/recipe/cooked_orange_potato_from_smelting_orange_potato.json create mode 100644 src/main/resources/data/potatoperks/recipe/cooked_pink_potato_from_smelting_pink_potato.json diff --git a/src/main/java/net/pengi/potatoperks/PotatoPerks.java b/src/main/java/net/pengi/potatoperks/PotatoPerks.java index 37239ad..72e97df 100644 --- a/src/main/java/net/pengi/potatoperks/PotatoPerks.java +++ b/src/main/java/net/pengi/potatoperks/PotatoPerks.java @@ -2,6 +2,7 @@ import net.fabricmc.api.ModInitializer; +import net.fabricmc.fabric.api.registry.FuelRegistry; import net.pengi.potatoperks.block.ModBlocks; import net.pengi.potatoperks.item.ModItems; import org.slf4j.Logger; @@ -16,5 +17,6 @@ public void onInitialize() { ModItems.registerModItems(); ModBlocks.registerModBlocks(); + FuelRegistry.INSTANCE.add(ModBlocks.ORANGE_POTATO_BLOCK, 15000); } } \ No newline at end of file diff --git a/src/main/java/net/pengi/potatoperks/item/ModFoodComponents.java b/src/main/java/net/pengi/potatoperks/item/ModFoodComponents.java new file mode 100644 index 0000000..81446c3 --- /dev/null +++ b/src/main/java/net/pengi/potatoperks/item/ModFoodComponents.java @@ -0,0 +1,26 @@ +package net.pengi.potatoperks.item; + +import net.minecraft.component.type.FoodComponent; +import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.entity.effect.StatusEffects; + +public class ModFoodComponents { + public static final FoodComponent COOKED_PINK_POTATO = new FoodComponent.Builder() + .nutrition(5) + .saturationModifier(0.5f) + .statusEffect(new StatusEffectInstance(StatusEffects.SPEED, 200), 95f) + .build(); + +public static final FoodComponent COOKED_BLUE_POTATO = new FoodComponent.Builder() + .nutrition(5) + .saturationModifier(0.5f) + .statusEffect(new StatusEffectInstance(StatusEffects.JUMP_BOOST, 200), 95f) + .build(); + +public static final FoodComponent COOKED_ORANGE_POTATO = new FoodComponent.Builder() + .nutrition(5) + .saturationModifier(0.5f) + .statusEffect(new StatusEffectInstance(StatusEffects.HASTE, 200), 95f) + .build(); + + } diff --git a/src/main/java/net/pengi/potatoperks/item/ModItems.java b/src/main/java/net/pengi/potatoperks/item/ModItems.java index 15bcc68..19bcc16 100644 --- a/src/main/java/net/pengi/potatoperks/item/ModItems.java +++ b/src/main/java/net/pengi/potatoperks/item/ModItems.java @@ -18,7 +18,14 @@ public class ModItems { public static final Item PURPLE_POTATO = registerItem("purple_potato", new Item(new Item.Settings())); + public static final Item COOKED_PINK_POTATO = registerItem("cooked_pink_potato", + new Item(new Item.Settings().food(ModFoodComponents.COOKED_PINK_POTATO))); + public static final Item COOKED_BLUE_POTATO = registerItem("cooked_blue_potato", + new Item(new Item.Settings().food(ModFoodComponents.COOKED_BLUE_POTATO))); + + public static final Item COOKED_ORANGE_POTATO = registerItem("cooked_orange_potato", new Item + (new Item.Settings().food(ModFoodComponents.COOKED_ORANGE_POTATO))); private static Item registerItem(String name, Item item) { return Registry.register(Registries.ITEM, Identifier.of(PotatoPerks.MOD_ID, name), item); @@ -34,6 +41,10 @@ public static void registerModItems(){ entries.add(ORANGE_POTATO); entries.add(PURPLE_POTATO); + entries.add(COOKED_PINK_POTATO); + entries.add(COOKED_BLUE_POTATO); + entries.add(COOKED_ORANGE_POTATO); + } ); } } diff --git a/src/main/resources/assets/potatoperks/lang/en_us.json b/src/main/resources/assets/potatoperks/lang/en_us.json index 488d19f..d8978e7 100644 --- a/src/main/resources/assets/potatoperks/lang/en_us.json +++ b/src/main/resources/assets/potatoperks/lang/en_us.json @@ -4,6 +4,11 @@ "item.potatoperks.orange_potato": "Orange Potato", "item.potatoperks.purple_potato": "Purple Potato", + "item.potatoperks.cooked_pink_potato": "Seared Pink Potato", + "item.potatoperks.cooked_blue_potato": "Charred Blue Potato", + "item.potatoperks.cooked_orange_potato": "Scorched Orange Potato", + "item.potatoperks.cooked_purple_potato": "To Add!", + "block.potatoperks.pink_potato_block": "Block of Pink Potato", "block.potatoperks.blue_potato_block": "Block of Blue Potato", "block.potatoperks.orange_potato_block": "Block of Orange Potato", diff --git a/src/main/resources/assets/potatoperks/models/item/cooked_blue_potato.json b/src/main/resources/assets/potatoperks/models/item/cooked_blue_potato.json new file mode 100644 index 0000000..5e43003 --- /dev/null +++ b/src/main/resources/assets/potatoperks/models/item/cooked_blue_potato.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "potatoperks:item/cooked_blue_potato" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/potatoperks/models/item/cooked_orange_potato.json b/src/main/resources/assets/potatoperks/models/item/cooked_orange_potato.json new file mode 100644 index 0000000..92a3d73 --- /dev/null +++ b/src/main/resources/assets/potatoperks/models/item/cooked_orange_potato.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "potatoperks:item/cooked_orange_potato" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/potatoperks/models/item/cooked_pink_potato.json b/src/main/resources/assets/potatoperks/models/item/cooked_pink_potato.json new file mode 100644 index 0000000..30c96c4 --- /dev/null +++ b/src/main/resources/assets/potatoperks/models/item/cooked_pink_potato.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "potatoperks:item/cooked_pink_potato" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/potatoperks/textures/item/cooked_blue_potato.png b/src/main/resources/assets/potatoperks/textures/item/cooked_blue_potato.png new file mode 100644 index 0000000000000000000000000000000000000000..6f56e3f8b4b124f31100f721d582ccb28ba4a72a GIT binary patch literal 409 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uuz(rC1}QWNE&K#j#_Z|h7-Av# zc7lJ_AqSCT_NF17Eeir-B?Jl|?&J2qC|tpL{*kJUqyNKw-mH!SfgF=3OqjB5R{j&; z^r$1L=5`YI?%)5O##RyW_MW&;diQ4A%~9uMk9nqCXj788(9IT**%@Ygyjtdf*iU7L z838vwUd$=qqV~`rV^+mlDYqk&*M4bj^$A{1JN4{{`E1 zW!u};H?R36vP4YHKE<-V`=jJiE5+YA-k!hbtA|_wp&!2mWe`rcy7EriO@z}SpXGwhw-69j!{_0+s c_w)V_rWnus=UN&E)j`4H>FVdQ&MBb@0EF_9+yDRo literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/potatoperks/textures/item/cooked_orange_potato.png b/src/main/resources/assets/potatoperks/textures/item/cooked_orange_potato.png new file mode 100644 index 0000000000000000000000000000000000000000..6cce00330e65a1bcc0e3475d2cf42685e87ea639 GIT binary patch literal 433 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uuz(rC1}QWNE&K#jChh6s7-Auq zoFKv4)6$f%aQC(P6w{B^>leOAbez_*aiZzn>0v1oL`BnoeErFMSX|Aot(Ax8|3qF# zL*5hykI(hV!fn^*|1;t!+}wPYB{S`@Xv5~6@9rfuNH#rUn()k?O^j!aP7Kc@r-ZLO z`|InRFY*ZO{n;+6#HlhfL1)6V{8LgqYu?20^f)Oc@Jx1ImjC~$!!x4=I~bn%%;1{v z)_~#DvD5PQl0PKsjQ%unGG*>yR7gL`B)a$augQ)w8jP2D9)14vo9`OWrSGpF3b$?B zEB-K%-JC&%b5rB&?#T~d&rVOMZ_atz*wt*(#IPw%Kt4~XBlzi>|Nq;&%$ilSU4FdY z&YvLdSoA{5F-f5ziNS**g`=a5F-9u!6SF@v!++U=w!l5Jb3no6>FVdQ&MBb@07eaz A&j0`b literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/potatoperks/textures/item/cooked_pink_potato.png b/src/main/resources/assets/potatoperks/textures/item/cooked_pink_potato.png new file mode 100644 index 0000000000000000000000000000000000000000..8963a4246f3fcf0bb765229de99bb0c6defb3f41 GIT binary patch literal 416 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uuz(rC1}QWNE&K#j#^vea7-Av# zcEUzKCP#s``VzrC${q(y#ai69C_m(_5XqX?*w&W5;9I56Ta$|diY66|%-k~a6Wrvb?)wzR=0DIjG&m{}&Tm*V zIi9VBb8fiyj*e5;CKv3J+PUXTM1h*uvQH{|Ue8%1XMVSI*FT;FvAAO4aQlfpA69K` z?mEAqO!7i5i$9K;JI>}Yn>|bsCAj;}u#4P?R1)Pm57q8u9 zaQ2(NB%8nT_p*255l>i-J_Y!*FJTf=4v%}z;FeD*IStMfp^ kbd!mTuHM`A@9+JS{5zV8q@9Bm(m|o)>FVdQ&MBb@0As(F`Tzg` literal 0 HcmV?d00001 diff --git a/src/main/resources/data/potatoperks/recipe/cooked_blue_potato_from_smelting_blue_potato.json b/src/main/resources/data/potatoperks/recipe/cooked_blue_potato_from_smelting_blue_potato.json new file mode 100644 index 0000000..d2931ec --- /dev/null +++ b/src/main/resources/data/potatoperks/recipe/cooked_blue_potato_from_smelting_blue_potato.json @@ -0,0 +1,13 @@ +{ + "type": "minecraft:smelting", + "category": "misc", + "cookingtime": 200, + "experience": 0.3, + "group": "blue_potato", + "ingredient": { + "item": "potatoperks:blue_potato" + }, + "result": { + "id": "potatoperks:cooked_blue_potato" + } +} \ No newline at end of file diff --git a/src/main/resources/data/potatoperks/recipe/cooked_orange_potato_from_smelting_orange_potato.json b/src/main/resources/data/potatoperks/recipe/cooked_orange_potato_from_smelting_orange_potato.json new file mode 100644 index 0000000..8a75860 --- /dev/null +++ b/src/main/resources/data/potatoperks/recipe/cooked_orange_potato_from_smelting_orange_potato.json @@ -0,0 +1,13 @@ +{ + "type": "minecraft:smelting", + "category": "misc", + "cookingtime": 200, + "experience": 0.3, + "group": "orange_potato", + "ingredient": { + "item": "potatoperks:orange_potato" + }, + "result": { + "id": "potatoperks:cooked_orange_potato" + } +} \ No newline at end of file diff --git a/src/main/resources/data/potatoperks/recipe/cooked_pink_potato_from_smelting_pink_potato.json b/src/main/resources/data/potatoperks/recipe/cooked_pink_potato_from_smelting_pink_potato.json new file mode 100644 index 0000000..6d9bc80 --- /dev/null +++ b/src/main/resources/data/potatoperks/recipe/cooked_pink_potato_from_smelting_pink_potato.json @@ -0,0 +1,13 @@ +{ + "type": "minecraft:smelting", + "category": "misc", + "cookingtime": 200, + "experience": 0.3, + "group": "pink_potato", + "ingredient": { + "item": "potatoperks:pink_potato" + }, + "result": { + "id": "potatoperks:cooked_pink_potato" + } +} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index b11769d..e6e4b3e 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -9,7 +9,7 @@ ], "contact": { "homepage": "https://fabricmc.net/", - "sources": "https://github.com/FabricMC/fabric-example-mod" + "sources": "https://github.com/Bluelightning26/potato-perks-1.21.1" }, "license": "MIT", "icon": "assets/potatoperks/icon.png",