diff --git a/src/generated/resources/assets/ltextras/lang/en_ud.json b/src/generated/resources/assets/ltextras/lang/en_ud.json index 9c7c1c9f..ccc3f429 100644 --- a/src/generated/resources/assets/ltextras/lang/en_ud.json +++ b/src/generated/resources/assets/ltextras/lang/en_ud.json @@ -140,15 +140,19 @@ "invite.ltextras.club_1.top": "˙buıɥɔʇɐʍ ǝɹɐ ʎǝɥ⟘\n˙ǝsınbsıp ɐ ɹɐǝM\n˙noʎ pǝǝu ǝM", "invite.ltextras.club_2.bottom": "˙poob s,ǝpɐǝɯıꞀ ǝɥʇ ɹɐǝɥ I", "invite.ltextras.club_2.top": "˙ʞuıɹp ɐ qɐɹ⅁\n˙ǝsınbsıp ɐ ɹɐǝM\n˙ǝɹǝɥʇ noʎ ǝǝS", + "item.ltextras.banana": "ɐuɐuɐᗺ", "item.ltextras.collectible_basket": "ʇǝʞsɐᗺ ǝןqıʇɔǝןןoƆ", "item.ltextras.collectible_basket.locked": "¡ǝɹǝɥ pǝʞɔoן uǝǝq sɐɥ ʇǝʞsɐᗺ ǝןqıʇɔǝןןoƆ ɹnoʎ", "item.ltextras.collectible_compass": "ssɐdɯoƆ ǝןqıʇɔǝןןoƆ", "item.ltextras.collectible_compass.already_used": "¡ǝuo ʍǝu ɐ puıɟ oʇ pǝǝu ןןıʍ noʎ 'ǝsןǝ buıɥʇǝɯos puıɟ oʇ ʇuɐʍ noʎ ɟI ˙ǝןqıʇɔǝןןoƆ ɐ oʇ sʇuıod ʎpɐǝɹןɐ ssɐdɯoƆ sıɥ⟘", "item.ltextras.collectible_compass.fail": "¿ǝsןǝ ǝɹǝɥʍǝɯos ʎɹʇ ǝqʎɐW ˙ʎqɹɐǝu ǝʌɐɥ ʇ,uop noʎ ʇɐɥʇ sǝןqıʇɔǝןןoƆ ʎuɐ puıɟ oʇ ǝןqɐ ʇou sɐʍ ssɐdɯoƆ ǝɥ⟘", "item.ltextras.collectible_compass.success": "˙ʇı spɹɐʍoʇ sʇuıod ʍou puɐ 'ʇǝʎ ǝʌɐɥ ʇ,uop noʎ ʇɐɥʇ ǝןqıʇɔǝןןoƆ ɐ punoɟ sɐɥ ssɐdɯoƆ ǝɥ⟘ ??", + "item.ltextras.cooked_sosij": "ظısoS pǝʞooƆ", "item.ltextras.entity_wand": "puɐM ʎʇıʇuƎ", "item.ltextras.image": "ǝbɐɯI", "item.ltextras.invite": "ǝʇıʌuI", + "item.ltextras.peeled_banana": "ɐuɐuɐᗺ pǝןǝǝԀ", + "item.ltextras.sosij": "ظısoS", "item.ltextras.tropical_map": "dɐW ןɐɔıdoɹ⟘", "item.ltextras.tropicoin": "uıoƆıdoɹ⟘", "itemGroup.ltextras.ltextras": "sɐɹʇxƎ⟘Ꞁ", diff --git a/src/generated/resources/assets/ltextras/lang/en_us.json b/src/generated/resources/assets/ltextras/lang/en_us.json index c93af8ba..445200fc 100644 --- a/src/generated/resources/assets/ltextras/lang/en_us.json +++ b/src/generated/resources/assets/ltextras/lang/en_us.json @@ -140,15 +140,19 @@ "invite.ltextras.club_1.top": "We need you.\nWear a disguise.\nThey are watching.", "invite.ltextras.club_2.bottom": "I hear the Limeade's good.", "invite.ltextras.club_2.top": "See you there.\nWear a disguise.\nGrab a drink.", + "item.ltextras.banana": "Banana", "item.ltextras.collectible_basket": "Collectible Basket", "item.ltextras.collectible_basket.locked": "Your Collectible Basket has been locked here!", "item.ltextras.collectible_compass": "Collectible Compass", "item.ltextras.collectible_compass.already_used": "This Compass already points to a Collectible. If you want to find something else, you will need to find a new one!", "item.ltextras.collectible_compass.fail": "The Compass was not able to find any Collectibles that you don't have nearby. Maybe try somewhere else?", "item.ltextras.collectible_compass.success": "👀 The Compass has found a Collectible that you don't have yet, and now points towards it.", + "item.ltextras.cooked_sosij": "Cooked Sosij", "item.ltextras.entity_wand": "Entity Wand", "item.ltextras.image": "Image", "item.ltextras.invite": "Invite", + "item.ltextras.peeled_banana": "Peeled Banana", + "item.ltextras.sosij": "Sosij", "item.ltextras.tropical_map": "Tropical Map", "item.ltextras.tropicoin": "TropiCoin", "itemGroup.ltextras.ltextras": "LTExtras", diff --git a/src/generated/resources/assets/ltextras/models/item/banana.json b/src/generated/resources/assets/ltextras/models/item/banana.json new file mode 100644 index 00000000..18ac7c3a --- /dev/null +++ b/src/generated/resources/assets/ltextras/models/item/banana.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/generated", + "display": { + "ground": { + "scale": [ + 0.4, + 0.4, + 0.4 + ], + "translation": [ + 1, + 2, + 1 + ] + } + }, + "textures": { + "layer0": "ltextras:item/banana" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/ltextras/models/item/cooked_sosij.json b/src/generated/resources/assets/ltextras/models/item/cooked_sosij.json new file mode 100644 index 00000000..e1890059 --- /dev/null +++ b/src/generated/resources/assets/ltextras/models/item/cooked_sosij.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/generated", + "display": { + "ground": { + "scale": [ + 0.4, + 0.4, + 0.4 + ], + "translation": [ + 1, + 2, + 1 + ] + } + }, + "textures": { + "layer0": "ltextras:item/cooked_sosij" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/ltextras/models/item/peeled_banana.json b/src/generated/resources/assets/ltextras/models/item/peeled_banana.json new file mode 100644 index 00000000..0afc8b0f --- /dev/null +++ b/src/generated/resources/assets/ltextras/models/item/peeled_banana.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/generated", + "display": { + "ground": { + "scale": [ + 0.4, + 0.4, + 0.4 + ], + "translation": [ + 1, + 2, + 1 + ] + } + }, + "textures": { + "layer0": "ltextras:item/peeled_banana" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/ltextras/models/item/sosij.json b/src/generated/resources/assets/ltextras/models/item/sosij.json new file mode 100644 index 00000000..35d38bd9 --- /dev/null +++ b/src/generated/resources/assets/ltextras/models/item/sosij.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/generated", + "display": { + "ground": { + "scale": [ + 0.4, + 0.4, + 0.4 + ], + "translation": [ + 1, + 2, + 1 + ] + } + }, + "textures": { + "layer0": "ltextras:item/sosij" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ltextras/advancements/recipes/food/peeled_banana.json b/src/generated/resources/data/ltextras/advancements/recipes/food/peeled_banana.json new file mode 100644 index 00000000..185b7bf9 --- /dev/null +++ b/src/generated/resources/data/ltextras/advancements/recipes/food/peeled_banana.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_banana": { + "conditions": { + "items": [ + { + "items": [ + "ltextras:banana" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ltextras:peeled_banana" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_banana", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "ltextras:peeled_banana" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/ltextras/recipes/peeled_banana.json b/src/generated/resources/data/ltextras/recipes/peeled_banana.json new file mode 100644 index 00000000..60caa171 --- /dev/null +++ b/src/generated/resources/data/ltextras/recipes/peeled_banana.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "ltextras:banana" + } + ], + "result": { + "item": "ltextras:peeled_banana" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/advancements/recipes/misc/cooked_sosij.json b/src/generated/resources/data/minecraft/advancements/recipes/misc/cooked_sosij.json new file mode 100644 index 00000000..dc936d83 --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/misc/cooked_sosij.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_sosij": { + "conditions": { + "items": [ + { + "items": [ + "ltextras:sosij" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:cooked_sosij" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_sosij", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:cooked_sosij" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/recipes/cooked_sosij.json b/src/generated/resources/data/minecraft/recipes/cooked_sosij.json new file mode 100644 index 00000000..9a11960d --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/cooked_sosij.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:campfire_cooking", + "category": "food", + "cookingtime": 200, + "experience": 1.0, + "ingredient": { + "item": "ltextras:sosij" + }, + "result": "ltextras:cooked_sosij" +} \ No newline at end of file diff --git a/src/main/java/com/lovetropics/extras/ExtraItems.java b/src/main/java/com/lovetropics/extras/ExtraItems.java index 10fc347e..428f7394 100644 --- a/src/main/java/com/lovetropics/extras/ExtraItems.java +++ b/src/main/java/com/lovetropics/extras/ExtraItems.java @@ -3,11 +3,21 @@ import com.lovetropics.extras.item.*; import com.tterrag.registrate.Registrate; import com.tterrag.registrate.util.entry.ItemEntry; +import net.minecraft.data.recipes.RecipeCategory; +import net.minecraft.data.recipes.ShapelessRecipeBuilder; +import net.minecraft.data.recipes.SimpleCookingRecipeBuilder; +import net.minecraft.world.food.FoodProperties; import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.fml.DistExecutor; +import static com.tterrag.registrate.providers.RegistrateRecipeProvider.has; + public class ExtraItems { private static final Registrate REGISTRATE = LTExtras.registrate(); @@ -23,7 +33,8 @@ public class ExtraItems { public static final ItemEntry COLLECTIBLE_COMPASS = REGISTRATE.item("collectible_compass", CollectibleCompassItem::new) .properties(p -> p.stacksTo(1)) - .model((ctx, prov) -> {}) + .model((ctx, prov) -> { + }) .onRegister(item -> DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> ExtraItemProperties::registerCollectibleCompassAngle)) .register(); @@ -52,6 +63,69 @@ public class ExtraItems { .defaultModel() .register(); + public static final ItemEntry BANANA = REGISTRATE.item("banana", Item::new) + .properties(p -> p.food(new FoodProperties.Builder().build())) + .model((ctx, prov) -> prov.withExistingParent("banana", prov.mcLoc("item/generated")) + .texture("layer0", prov.modLoc("item/banana")) + .rootTransforms() + .end() + .transforms() + .transform(ItemDisplayContext.GROUND) + .scale(0.4f) + .translation(1.0f, 2.0f, 1.0f) + .end() + ) + .register(); + + public static final ItemEntry BANANA_PEELED = REGISTRATE.item("peeled_banana", Item::new) + .recipe((ctx, prov) -> ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, ctx.get()) + .requires(BANANA.get(), 1) + .unlockedBy("has_banana", has(BANANA.get())) + .save(prov)) + .properties(p -> p.food(new FoodProperties.Builder().nutrition(2).saturationMod(0.2f).fast().build())) + .model((ctx, prov) -> prov.withExistingParent("peeled_banana", prov.mcLoc("item/generated")) + .texture("layer0", prov.modLoc("item/peeled_banana")) + .rootTransforms() + .end() + .transforms() + .transform(ItemDisplayContext.GROUND) + .scale(0.4f) + .translation(1.0f, 2.0f, 1.0f) + .end() + ) + .register(); + + public static final ItemEntry SOSIJ = REGISTRATE.item("sosij", Item::new) + .properties(p -> p.food(new FoodProperties.Builder().build())) + .model((ctx, prov) -> prov.withExistingParent("sosij", prov.mcLoc("item/generated")) + .texture("layer0", prov.modLoc("item/sosij")) + .rootTransforms() + .end() + .transforms() + .transform(ItemDisplayContext.GROUND) + .scale(0.4f) + .translation(1.0f, 2.0f, 1.0f) + .end() + ) + .register(); + + public static final ItemEntry SOSIJ_COOKED = REGISTRATE.item("cooked_sosij", Item::new) + .recipe((ctx, prov) -> SimpleCookingRecipeBuilder.generic(Ingredient.of(SOSIJ), RecipeCategory.MISC, ctx.get(), 1, + 200, RecipeSerializer.CAMPFIRE_COOKING_RECIPE) + .unlockedBy("has_sosij", has(SOSIJ)).save(prov, "cooked_sosij")) + .properties(p -> p.food(new FoodProperties.Builder().nutrition(2).saturationMod(0.2f).fast().build())) + .model((ctx, prov) -> prov.withExistingParent("cooked_sosij", prov.mcLoc("item/generated")) + .texture("layer0", prov.modLoc("item/cooked_sosij")) + .rootTransforms() + .end() + .transforms() + .transform(ItemDisplayContext.GROUND) + .scale(0.4f) + .translation(1.0f, 2.0f, 1.0f) + .end() + ) + .register(); + public static void init() { } } diff --git a/src/main/resources/assets/ltextras/textures/item/banana.png b/src/main/resources/assets/ltextras/textures/item/banana.png new file mode 100644 index 00000000..0ddea87f Binary files /dev/null and b/src/main/resources/assets/ltextras/textures/item/banana.png differ diff --git a/src/main/resources/assets/ltextras/textures/item/cooked_sosij.png b/src/main/resources/assets/ltextras/textures/item/cooked_sosij.png new file mode 100644 index 00000000..94c448b5 Binary files /dev/null and b/src/main/resources/assets/ltextras/textures/item/cooked_sosij.png differ diff --git a/src/main/resources/assets/ltextras/textures/item/peeled_banana.png b/src/main/resources/assets/ltextras/textures/item/peeled_banana.png new file mode 100644 index 00000000..5ae207b1 Binary files /dev/null and b/src/main/resources/assets/ltextras/textures/item/peeled_banana.png differ diff --git a/src/main/resources/assets/ltextras/textures/item/sosij.png b/src/main/resources/assets/ltextras/textures/item/sosij.png new file mode 100644 index 00000000..f572167d Binary files /dev/null and b/src/main/resources/assets/ltextras/textures/item/sosij.png differ