Skip to content

Commit

Permalink
sosij and banan?
Browse files Browse the repository at this point in the history
  • Loading branch information
bazke committed Oct 30, 2023
1 parent b94a1cc commit 9bfe229
Show file tree
Hide file tree
Showing 15 changed files with 255 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/generated/resources/assets/ltextras/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -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Ǝ⟘Ꞁ",
Expand Down
4 changes: 4 additions & 0 deletions src/generated/resources/assets/ltextras/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
20 changes: 20 additions & 0 deletions src/generated/resources/assets/ltextras/models/item/banana.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
20 changes: 20 additions & 0 deletions src/generated/resources/assets/ltextras/models/item/sosij.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
Original file line number Diff line number Diff line change
@@ -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
}
12 changes: 12 additions & 0 deletions src/generated/resources/data/ltextras/recipes/peeled_banana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "ltextras:banana"
}
],
"result": {
"item": "ltextras:peeled_banana"
}
}
Original file line number Diff line number Diff line change
@@ -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
}
10 changes: 10 additions & 0 deletions src/generated/resources/data/minecraft/recipes/cooked_sosij.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "minecraft:campfire_cooking",
"category": "food",
"cookingtime": 200,
"experience": 1.0,
"ingredient": {
"item": "ltextras:sosij"
},
"result": "ltextras:cooked_sosij"
}
76 changes: 75 additions & 1 deletion src/main/java/com/lovetropics/extras/ExtraItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -23,7 +33,8 @@ public class ExtraItems {

public static final ItemEntry<CollectibleCompassItem> 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();

Expand Down Expand Up @@ -52,6 +63,69 @@ public class ExtraItems {
.defaultModel()
.register();

public static final ItemEntry<Item> 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<Item> 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<Item> 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<Item> 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() {
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9bfe229

Please sign in to comment.