mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Added frog's legs
This commit is contained in:
parent
59fbd177a2
commit
9c744eb3eb
12 changed files with 56 additions and 5 deletions
|
@ -12,6 +12,7 @@ import com.minelittlepony.unicopia.datagen.providers.loot.UBlockAdditionsLootTab
|
|||
import com.minelittlepony.unicopia.datagen.providers.loot.UBlockLootTableProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.loot.UChestAdditionsLootTableProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.loot.UChestLootTableProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.loot.UEntityAdditionsLootTableProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.loot.UEntityLootTableProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.recipe.URecipeProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.tag.UBlockTagProvider;
|
||||
|
@ -58,6 +59,7 @@ public class Datagen implements DataGeneratorEntrypoint {
|
|||
pack.addProvider(URecipeProvider::new);
|
||||
pack.addProvider(UBlockLootTableProvider::new);
|
||||
pack.addProvider(UEntityLootTableProvider::new);
|
||||
pack.addProvider(UEntityAdditionsLootTableProvider::new);
|
||||
pack.addProvider(UChestLootTableProvider::new);
|
||||
pack.addProvider(UBlockAdditionsLootTableProvider::new);
|
||||
pack.addProvider(UChestAdditionsLootTableProvider::new);
|
||||
|
|
|
@ -63,10 +63,10 @@ public class UModelProvider extends FabricModelProvider {
|
|||
UItems.BANANA, UItems.BOTCHED_GEM, UItems.BOWL_OF_NUTS, UItems.BROKEN_SUNGLASSES, UItems.BURNED_JUICE, UItems.BURNED_TOAST,
|
||||
UItems.CARAPACE, UItems.CLAM_SHELL, UItems.COOKED_ZAP_APPLE, UItems.CHOCOLATE_OATMEAL_COOKIE,
|
||||
UItems.CLOUD_LUMP, UItems.CRISPY_HAY_FRIES, UItems.CRYSTAL_HEART, UItems.CRYSTAL_SHARD,
|
||||
UItems.COOKED_TROPICAL_FISH, UItems.COOKED_PUFFERFISH, UItems.FRIED_AXOLOTL,
|
||||
UItems.COOKED_TROPICAL_FISH, UItems.COOKED_PUFFERFISH, UItems.COOKED_FROG_LEGS,
|
||||
UItems.DAFFODIL_DAISY_SANDWICH, UItems.DRAGON_BREATH_SCROLL,
|
||||
UItems.EMPTY_JAR,
|
||||
UItems.FRIENDSHIP_BRACELET,
|
||||
UItems.FRIENDSHIP_BRACELET, UItems.FRIED_AXOLOTL, UItems.FROG_LEGS,
|
||||
UItems.GIANT_BALLOON, UItems.GOLDEN_FEATHER, UItems.GOLDEN_OAK_SEEDS, UItems.GOLDEN_WING, UItems.GREEN_APPLE_SEEDS, UItems.GREEN_APPLE, UItems.GROGARS_BELL,
|
||||
UItems.GRYPHON_FEATHER, UItems.GREEN_FRIED_EGG,
|
||||
UItems.HAY_BURGER, UItems.HAY_FRIES, UItems.HORSE_SHOE_FRIES,
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package com.minelittlepony.unicopia.datagen.providers.loot;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import com.minelittlepony.unicopia.item.UItems;
|
||||
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||
import net.fabricmc.fabric.api.datagen.v1.provider.SimpleFabricLootTableProvider;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.loot.LootPool;
|
||||
import net.minecraft.loot.LootTable;
|
||||
import net.minecraft.loot.LootTable.Builder;
|
||||
import net.minecraft.loot.context.LootContextTypes;
|
||||
import net.minecraft.loot.entry.ItemEntry;
|
||||
import net.minecraft.loot.function.LootingEnchantLootFunction;
|
||||
import net.minecraft.loot.provider.number.ConstantLootNumberProvider;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class UEntityAdditionsLootTableProvider extends SimpleFabricLootTableProvider {
|
||||
public UEntityAdditionsLootTableProvider(FabricDataOutput output) {
|
||||
super(output, LootContextTypes.ENTITY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return super.getName() + " Additions";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(BiConsumer<Identifier, Builder> exporter) {
|
||||
generate((type, builder) -> exporter.accept(new Identifier("unicopiamc", EntityType.getId(type).withPrefixedPath("entities/").getPath()), builder));
|
||||
}
|
||||
|
||||
protected void generate(BiConsumer<EntityType<?>, Builder> exporter) {
|
||||
exporter.accept(EntityType.FROG, LootTable.builder()
|
||||
.pool(LootPool.builder()
|
||||
.rolls(ConstantLootNumberProvider.create(1))
|
||||
.with(ItemEntry.builder(UItems.FROG_LEGS)
|
||||
.apply(LootingEnchantLootFunction.builder(ConstantLootNumberProvider.create(2))))));
|
||||
}
|
||||
}
|
|
@ -414,6 +414,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
offerSmelting(exporter, List.of(Items.TROPICAL_FISH), RecipeCategory.FOOD, UItems.COOKED_TROPICAL_FISH, 1.2F, 230, "fish");
|
||||
offerSmelting(exporter, List.of(Items.PUFFERFISH), RecipeCategory.FOOD, UItems.COOKED_PUFFERFISH, 1.2F, 230, "fish");
|
||||
offerSmelting(exporter, List.of(Items.AXOLOTL_BUCKET), RecipeCategory.FOOD, UItems.FRIED_AXOLOTL, 2.2F, 230, "fried_axolotl");
|
||||
offerSmelting(exporter, List.of(UItems.FROG_LEGS), RecipeCategory.FOOD, UItems.COOKED_FROG_LEGS, 2.2F, 10, "frog_legs");
|
||||
offerSmelting(exporter, List.of(UBlocks.MYSTERIOUS_EGG.asItem()), RecipeCategory.FOOD, UItems.GREEN_FRIED_EGG, 3.8F, 630, "fried_egg");
|
||||
|
||||
ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.ZAP_APPLE_JAM_JAR)
|
||||
|
|
|
@ -229,8 +229,8 @@ public class UItemTagProvider extends FabricTagProvider.ItemTagProvider {
|
|||
.addOptionalTag(new Identifier("c", "lemon_chickens"));
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.ROTTEN_MEAT).add(Items.ROTTEN_FLESH);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.ROTTEN_INSECT).add(Items.FERMENTED_SPIDER_EYE);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.COOKED_INSECT);//.add(Items.FERMENTED_SPIDER_EYE); TODO
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.RAW_INSECT).add(Items.SPIDER_EYE, UItems.BUTTERFLY, UItems.WHEAT_WORMS, UBlocks.WORM_BLOCK.asItem());
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.COOKED_INSECT).add(UItems.COOKED_FROG_LEGS);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.RAW_INSECT).add(Items.SPIDER_EYE, UItems.BUTTERFLY, UItems.FROG_LEGS, UItems.WHEAT_WORMS, UBlocks.WORM_BLOCK.asItem());
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.WORMS).add(UItems.WHEAT_WORMS);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.STICKS).add(Items.STICK);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.ROCKS).add(UItems.ROCK);
|
||||
|
|
|
@ -238,6 +238,9 @@ public interface UItems {
|
|||
Item FRIED_AXOLOTL = register("fried_axolotl", new ConsumableItem(new Item.Settings().food(FoodComponents.COOKED_CHICKEN).maxCount(1).recipeRemainder(Items.BUCKET), UseAction.EAT), ItemGroups.FOOD_AND_DRINK);
|
||||
Item GREEN_FRIED_EGG = register("green_fried_egg", new Item(new Item.Settings().food(UFoodComponents.FRIED_EGG)), ItemGroups.FOOD_AND_DRINK);
|
||||
|
||||
Item FROG_LEGS = register("frog_legs", new Item(new Item.Settings().food(FoodComponents.CHICKEN)), ItemGroups.FOOD_AND_DRINK);
|
||||
Item COOKED_FROG_LEGS = register("cooked_frog_legs", new Item(new Item.Settings().food(FoodComponents.COOKED_CHICKEN)), ItemGroups.FOOD_AND_DRINK);
|
||||
|
||||
Item CARAPACE = register("carapace", new Item(new Item.Settings()), ItemGroups.INGREDIENTS);
|
||||
Item CLOTH_BED = register("cloth_bed", new FancyBedItem(UBlocks.CLOTH_BED, new Item.Settings().maxCount(1)), ItemGroups.FUNCTIONAL);
|
||||
Item CLOUD_BED = register("cloud_bed", new CloudBedItem(UBlocks.CLOUD_BED, new Item.Settings().maxCount(1)), ItemGroups.FUNCTIONAL);
|
||||
|
|
|
@ -57,7 +57,7 @@ public interface URecipes {
|
|||
LootTable table = manager.getLootTable(modId);
|
||||
|
||||
if (table != LootTable.EMPTY) {
|
||||
if (id.getPath().startsWith("blocks/")) {
|
||||
if (id.getPath().startsWith("blocks/") || supplier.build().pools.length == 0) {
|
||||
for (var pool : table.pools) {
|
||||
supplier.pool(pool);
|
||||
}
|
||||
|
|
|
@ -82,6 +82,8 @@
|
|||
"item.unicopia.cooked_pufferfish": "Cooked Pufferfish",
|
||||
"item.unicopia.fried_axolotl": "Fried Axolotl",
|
||||
"item.unicopia.green_fried_egg": "Green Fried Egg",
|
||||
"item.unicopia.frog_legs": "Frog's Legs",
|
||||
"item.unicopia.cooked_frog_legs": "Cooked Frog's Legs",
|
||||
|
||||
"item.unicopia.love_bottle": "Bottle o' Love",
|
||||
"item.unicopia.love_bucket": "Love Bucket",
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
BIN
src/main/resources/assets/unicopia/textures/item/frog_legs.png
Normal file
BIN
src/main/resources/assets/unicopia/textures/item/frog_legs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.3 KiB |
|
@ -2,6 +2,7 @@
|
|||
"replace": false,
|
||||
"values": [
|
||||
"#c:raw_insect",
|
||||
"#c:cooked_insect",
|
||||
"#unicopia:polearms",
|
||||
"unicopia:mango_leaves",
|
||||
"unicopia:mango_sapling",
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
"#c:cooked_meat",
|
||||
"#c:raw_meat",
|
||||
"#c:raw_insect",
|
||||
"#c:cooked_insect",
|
||||
"#c:rotten_meat",
|
||||
"#unicopia:container_with_love"
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue