From 94952f5c1628bff21c373a5fcebef52b8b04e8b7 Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 28 Apr 2020 21:27:33 +0200 Subject: [PATCH] Update recipes and loot tables, ensure everything is obtainable that should be obtainable, and revamp the enchanting recipe system --- .../com/minelittlepony/unicopia/UTags.java | 35 ++++- .../com/minelittlepony/unicopia/Unicopia.java | 4 +- .../container/SpellBookContainer.java | 2 +- .../container/SpellbookResultSlot.java | 2 +- .../recipe/AbstractSpecialRecipe.java | 100 ------------- .../enchanting/recipe/AffineIngredient.java | 62 -------- .../enchanting/recipe/AffineIngredients.java | 60 -------- .../recipe/CompoundSpellIngredient.java | 80 ---------- .../recipe/SingleSpellIngredient.java | 104 ------------- .../enchanting/recipe/SpecialRecipe.java | 68 --------- .../enchanting/recipe/SpellIngredient.java | 90 ------------ .../enchanting/recipe/SpellRecipe.java | 96 ------------ .../minelittlepony/unicopia/item/UItems.java | 4 - .../AbstractShapelessPredicatedRecipe.java | 77 ++++++++++ .../unicopia/recipe/ChoicePredicate.java | 43 ++++++ .../unicopia/recipe/EnchantmentPredicate.java | 82 +++++++++++ .../unicopia/recipe/Ingredient.java | 137 ++++++++++++++++++ .../unicopia/recipe/SpellBookRecipe.java | 99 +++++++++++++ .../unicopia/recipe/SpellPredicate.java | 55 +++++++ .../unicopia/recipe/StackPredicate.java | 106 ++++++++++++++ .../unicopia/recipe/TagPredicate.java | 79 ++++++++++ .../{enchanting => }/recipe/URecipes.java | 9 +- .../enchanting/ingredients/apple_bloom.json | 8 - .../enchanting/ingredients/blood.json | 11 -- .../unicopia/enchanting/ingredients/dark.json | 11 -- .../enchanting/ingredients/energy.json | 8 - .../unicopia/enchanting/ingredients/fire.json | 10 -- .../unicopia/enchanting/ingredients/ice.json | 7 - .../unicopia/enchanting/ingredients/life.json | 12 -- .../enchanting/ingredients/light.json | 6 - .../ingredients/regular_apples.json | 8 - .../unicopia/enchanting/ingredients/rot.json | 11 -- .../enchanting/ingredients/scootaloo.json | 8 - .../enchanting/ingredients/shard.json | 7 - .../enchanting/ingredients/shell.json | 8 - .../enchanting/ingredients/sight.json | 8 - .../enchanting/ingredients/sound.json | 15 -- .../enchanting/ingredients/sweetie_belle.json | 7 - .../enchanting/ingredients/unaligned.json | 9 -- .../unicopia/enchanting/recipes/awkward.json | 15 -- .../unicopia/enchanting/recipes/charge.json | 12 -- .../unicopia/enchanting/recipes/fire.json | 12 -- .../unicopia/enchanting/recipes/flame.json | 12 -- .../unicopia/enchanting/recipes/ice.json | 12 -- .../unicopia/enchanting/recipes/inferno.json | 12 -- .../enchanting/recipes/necromancy.json | 12 -- .../unicopia/enchanting/recipes/pilon.json | 14 -- .../unicopia/enchanting/recipes/portal.json | 13 -- .../enchanting/recipes/record_crusade.json | 16 -- .../enchanting/recipes/repulsion.json | 13 -- .../enchanting/recipes/suffering.json | 12 -- .../unicopia/enchanting/recipes/vortex.json | 12 -- .../unicopia/recipes/alicorn_amulet.json | 53 ------- .../recipes/{cider.json => apple_cider.json} | 2 +- .../unicopia/recipes/bag_of_holding.json | 2 +- .../assets/unicopia/recipes/bakery_door.json | 2 +- .../assets/unicopia/recipes/boop_o_roops.json | 17 +++ .../assets/unicopia/recipes/burned_juice.json | 9 ++ .../assets/unicopia/recipes/cereal.json | 2 +- ....json => chiseled_chitin_shell_block.json} | 2 +- .../assets/unicopia/recipes/chitin_shell.json | 9 ++ ...tin_block.json => chitin_shell_block.json} | 2 +- .../chitin_shell_block_to_chitin_shell.json | 7 + .../recipes/{anvil.json => cloud_anvil.json} | 0 .../unicopia/recipes/cloud_banister.json | 12 -- ...rmal_cloud_block.json => cloud_block.json} | 5 +- .../recipes/cloud_block_to_cloud_matter.json | 7 + ...normal_cloud_slab.json => cloud_slab.json} | 0 ...d.json => construction_cloud_spawner.json} | 2 +- .../unicopia/recipes/cooked_zap_apple.json | 9 ++ ...loud_block.json => dense_cloud_block.json} | 6 +- .../unicopia/recipes/dense_cloud_slab.json | 12 ++ .../recipes/enchanted_cloud_block.json | 30 +--- .../unicopia/recipes/enchanted_torch.json | 2 +- .../recipes/enchantments/alicorn_amulet.json | 9 ++ .../recipes/enchantments/awkward.json | 16 ++ .../unicopia/recipes/enchantments/charge.json | 10 ++ .../enchantments}/drake.json | 10 +- .../unicopia/recipes/enchantments/fire.json | 10 ++ .../unicopia/recipes/enchantments/flame.json | 10 ++ .../unicopia/recipes/enchantments/ice.json | 10 ++ .../recipes/enchantments/inferno.json | 10 ++ .../enchantments}/light.json | 10 +- .../enchantments/music_disc_crusade.json | 12 ++ .../recipes/enchantments/music_disc_funk.json | 12 ++ .../enchantments/music_disc_pet.json} | 10 +- .../enchantments/music_disc_popular.json} | 10 +- .../enchantments/music_disc_shuffle.json} | 10 +- .../recipes/enchantments/necromancy.json | 13 ++ .../unicopia/recipes/enchantments/pilon.json | 10 ++ .../unicopia/recipes/enchantments/portal.json | 11 ++ .../recipes/enchantments/repulsion.json | 14 ++ .../enchantments}/reveal.json | 8 +- .../enchantments}/shield.json | 8 +- .../enchantments}/siphon.json | 10 +- .../recipes/enchantments/suffering.json | 10 ++ .../unicopia/recipes/enchantments/vortex.json | 10 ++ .../{cider_two.json => flim_flam_cider.json} | 6 +- .../assets/unicopia/recipes/gem.json | 18 ++- .../assets/unicopia/recipes/gem_2.json | 35 ----- .../assets/unicopia/recipes/gem_repair.json | 14 ++ .../unicopia/recipes/hay_burger_safe.json | 6 +- .../assets/unicopia/recipes/hay_fries.json | 2 +- .../assets/unicopia/recipes/juice.json | 2 +- .../assets/unicopia/recipes/library_door.json | 4 +- ...dow_brook.json => meadow_brook_staff.json} | 2 +- .../assets/unicopia/recipes/mist_door.json | 14 -- .../unicopia/recipes/misted_glass_door.json | 14 ++ ...ctus_green.json => moss_to_green_dye.json} | 2 +- .../assets/unicopia/recipes/mug.json | 2 +- .../unicopia/recipes/packed_cloud_slab.json | 12 -- ...g_cloud.json => racing_cloud_spawner.json} | 2 +- ...emembrance.json => remembrance_staff.json} | 2 +- .../recipes/{slime.json => slime_ball.json} | 0 .../assets/unicopia/recipes/spellbook.json | 4 +- .../assets/unicopia/recipes/sugar_block.json | 9 +- .../{sugar.json => sugar_block_to_sugar.json} | 2 +- .../assets/unicopia/recipes/sugar_cereal.json | 14 -- .../assets/unicopia/recipes/tomato_seeds.json | 4 +- .../unicopia/recipes/tomato_seeds_two.json | 7 - ...ild_cloud.json => wild_cloud_spawner.json} | 2 +- .../blocks/chiseled_chitin_shell_block.json | 8 +- .../blocks/chitin_shell_block.json | 37 ++++- .../loot_tables/blocks/tomato_plant.json | 50 +++++++ .../unicopia/loot_tables/entities/cloud.json | 21 +++ .../loot_tables/entities/racing_cloud.json | 29 +++- .../loot_tables/entities/wild_cloud.json | 29 +++- .../tags/items/apple_bloom_spirit.json | 9 ++ .../data/unicopia/tags/items/apples.json | 2 +- .../unicopia/tags/items/cursed_artefacts.json | 2 +- .../unicopia/tags/items/dark_elementals.json | 12 ++ .../unicopia/tags/items/death_elementals.json | 12 ++ .../unicopia/tags/items/fire_elementals.json | 11 ++ .../unicopia/tags/items/fresh_apples.json | 9 ++ .../unicopia/tags/items/fresh_tomatoes.json | 7 + .../tags/items/hammerspace_immune.json | 2 +- .../tags/items/harmonic_elementals.json | 10 ++ .../unicopia/tags/items/ice_elementals.json | 8 + .../tags/items/knowledge_elementals.json | 9 ++ .../unicopia/tags/items/life_elementals.json | 13 ++ .../unicopia/tags/items/light_elementals.json | 7 + .../tags/items/rotting_elementals.json | 12 ++ .../unicopia/tags/items/scootaloo_spirit.json | 9 ++ .../data/unicopia/tags/items/shards.json | 8 + .../data/unicopia/tags/items/shells.json | 9 ++ .../unicopia/tags/items/sight_elementals.json | 9 ++ .../unicopia/tags/items/sound_elementals.json | 16 ++ .../tags/items/sweetie_belle_spirit.json | 8 + 148 files changed, 1393 insertions(+), 1294 deletions(-) delete mode 100644 src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AbstractSpecialRecipe.java delete mode 100644 src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredient.java delete mode 100644 src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredients.java delete mode 100644 src/main/java/com/minelittlepony/unicopia/enchanting/recipe/CompoundSpellIngredient.java delete mode 100644 src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SingleSpellIngredient.java delete mode 100644 src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java delete mode 100644 src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellIngredient.java delete mode 100644 src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellRecipe.java create mode 100644 src/main/java/com/minelittlepony/unicopia/recipe/AbstractShapelessPredicatedRecipe.java create mode 100644 src/main/java/com/minelittlepony/unicopia/recipe/ChoicePredicate.java create mode 100644 src/main/java/com/minelittlepony/unicopia/recipe/EnchantmentPredicate.java create mode 100644 src/main/java/com/minelittlepony/unicopia/recipe/Ingredient.java create mode 100644 src/main/java/com/minelittlepony/unicopia/recipe/SpellBookRecipe.java create mode 100644 src/main/java/com/minelittlepony/unicopia/recipe/SpellPredicate.java create mode 100644 src/main/java/com/minelittlepony/unicopia/recipe/StackPredicate.java create mode 100644 src/main/java/com/minelittlepony/unicopia/recipe/TagPredicate.java rename src/main/java/com/minelittlepony/unicopia/{enchanting => }/recipe/URecipes.java (67%) delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/apple_bloom.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/blood.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/dark.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/energy.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/fire.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/ice.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/life.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/light.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/regular_apples.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/rot.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/scootaloo.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/shard.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/shell.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/sight.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/sound.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/sweetie_belle.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/ingredients/unaligned.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/awkward.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/charge.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/fire.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/flame.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/ice.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/inferno.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/necromancy.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/pilon.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/portal.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/record_crusade.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/repulsion.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/suffering.json delete mode 100644 src/main/resources/assets/unicopia/enchanting/recipes/vortex.json delete mode 100644 src/main/resources/assets/unicopia/recipes/alicorn_amulet.json rename src/main/resources/assets/unicopia/recipes/{cider.json => apple_cider.json} (82%) create mode 100644 src/main/resources/assets/unicopia/recipes/boop_o_roops.json create mode 100644 src/main/resources/assets/unicopia/recipes/burned_juice.json rename src/main/resources/assets/unicopia/recipes/{chissled_chitin.json => chiseled_chitin_shell_block.json} (68%) create mode 100644 src/main/resources/assets/unicopia/recipes/chitin_shell.json rename src/main/resources/assets/unicopia/recipes/{chitin_block.json => chitin_shell_block.json} (74%) create mode 100644 src/main/resources/assets/unicopia/recipes/chitin_shell_block_to_chitin_shell.json rename src/main/resources/assets/unicopia/recipes/{anvil.json => cloud_anvil.json} (100%) delete mode 100644 src/main/resources/assets/unicopia/recipes/cloud_banister.json rename src/main/resources/assets/unicopia/recipes/{normal_cloud_block.json => cloud_block.json} (86%) create mode 100644 src/main/resources/assets/unicopia/recipes/cloud_block_to_cloud_matter.json rename src/main/resources/assets/unicopia/recipes/{normal_cloud_slab.json => cloud_slab.json} (100%) rename src/main/resources/assets/unicopia/recipes/{construction_cloud.json => construction_cloud_spawner.json} (75%) create mode 100644 src/main/resources/assets/unicopia/recipes/cooked_zap_apple.json rename src/main/resources/assets/unicopia/recipes/{packed_cloud_block.json => dense_cloud_block.json} (61%) create mode 100644 src/main/resources/assets/unicopia/recipes/dense_cloud_slab.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/alicorn_amulet.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/awkward.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/charge.json rename src/main/resources/assets/unicopia/{enchanting/recipes => recipes/enchantments}/drake.json (51%) create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/fire.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/flame.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/ice.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/inferno.json rename src/main/resources/assets/unicopia/{enchanting/recipes => recipes/enchantments}/light.json (61%) create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/music_disc_crusade.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/music_disc_funk.json rename src/main/resources/assets/unicopia/{enchanting/recipes/record_pet.json => recipes/enchantments/music_disc_pet.json} (55%) rename src/main/resources/assets/unicopia/{enchanting/recipes/record_popular.json => recipes/enchantments/music_disc_popular.json} (50%) rename src/main/resources/assets/unicopia/{enchanting/recipes/record_shuffle.json => recipes/enchantments/music_disc_shuffle.json} (59%) create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/necromancy.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/pilon.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/portal.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/repulsion.json rename src/main/resources/assets/unicopia/{enchanting/recipes => recipes/enchantments}/reveal.json (58%) rename src/main/resources/assets/unicopia/{enchanting/recipes => recipes/enchantments}/shield.json (50%) rename src/main/resources/assets/unicopia/{enchanting/recipes => recipes/enchantments}/siphon.json (56%) create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/suffering.json create mode 100644 src/main/resources/assets/unicopia/recipes/enchantments/vortex.json rename src/main/resources/assets/unicopia/recipes/{cider_two.json => flim_flam_cider.json} (60%) delete mode 100644 src/main/resources/assets/unicopia/recipes/gem_2.json create mode 100644 src/main/resources/assets/unicopia/recipes/gem_repair.json rename src/main/resources/assets/unicopia/recipes/{staff_meadow_brook.json => meadow_brook_staff.json} (76%) delete mode 100644 src/main/resources/assets/unicopia/recipes/mist_door.json create mode 100644 src/main/resources/assets/unicopia/recipes/misted_glass_door.json rename src/main/resources/assets/unicopia/recipes/{cactus_green.json => moss_to_green_dye.json} (68%) delete mode 100644 src/main/resources/assets/unicopia/recipes/packed_cloud_slab.json rename src/main/resources/assets/unicopia/recipes/{racing_cloud.json => racing_cloud_spawner.json} (76%) rename src/main/resources/assets/unicopia/recipes/{staff_remembrance.json => remembrance_staff.json} (80%) rename src/main/resources/assets/unicopia/recipes/{slime.json => slime_ball.json} (100%) rename src/main/resources/assets/unicopia/recipes/{sugar.json => sugar_block_to_sugar.json} (63%) delete mode 100644 src/main/resources/assets/unicopia/recipes/sugar_cereal.json delete mode 100644 src/main/resources/assets/unicopia/recipes/tomato_seeds_two.json rename src/main/resources/assets/unicopia/recipes/{wild_cloud.json => wild_cloud_spawner.json} (72%) create mode 100644 src/main/resources/data/unicopia/tags/items/apple_bloom_spirit.json create mode 100644 src/main/resources/data/unicopia/tags/items/dark_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/death_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/fire_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/fresh_apples.json create mode 100644 src/main/resources/data/unicopia/tags/items/fresh_tomatoes.json create mode 100644 src/main/resources/data/unicopia/tags/items/harmonic_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/ice_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/knowledge_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/life_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/light_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/rotting_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/scootaloo_spirit.json create mode 100644 src/main/resources/data/unicopia/tags/items/shards.json create mode 100644 src/main/resources/data/unicopia/tags/items/shells.json create mode 100644 src/main/resources/data/unicopia/tags/items/sight_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/sound_elementals.json create mode 100644 src/main/resources/data/unicopia/tags/items/sweetie_belle_spirit.json diff --git a/src/main/java/com/minelittlepony/unicopia/UTags.java b/src/main/java/com/minelittlepony/unicopia/UTags.java index dc381cbe..08b04854 100644 --- a/src/main/java/com/minelittlepony/unicopia/UTags.java +++ b/src/main/java/com/minelittlepony/unicopia/UTags.java @@ -6,9 +6,38 @@ import net.minecraft.tag.Tag; import net.minecraft.util.Identifier; public interface UTags { - Tag CURSED_ARTEFACTS = TagRegistry.item(new Identifier("unicopia", "cursed_artefacts")); - Tag HAMMERPACE_IMMUNE = TagRegistry.item(new Identifier("unicopia", "hammerspace_immune")); - Tag APPLES = TagRegistry.item(new Identifier("unicopia", "apples")); + Tag CURSED_ARTEFACTS = register("cursed_artefacts"); + Tag HAMMERPACE_IMMUNE = register("hammerspace_immune"); + Tag APPLES = register("apples"); + Tag FRESH_TOMATOES = register("fresh_tomatoes"); + Tag FESH_APPLES = register("fresh_apples"); + + Tag SHARDS = register("shards"); + Tag SHELLS = register("shells"); + + Tag FIRE_ELEMENTALS = register("fire_elementals"); + Tag ICE_ELEMENTALS = register("ice_elementals"); + + Tag LIGHT_ELEMENTALS = register("light_elementals"); + Tag DARK_ELEMENTALS = register("dark_elementals"); + + Tag LIFE_ELEMENTALS = register("life_elementals"); + Tag ROTTING_ELEMENTALS = register("rotting_elementals"); + Tag BLOOD_ELEMENTALS = register("death_elementals"); + + Tag UNALIGNED = register("harmonic_elementals"); + + Tag SIGHT_ELEMENTALS = register("sight_elementals"); + Tag SOUND_ELEMENTALS = register("sound_elementals"); + Tag MAGIC_ENERGIC = register("knowledge_elementals"); + + Tag APPLE_BLOOM_SPIRIT = register("apple_bloom_spirit"); + Tag SCOOTALOO_SPIRIT = register("scootaloo_spirit"); + Tag SWEETIE_BELLE_SPIRIT = register("sweetie_belle_spirit"); + + static Tag register(String name) { + return TagRegistry.item(new Identifier("unicopia", name)); + } static void bootstrap() { } } diff --git a/src/main/java/com/minelittlepony/unicopia/Unicopia.java b/src/main/java/com/minelittlepony/unicopia/Unicopia.java index 1c609c44..3d52e7be 100644 --- a/src/main/java/com/minelittlepony/unicopia/Unicopia.java +++ b/src/main/java/com/minelittlepony/unicopia/Unicopia.java @@ -12,11 +12,10 @@ import com.minelittlepony.unicopia.block.UBlocks; import com.minelittlepony.unicopia.command.Commands; import com.minelittlepony.unicopia.container.UContainers; import com.minelittlepony.unicopia.enchanting.Pages; -import com.minelittlepony.unicopia.enchanting.recipe.AffineIngredients; -import com.minelittlepony.unicopia.enchanting.recipe.URecipes; import com.minelittlepony.unicopia.item.UItems; import com.minelittlepony.unicopia.mixin.CriterionsRegistry; import com.minelittlepony.unicopia.network.Channel; +import com.minelittlepony.unicopia.recipe.URecipes; import com.minelittlepony.unicopia.structure.UStructures; public class Unicopia implements ModInitializer { @@ -49,6 +48,5 @@ public class Unicopia implements ModInitializer { CriterionsRegistry.register(BOHDeathCriterion.INSTANCE); ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(Pages.instance()); - ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES).registerReloadListener(AffineIngredients.getInstance()); } } diff --git a/src/main/java/com/minelittlepony/unicopia/container/SpellBookContainer.java b/src/main/java/com/minelittlepony/unicopia/container/SpellBookContainer.java index 87547314..c777301a 100644 --- a/src/main/java/com/minelittlepony/unicopia/container/SpellBookContainer.java +++ b/src/main/java/com/minelittlepony/unicopia/container/SpellBookContainer.java @@ -5,9 +5,9 @@ import javax.annotation.Nonnull; import com.minelittlepony.unicopia.AwaitTickQueue; import com.minelittlepony.unicopia.EquinePredicates; import com.minelittlepony.unicopia.enchanting.IPageUnlockListener; -import com.minelittlepony.unicopia.enchanting.recipe.URecipes; import com.minelittlepony.unicopia.entity.player.Pony; import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.recipe.URecipes; import net.minecraft.container.Container; import net.minecraft.container.Slot; diff --git a/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java b/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java index 7427a32c..4f3cf42a 100644 --- a/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java +++ b/src/main/java/com/minelittlepony/unicopia/container/SpellbookResultSlot.java @@ -2,10 +2,10 @@ package com.minelittlepony.unicopia.container; import com.minelittlepony.unicopia.enchanting.IPageUnlockListener; import com.minelittlepony.unicopia.enchanting.SpellCraftingEvent; -import com.minelittlepony.unicopia.enchanting.recipe.URecipes; import com.minelittlepony.unicopia.entity.player.Pony; import com.minelittlepony.unicopia.item.MagicGemItem; import com.minelittlepony.unicopia.magic.spell.SpellRegistry; +import com.minelittlepony.unicopia.recipe.URecipes; import com.mojang.datafixers.util.Pair; import net.minecraft.container.PlayerContainer; diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AbstractSpecialRecipe.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AbstractSpecialRecipe.java deleted file mode 100644 index f29fd8c3..00000000 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AbstractSpecialRecipe.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.minelittlepony.unicopia.enchanting.recipe; - -import java.util.ArrayList; -import java.util.List; - -import com.google.common.collect.Lists; -import com.minelittlepony.unicopia.container.SpellBookInventory; -import com.minelittlepony.unicopia.item.UItems; - -import net.minecraft.inventory.CraftingInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.recipe.Recipe; -import net.minecraft.util.DefaultedList; -import net.minecraft.util.Identifier; -import net.minecraft.world.World; - -public abstract class AbstractSpecialRecipe implements Recipe { - - private final SpellIngredient spellitem; - - private final DefaultedList ingredients; - - private final Identifier id; - - public AbstractSpecialRecipe(Identifier id, SpellIngredient spellitem, DefaultedList ingredients) { - this.id = id; - this.spellitem = spellitem; - this.ingredients = ingredients; - } - - @Override - public boolean matches(CraftingInventory inv, World worldIn) { - ItemStack enchantedStack = ((SpellBookInventory)inv).getCraftResultMatrix().getInvStack(0); - - if (enchantedStack.isEmpty() || enchantedStack.getItem() == null) { - return false; - } - - if (!spellitem.matches(enchantedStack, enchantedStack.getCount())) { - return false; - } - - int materialMult = enchantedStack.getCount(); - - ArrayList toMatch = Lists.newArrayList(ingredients); - - for (int i = 0; i < inv.getInvSize(); i++) { - ItemStack stack = inv.getInvStack(i); - - if (!stack.isEmpty()) { - if (toMatch.isEmpty() || !removeMatch(toMatch, stack, materialMult)) { - return false; - } - } - } - - return toMatch.isEmpty(); - } - - private boolean removeMatch(List toMatch, ItemStack stack, int materialMult) { - return toMatch.stream() - .filter(s -> s.matches(stack, materialMult)) - .findFirst() - .filter(toMatch::remove) - .isPresent(); - } - - @Override - public Identifier getId() { - return id; - } - - @Override - public ItemStack craft(CraftingInventory inv) { - return getOutput(); - } - - @Override - public boolean fits(int width, int height) { - return width * height < ingredients.size(); - } - - @Override - public ItemStack getRecipeKindIcon() { - return new ItemStack(UItems.GEM); - } - - public SpellIngredient getSpellItem() { - return spellitem; - } - - public DefaultedList getSpellIngredients() { - return ingredients; - } - - @Override - public ItemStack getOutput() { - return spellitem.getStack(); - } -} \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredient.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredient.java deleted file mode 100644 index a75e72c5..00000000 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredient.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.minelittlepony.unicopia.enchanting.recipe; - -import java.util.stream.Stream; - -import javax.annotation.Nonnull; - -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Identifier; -import net.minecraft.util.PacketByteBuf; - -class AffineIngredient implements SpellIngredient { - - static final Serializer SERIALIZER = new Serializer() { - @Override - public AffineIngredient read(JsonElement json) { - return new AffineIngredient(new Identifier(json.getAsJsonObject().get("id").getAsString())); - } - - @Override - public AffineIngredient read(PacketByteBuf buff) { - return new AffineIngredient(new Identifier(buff.readString())); - } - - @Override - public void write(PacketByteBuf buff, AffineIngredient ingredient) { - buff.writeString(ingredient.res.toString()); - } - }; - - private final Identifier res; - - AffineIngredient(Identifier res) { - this.res = res; - } - - @Override - public ItemStack getStack() { - return AffineIngredients.getInstance().getIngredient(res).getStack(); - } - - @Override - public Stream getStacks() { - return AffineIngredients.getInstance().getIngredient(res).getStacks(); - } - - @Override - public boolean matches(ItemStack other, int materialMult) { - return AffineIngredients.getInstance().getIngredient(res).matches(other, materialMult); - } - - @Nonnull - static SpellIngredient parse(JsonObject json) { - return SERIALIZER.read(json); - } - - @Override - public Serializer getSerializer() { - return SERIALIZER; - } -} \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredients.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredients.java deleted file mode 100644 index 7e246f17..00000000 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/AffineIngredients.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.minelittlepony.unicopia.enchanting.recipe; - -import java.util.Map; -import com.google.common.collect.Maps; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonObject; -import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener; -import net.minecraft.resource.JsonDataLoader; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; -import net.minecraft.util.profiler.Profiler; - -public class AffineIngredients extends JsonDataLoader implements IdentifiableResourceReloadListener { - private static final Identifier ID = new Identifier("unicopia", "ingredients"); - private static final Gson GSON = new GsonBuilder() - .setPrettyPrinting() - .disableHtmlEscaping() - .create(); - - private static final AffineIngredients INSTANCE = new AffineIngredients(); - - public static AffineIngredients getInstance() { - return INSTANCE; - } - - private final Map storedIngredients = Maps.newHashMap(); - - AffineIngredients() { - super(GSON, "ingredients"); - } - - @Override - public Identifier getFabricId() { - return ID; - } - - @Override - protected void apply(Map data, ResourceManager manager, Profiler profiled) { - storedIngredients.clear(); - data.forEach((id, json) -> { - SpellIngredient ingredient = SpellIngredient.parse(json.get("items")); - - if (ingredient != null) { - storedIngredients.put(id, ingredient); - } - }); - } - - public SpellIngredient getIngredient(Identifier res) { - SpellIngredient result = storedIngredients.get(res); - - if (result == null) { - new RuntimeException("Ingredient `" + res + "` was not found.").printStackTrace(); - return SpellIngredient.EMPTY; - } - - return result; - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/CompoundSpellIngredient.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/CompoundSpellIngredient.java deleted file mode 100644 index 24646c59..00000000 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/CompoundSpellIngredient.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.minelittlepony.unicopia.enchanting.recipe; - -import java.util.List; -import java.util.stream.Stream; - -import com.google.common.collect.Lists; -import com.google.common.collect.Streams; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonParseException; -import net.minecraft.item.ItemStack; -import net.minecraft.util.PacketByteBuf; - -class CompoundSpellIngredient implements SpellIngredient { - static final Serializer SERIALIZER = new Serializer() { - @Override - public CompoundSpellIngredient read(JsonElement json) { - JsonArray arr = json.getAsJsonArray(); - - if (arr.size() > 0) { - List items = Lists.newArrayList(); - - for (JsonElement j : arr) { - SpellIngredient item = SpellIngredient.parse(j); - - if (item != null) { - items.add(item); - } - } - - if (!items.isEmpty()) { - return new CompoundSpellIngredient(items); - } - } - - throw new JsonParseException("Invalid spell ingredient (compound)"); - } - - @Override - public CompoundSpellIngredient read(PacketByteBuf buff) { - return null; - } - - @Override - public void write(PacketByteBuf buff, CompoundSpellIngredient recipe) { - } - }; - - private final List items; - - CompoundSpellIngredient(List items) { - this.items = items; - } - - @Override - public Stream getStacks() { - Stream stacks = Lists.newArrayList().stream(); - - for (SpellIngredient i : items) { - stacks = Streams.concat(stacks, i.getStacks()); - } - - return stacks.distinct(); - } - - @Override - public ItemStack getStack() { - return items.get((int)(Math.random() * items.size())).getStack(); - } - - @Override - public boolean matches(ItemStack other, int materialMult) { - return items.stream().anyMatch(item -> item.matches(other, materialMult)); - } - - @Override - public Serializer getSerializer() { - return SERIALIZER; - } -} \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SingleSpellIngredient.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SingleSpellIngredient.java deleted file mode 100644 index 77d76c54..00000000 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SingleSpellIngredient.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.minelittlepony.unicopia.enchanting.recipe; - -import java.util.Optional; -import java.util.stream.Stream; - -import com.google.common.collect.Streams; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.minelittlepony.unicopia.magic.spell.SpellRegistry; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemGroup; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DefaultedList; -import net.minecraft.util.Identifier; -import net.minecraft.util.PacketByteBuf; -import net.minecraft.util.registry.Registry; - -class SingleSpellIngredient implements SpellIngredient { - static final Serializer SERIALIZER = new Serializer() { - @Override - public SpellIngredient read(JsonElement json) { - JsonObject obj = json.getAsJsonObject(); - Item item = obj.has("item") ? Registry.ITEM.get(new Identifier(obj.get("item").getAsString())) : null; - - if (item != null) { - int size = Math.max(1, obj.has("count") ? obj.get("count").getAsInt() : 1); - String spell = obj.has("spell") ? obj.get("spell").getAsString() : null; - - ItemStack stack = new ItemStack(item, size); - - if (spell != null) { - stack = SpellRegistry.instance().enchantStack(stack, spell); - } - - return new SingleSpellIngredient(stack, !(obj.has("spell") || obj.has("data"))); - } - - if (obj.has("id")) { - return AffineIngredient.parse(obj); - } - - throw new JsonParseException("Invalid spell ingredient (single)"); - } - - @Override - public SingleSpellIngredient read(PacketByteBuf buff) { - return null; - } - - @Override - public void write(PacketByteBuf buff, SpellIngredient recipe) { - } - }; - - private final ItemStack contained; - - SingleSpellIngredient(ItemStack stack, boolean meta) { - contained = stack; - } - - @Override - public Stream getStacks() { - if (!contained.isEmpty()) { - DefaultedList subItems = DefaultedList.of(); - contained.getItem().appendStacks(ItemGroup.SEARCH, subItems); - - return subItems.stream(); - } - - return Streams.stream(Optional.ofNullable(contained)); - } - - @Override - public ItemStack getStack() { - return contained; - } - - @Override - public boolean matches(ItemStack other, int materialMult) { - if (other.isEmpty() != contained.isEmpty()) { - return false; - } else if (other.isEmpty()) { - return true; - } - - if (other.isEmpty()) { - return false; - } - - if (contained.getItem() == other.getItem() - && ItemStack.areItemsEqual(contained, other)) { - return other.getCount() >= (materialMult * contained.getCount()); - } - - return false; - } - - @Override - public Serializer getSerializer() { - return SERIALIZER; - } -} \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java deleted file mode 100644 index 9b71a1f4..00000000 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpecialRecipe.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.minelittlepony.unicopia.enchanting.recipe; - -import com.google.gson.JsonObject; - -import net.minecraft.item.ItemStack; -import net.minecraft.recipe.RecipeSerializer; -import net.minecraft.recipe.RecipeType; -import net.minecraft.util.DefaultedList; -import net.minecraft.util.Identifier; -import net.minecraft.util.PacketByteBuf; - -public class SpecialRecipe extends AbstractSpecialRecipe { - private final SpellIngredient output; - - public SpecialRecipe(Identifier id, SpellIngredient input, SpellIngredient output, DefaultedList ingredients) { - super(id, input, ingredients); - this.output = output; - } - - @Override - public ItemStack getOutput() { - return output.getStack(); - } - - @Override - public RecipeSerializer getSerializer() { - return URecipes.SPECIAL_SERIALIZER; - } - - @Override - public RecipeType getType() { - return URecipes.SPELL_BOOK; - } - - public static class Serializer implements RecipeSerializer { - @Override - public SpecialRecipe read(Identifier id, JsonObject json) { - return new SpecialRecipe(id, - SpellIngredient.single(json.get("input").getAsJsonObject()), - SpellIngredient.single(json.get("output").getAsJsonObject()), - SpellIngredient.multiple(json) - ); - } - - @Override - public SpecialRecipe read(Identifier id, PacketByteBuf buf) { - SpellIngredient input = SpellIngredient.SERIALIZER.read(buf); - SpellIngredient output = SpellIngredient.SERIALIZER.read(buf); - int length = buf.readInt(); - DefaultedList ingredients = DefaultedList.copyOf(SpellIngredient.EMPTY); - while (ingredients.size() < length) { - ingredients.add(SpellIngredient.SERIALIZER.read(buf)); - } - - return new SpecialRecipe(id, input, output, ingredients); - } - - @Override - public void write(PacketByteBuf buf, SpecialRecipe recipe) { - recipe.getSpellItem().write(buf); - recipe.output.write(buf); - DefaultedList ingredients = recipe.getSpellIngredients(); - buf.writeInt(ingredients.size()); - ingredients.forEach(i -> i.write(buf)); - } - } - -} \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellIngredient.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellIngredient.java deleted file mode 100644 index da478379..00000000 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellIngredient.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.minelittlepony.unicopia.enchanting.recipe; - -import java.util.HashMap; -import java.util.Map; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import net.minecraft.item.ItemStack; -import net.minecraft.util.DefaultedList; -import net.minecraft.util.PacketByteBuf; -import net.minecraft.util.Util; - -public interface SpellIngredient { - - SpellIngredient EMPTY = new SingleSpellIngredient(ItemStack.EMPTY, false); - Map> SERIALIZERS = Util.make(new HashMap<>(), map -> { - map.put("compound", CompoundSpellIngredient.SERIALIZER); - map.put("single", SingleSpellIngredient.SERIALIZER); - map.put("affine", AffineIngredient.SERIALIZER); - }); - Map, String> IDS = SERIALIZERS.entrySet().stream().collect(Collectors.toMap(Map.Entry::getValue, Map.Entry::getKey)); - - Serializer SERIALIZER = new Serializer() { - @Override - public SpellIngredient read(JsonElement json) { - if (json.isJsonArray()) { - return CompoundSpellIngredient.SERIALIZER.read(json); - } - - return SingleSpellIngredient.SERIALIZER.read(json); - } - - @Override - public SpellIngredient read(PacketByteBuf buff) { - String type = buff.readString(); - - return SERIALIZERS.get(type).read(buff); - } - - @Override - public void write(PacketByteBuf buff, SpellIngredient recipe) { - buff.writeString(IDS.get(recipe.getSerializer())); - recipe.write(buff); - } - }; - - static SpellIngredient single(JsonObject json) { - return parse(json.get("item")); - } - - static DefaultedList multiple(JsonObject json) { - DefaultedList ingredients = DefaultedList.of(); - - json.get("ingredients").getAsJsonArray().forEach(i -> ingredients.add(parse(i))); - - if (ingredients.isEmpty()) { - throw new JsonParseException("Recipe cannot have 0 ingredients"); - } - - return ingredients; - } - - static SpellIngredient parse(JsonElement json) { - return SERIALIZER.read(json); - } - - boolean matches(ItemStack other, int materialMult); - - ItemStack getStack(); - - Stream getStacks(); - - Serializer getSerializer(); - - @SuppressWarnings("unchecked") - default void write(PacketByteBuf buff) { - ((Serializer)getSerializer()).write(buff, this); - } - - interface Serializer { - T read(JsonElement json); - - T read(PacketByteBuf buff); - - void write(PacketByteBuf buff, T ingredient); - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellRecipe.java b/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellRecipe.java deleted file mode 100644 index 0af9322a..00000000 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/SpellRecipe.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.minelittlepony.unicopia.enchanting.recipe; - -import com.google.gson.JsonObject; -import com.minelittlepony.unicopia.container.SpellBookInventory; -import com.minelittlepony.unicopia.item.UItems; -import com.minelittlepony.unicopia.magic.spell.SpellRegistry; - -import net.minecraft.inventory.CraftingInventory; -import net.minecraft.inventory.Inventory; -import net.minecraft.item.ItemStack; -import net.minecraft.recipe.RecipeSerializer; -import net.minecraft.recipe.RecipeType; -import net.minecraft.util.DefaultedList; -import net.minecraft.util.Identifier; -import net.minecraft.util.PacketByteBuf; - -public class SpellRecipe extends AbstractSpecialRecipe { - - private final String spellId; - - public SpellRecipe(Identifier id, SpellIngredient spellitem, String spellName, DefaultedList ingredients) { - super(id, spellitem, ingredients); - this.spellId = spellName; - } - - @Override - public ItemStack getRecipeKindIcon() { - return new ItemStack(UItems.SPELLBOOK); - } - - @Override - public ItemStack craft(CraftingInventory inv) { - SpellBookInventory inventory = (SpellBookInventory)inv; - - Inventory craftResult = inventory.getCraftResultMatrix(); - ItemStack stackToEnchant = craftResult.getInvStack(0); - - return SpellRegistry.instance().enchantStack(stackToEnchant, spellId); - } - - @Override - public ItemStack getOutput() { - return SpellRegistry.instance().enchantStack(super.getOutput(), spellId); - } - - @Override - public RecipeSerializer getSerializer() { - return URecipes.SPELL_SERIALIZER; - } - - @Override - public RecipeType getType() { - return URecipes.SPELL_BOOK; - } - - public static class Serializer implements RecipeSerializer { - @Override - public SpellRecipe read(Identifier id, JsonObject json) { - JsonObject resultJson = json.get("result").getAsJsonObject(); - - return new SpellRecipe(id, - SpellIngredient.single(resultJson), - resultJson.get("spell").getAsString(), - SpellIngredient.multiple(json) - ); - } - - @Override - public SpellRecipe read(Identifier id, PacketByteBuf buff) { - SpellIngredient spellItem = SpellIngredient.SERIALIZER.read(buff); - String spellName = buff.readString(); - - int size = buff.readInt(); - DefaultedList ingredients = DefaultedList.ofSize(0, SpellIngredient.EMPTY); - - while (ingredients.size() < size) { - ingredients.add(SpellIngredient.SERIALIZER.read(buff)); - } - - return new SpellRecipe(id, - spellItem, - spellName, - ingredients); - } - - @Override - public void write(PacketByteBuf buff, SpellRecipe recipe) { - recipe.getSpellItem().write(buff); - buff.writeString(recipe.spellId); - DefaultedList ingredients = recipe.getSpellIngredients(); - buff.writeInt(ingredients.size()); - ingredients.forEach(i -> i.write(buff)); - } - } - -} diff --git a/src/main/java/com/minelittlepony/unicopia/item/UItems.java b/src/main/java/com/minelittlepony/unicopia/item/UItems.java index 42c99904..d5dd8ab4 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/UItems.java +++ b/src/main/java/com/minelittlepony/unicopia/item/UItems.java @@ -177,10 +177,6 @@ public interface UItems { } static void bootstrap() { - // FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(zap_apple), new ItemStack(cooked_zap_apple), 0.1F); - // FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(juice), new ItemStack(burned_juice), 0); - // FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(cuccoon), new ItemStack(chitin_shell), 0.3F); - Toxics.bootstrap(); } } diff --git a/src/main/java/com/minelittlepony/unicopia/recipe/AbstractShapelessPredicatedRecipe.java b/src/main/java/com/minelittlepony/unicopia/recipe/AbstractShapelessPredicatedRecipe.java new file mode 100644 index 00000000..5b8610d9 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/recipe/AbstractShapelessPredicatedRecipe.java @@ -0,0 +1,77 @@ +package com.minelittlepony.unicopia.recipe; + +import java.util.List; +import com.google.common.collect.Lists; +import net.minecraft.inventory.Inventory; +import net.minecraft.item.ItemStack; +import net.minecraft.recipe.Recipe; +import net.minecraft.util.DefaultedList; +import net.minecraft.util.Identifier; +import net.minecraft.world.World; + +/** + * Basic crafting recipe that uses our custom ingredients. + */ +public abstract class AbstractShapelessPredicatedRecipe implements Recipe { + + protected final Ingredient output; + + protected final DefaultedList ingredients; + + private final Identifier id; + + public AbstractShapelessPredicatedRecipe(Identifier id, Ingredient output, DefaultedList ingredients) { + this.id = id; + this.output = output; + this.ingredients = ingredients; + } + + protected abstract int getInputMultiplier(C inv, World worldIn); + + @Override + public boolean matches(C inv, World worldIn) { + int materialMult = getInputMultiplier(inv, worldIn); + + if (materialMult == 0) { + return false; + } + + List toMatch = Lists.newArrayList(ingredients); + + for (int i = 0; i < inv.getInvSize(); i++) { + ItemStack stack = inv.getInvStack(i); + + if (!stack.isEmpty()) { + if (toMatch.isEmpty() || !removeMatch(toMatch, stack, materialMult)) { + return false; + } + } + } + + return toMatch.isEmpty(); + } + + private boolean removeMatch(List toMatch, ItemStack stack, int materialMult) { + return toMatch.stream() + .filter(s -> s.matches(stack, materialMult)) + .findFirst() + .filter(toMatch::remove) + .isPresent(); + } + + @Override + public Identifier getId() { + return id; + } + + @Override + public ItemStack craft(C inv) { + return getOutput(); + } + + @Override + public boolean fits(int width, int height) { + return width * height < ingredients.size(); + } + +} \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/recipe/ChoicePredicate.java b/src/main/java/com/minelittlepony/unicopia/recipe/ChoicePredicate.java new file mode 100644 index 00000000..26b91647 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/recipe/ChoicePredicate.java @@ -0,0 +1,43 @@ +package com.minelittlepony.unicopia.recipe; + +import java.util.List; +import java.util.Random; +import java.util.stream.Stream; + +import com.google.gson.JsonArray; +import net.minecraft.item.ItemStack; +import net.minecraft.util.PacketByteBuf; + +class ChoicePredicate implements Ingredient.Predicate { + + static Ingredient.Predicate read(JsonArray arr) { + return new ChoicePredicate(Ingredient.many(arr)); + } + + private final List options; + + ChoicePredicate(List options) { + this.options = options; + } + + @Override + public ItemStack applyModifiers(ItemStack output, Random random) { + return options.get((int)(random.nextFloat() * options.size())).getStack(random); + } + + @Override + public boolean matches(ItemStack stack, int materialMult) { + return options.stream().anyMatch(i -> i.matches(stack, materialMult)); + } + + @Override + public void write(PacketByteBuf buf) { + buf.writeInt(options.size()); + options.forEach(i -> i.write(buf)); + } + + @Override + public Stream getMatchingStacks() { + return options.stream().flatMap(Ingredient::getMatchingStacks).distinct(); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/recipe/EnchantmentPredicate.java b/src/main/java/com/minelittlepony/unicopia/recipe/EnchantmentPredicate.java new file mode 100644 index 00000000..7cc65184 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/recipe/EnchantmentPredicate.java @@ -0,0 +1,82 @@ +package com.minelittlepony.unicopia.recipe; + +import java.util.Random; +import java.util.stream.Stream; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Identifier; +import net.minecraft.util.PacketByteBuf; +import net.minecraft.util.registry.Registry; + +/** + * A predicate that tests for a specific enchantment on an input item. + */ +class EnchantmentPredicate implements Ingredient.Predicate { + + public static Ingredient.Predicate read(PacketByteBuf buf) { + int level = buf.readInt(); + if (level == 0) { + return EMPTY; + } + return new EnchantmentPredicate(Registry.ENCHANTMENT.get(buf.readIdentifier()), level); + } + + static Ingredient.Predicate read(JsonObject json) { + + if (!json.has("enchantment")) { + return EMPTY; + } + + JsonElement e = json.get("enchantment"); + + if (e.isJsonObject()) { + JsonObject o = e.getAsJsonObject(); + Enchantment enchantment = Registry.ENCHANTMENT.get(new Identifier(o.get("id").getAsString())); + int level = o.has("level") ? o.get("level").getAsInt() : 1; + + return new EnchantmentPredicate(enchantment, level); + } + + Enchantment enchantment = Registry.ENCHANTMENT.get(new Identifier(e.getAsString())); + return new EnchantmentPredicate(enchantment, 1); + } + + private final int level; + private final Enchantment enchantment; + + EnchantmentPredicate(Enchantment enchantment, int level) { + this.enchantment = enchantment; + this.level = level; + if (enchantment == null) { + throw new JsonParseException("Invalid enchantment (null)"); + } + } + + @Override + public ItemStack applyModifiers(ItemStack output, Random random) { + output.addEnchantment(enchantment, level); + return output; + } + + @Override + public boolean matches(ItemStack stack, int materialMult) { + return EnchantmentHelper.getLevel(enchantment, stack) >= level; + } + + @Override + public void write(PacketByteBuf buf) { + buf.writeInt(level); + buf.writeIdentifier(Registry.ENCHANTMENT.getId(enchantment)); + } + + @Override + public Stream getMatchingStacks() { + return Stream.empty(); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/recipe/Ingredient.java b/src/main/java/com/minelittlepony/unicopia/recipe/Ingredient.java new file mode 100644 index 00000000..b6a85576 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/recipe/Ingredient.java @@ -0,0 +1,137 @@ +package com.minelittlepony.unicopia.recipe; + +import java.util.List; +import java.util.Random; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import javax.annotation.concurrent.Immutable; + +import com.google.common.collect.Streams; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DefaultedList; +import net.minecraft.util.Lazy; +import net.minecraft.util.PacketByteBuf; + +@Immutable +class Ingredient { + public static final Ingredient EMPTY = new Ingredient(Predicate.EMPTY, Predicate.EMPTY, Predicate.EMPTY, Predicate.EMPTY); + + private final Predicate stack; + private final Predicate tag; + private final Predicate spell; + private final Predicate enchantment; + + private final Lazy> matchingStacks; + + Ingredient(Predicate stack, Predicate tag, Predicate spell, Predicate enchantment) { + this.stack = stack; + this.tag = tag; + this.spell = spell; + this.enchantment = enchantment; + this.matchingStacks = new Lazy<>(() -> { + return Streams.concat( + stack.getMatchingStacks(), + tag.getMatchingStacks(), + spell.getMatchingStacks(), + enchantment.getMatchingStacks() + ).filter(s -> matches(s, 1)) + .collect(Collectors.toList()); + }); + } + + public Stream getMatchingStacks() { + return matchingStacks.get().stream(); + } + + public ItemStack getStack(Random random) { + ItemStack output = ItemStack.EMPTY.copy(); + stack.applyModifiers(output, random); + tag.applyModifiers(output, random); + spell.applyModifiers(output, random); + enchantment.applyModifiers(output, random); + return output; + } + + public boolean matches(ItemStack other, int materialMult) { + return stack.matches(other, materialMult) + && tag.matches(other, materialMult) + && spell.matches(other, materialMult) + && enchantment.matches(other, materialMult); + } + + + public void write(PacketByteBuf buf) { + stack.write(buf); + tag.write(buf); + spell.write(buf); + enchantment.write(buf); + } + + public static Ingredient read(PacketByteBuf buf) { + return new Ingredient( + StackPredicate.read(buf), + TagPredicate.read(buf), + SpellPredicate.read(buf), + EnchantmentPredicate.read(buf)); + } + + public static Ingredient one(JsonElement json) { + + if (json.isJsonArray()) { + return new Ingredient( + ChoicePredicate.read(json.getAsJsonArray()), + Predicate.EMPTY, + Predicate.EMPTY, + Predicate.EMPTY); + } + + JsonObject obj = json.getAsJsonObject(); + return new Ingredient( + StackPredicate.read(obj), + TagPredicate.read(obj), + SpellPredicate.read(obj), + EnchantmentPredicate.read(obj)); + } + + public static DefaultedList many(JsonArray arr) { + DefaultedList ingredients = DefaultedList.copyOf(EMPTY); + + arr.forEach(i -> ingredients.add(one(i))); + + if (ingredients.isEmpty()) { + throw new JsonParseException("Recipe cannot have 0 ingredients"); + } + + return ingredients; + } + + public interface Predicate { + Predicate EMPTY = new Predicate() { + @Override + public Stream getMatchingStacks() { + return Stream.empty(); + } + @Override + public boolean matches(ItemStack stack, int materialMult) { + return true; + } + }; + + Stream getMatchingStacks(); + + boolean matches(ItemStack stack, int materialMult); + + default ItemStack applyModifiers(ItemStack output, Random random) { + return output; + } + + default void write(PacketByteBuf buf) { + buf.writeInt(0); + } + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/recipe/SpellBookRecipe.java b/src/main/java/com/minelittlepony/unicopia/recipe/SpellBookRecipe.java new file mode 100644 index 00000000..08f16333 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/recipe/SpellBookRecipe.java @@ -0,0 +1,99 @@ +package com.minelittlepony.unicopia.recipe; + +import java.util.Random; + +import com.google.gson.JsonObject; +import com.minelittlepony.unicopia.container.SpellBookInventory; +import com.minelittlepony.unicopia.item.UItems; + +import net.minecraft.inventory.CraftingInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.recipe.RecipeSerializer; +import net.minecraft.recipe.RecipeType; +import net.minecraft.util.DefaultedList; +import net.minecraft.util.Identifier; +import net.minecraft.util.PacketByteBuf; +import net.minecraft.world.World; + +/** + * Spellbook recipe accepting an item to enchant, a number of ingredients to use, an ingredient to compose the output. + */ +public class SpellBookRecipe extends AbstractShapelessPredicatedRecipe { + + private static final Random RANDOM = new Random(); + + protected final Ingredient input; + + public SpellBookRecipe(Identifier id, Ingredient input, Ingredient output, DefaultedList ingredients) { + super(id, output, ingredients); + this.input = input; + } + + @Override + protected int getInputMultiplier(CraftingInventory inv, World worldIn) { + ItemStack enchantedStack = ((SpellBookInventory)inv).getCraftResultMatrix().getInvStack(0); + + if (enchantedStack.isEmpty() || enchantedStack.getItem() == null) { + return 0; + } + + if (!input.matches(enchantedStack, enchantedStack.getCount())) { + return 0; + } + + return enchantedStack.getCount(); + } + + @Override + public ItemStack getOutput() { + return output.getStack(RANDOM); + } + + @Override + public ItemStack getRecipeKindIcon() { + return new ItemStack(UItems.GEM); + } + + @Override + public RecipeSerializer getSerializer() { + return URecipes.ENCHANTING_SPELL_SERIALIZER; + } + + @Override + public RecipeType getType() { + return URecipes.SPELL_BOOK; + } + + static class Serializer implements RecipeSerializer { + @Override + public SpellBookRecipe read(Identifier id, JsonObject json) { + return new SpellBookRecipe(id, + Ingredient.one(json.get("input")), + Ingredient.one(json.get("result")), + Ingredient.many(json.get("ingredients").getAsJsonArray()) + ); + } + + @Override + public SpellBookRecipe read(Identifier id, PacketByteBuf buf) { + Ingredient input = Ingredient.read(buf); + Ingredient output = Ingredient.read(buf); + int length = buf.readInt(); + DefaultedList ingredients = DefaultedList.copyOf(Ingredient.EMPTY); + while (ingredients.size() < length) { + ingredients.add(Ingredient.read(buf)); + } + + return new SpellBookRecipe(id, input, output, ingredients); + } + + @Override + public void write(PacketByteBuf buf, SpellBookRecipe recipe) { + recipe.input.write(buf); + recipe.output.write(buf); + DefaultedList ingredients = recipe.ingredients; + buf.writeInt(ingredients.size()); + ingredients.forEach(i -> i.write(buf)); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/minelittlepony/unicopia/recipe/SpellPredicate.java b/src/main/java/com/minelittlepony/unicopia/recipe/SpellPredicate.java new file mode 100644 index 00000000..cab4038b --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/recipe/SpellPredicate.java @@ -0,0 +1,55 @@ +package com.minelittlepony.unicopia.recipe; + +import java.util.Random; +import java.util.stream.Stream; + +import com.google.gson.JsonObject; +import com.minelittlepony.unicopia.magic.spell.SpellRegistry; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.PacketByteBuf; + +class SpellPredicate implements Ingredient.Predicate { + static Ingredient.Predicate read(PacketByteBuf buf) { + int level = buf.readInt(); + if (level == 0) { + return EMPTY; + } + return new SpellPredicate(buf.readString()); + } + + static Ingredient.Predicate read(JsonObject json) { + if (!json.has("spell")) { + return EMPTY; + } + + return new SpellPredicate(json.get("spell").getAsString()); + } + + private final String spell; + + SpellPredicate(String spell) { + this.spell = spell; + } + + @Override + public ItemStack applyModifiers(ItemStack output, Random random) { + return SpellRegistry.instance().enchantStack(output, spell); + } + + @Override + public boolean matches(ItemStack stack, int materialMult) { + return SpellRegistry.getKeyFromStack(stack).equals(spell); + } + + @Override + public void write(PacketByteBuf buf) { + buf.writeInt(1); + buf.writeString(spell); + } + + @Override + public Stream getMatchingStacks() { + return Stream.empty(); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/recipe/StackPredicate.java b/src/main/java/com/minelittlepony/unicopia/recipe/StackPredicate.java new file mode 100644 index 00000000..693185a1 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/recipe/StackPredicate.java @@ -0,0 +1,106 @@ +package com.minelittlepony.unicopia.recipe; + +import java.util.Optional; +import java.util.Random; +import java.util.stream.Stream; + +import com.google.common.collect.Streams; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonSyntaxException; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.util.DefaultedList; +import net.minecraft.util.Identifier; +import net.minecraft.util.PacketByteBuf; +import net.minecraft.util.registry.Registry; + +class StackPredicate implements Ingredient.Predicate { + static Ingredient.Predicate read(PacketByteBuf buf) { + int count = buf.readInt(); + if (count == 0) { + return EMPTY; + } + + if (count > 0) { + return new StackPredicate(buf.readItemStack()); + } + + DefaultedList items = DefaultedList.copyOf(Ingredient.EMPTY); + while (items.size() < count) { + items.add(Ingredient.read(buf)); + } + + return new ChoicePredicate(items); + } + + static Ingredient.Predicate read(JsonObject json) { + if (!json.has("item")) { + return EMPTY; + } + + JsonElement e = json.get("item"); + + if (e.isJsonArray()) { + return ChoicePredicate.read(e.getAsJsonArray()); + } + + if (e.isJsonObject()) { + JsonObject o = e.getAsJsonObject(); + + Item item = o.has("item") ? Registry.ITEM.get(new Identifier(o.get("item").getAsString())) : Items.AIR; + int size = o.has("count") ? Math.max(1, o.get("count").getAsInt()) : 1; + return new StackPredicate(new ItemStack(item, size)); + } + + return new StackPredicate(new ItemStack(Registry.ITEM.get(new Identifier(e.getAsString())))); + } + + private final ItemStack stack; + + StackPredicate(ItemStack stack) { + this.stack = stack; + if (stack.isEmpty()) { + throw new JsonSyntaxException("Unknown item tag"); + } + } + + @Override + public ItemStack applyModifiers(ItemStack output, Random random) { + return output.isEmpty() ? stack.copy() : output; + } + + @Override + public Stream getMatchingStacks() { + if (!stack.isEmpty()) { + DefaultedList subItems = DefaultedList.of(); + stack.getItem().appendStacks(ItemGroup.SEARCH, subItems); + + return subItems.stream(); + } + + return Streams.stream(Optional.ofNullable(stack)); + } + + @Override + public boolean matches(ItemStack other, int materialMult) { + if (other.isEmpty() != stack.isEmpty()) { + return false; + } + + if (other.isEmpty()) { + return true; + } + + return ItemStack.areItemsEqual(stack, other) + && other.getCount() >= (materialMult * stack.getCount()); + } + + @Override + public void write(PacketByteBuf buf) { + buf.writeInt(-1); + buf.writeItemStack(stack); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/recipe/TagPredicate.java b/src/main/java/com/minelittlepony/unicopia/recipe/TagPredicate.java new file mode 100644 index 00000000..ac7552e1 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/recipe/TagPredicate.java @@ -0,0 +1,79 @@ +package com.minelittlepony.unicopia.recipe; + +import java.util.Random; +import java.util.stream.Stream; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonSyntaxException; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tag.ItemTags; +import net.minecraft.tag.Tag; +import net.minecraft.util.Identifier; +import net.minecraft.util.PacketByteBuf; + +class TagPredicate implements Ingredient.Predicate { + static Ingredient.Predicate read(PacketByteBuf buf) { + int count = buf.readInt(); + if (count == 0) { + return EMPTY; + } + return new TagPredicate(buf.readIdentifier(), count); + } + + static Ingredient.Predicate read(JsonObject json) { + if (!json.has("tag")) { + return EMPTY; + } + + JsonElement e = json.get("tag"); + if (e.isJsonObject()) { + JsonObject o = e.getAsJsonObject(); + + Identifier id = new Identifier(o.get("id").getAsString()); + int count = o.has("count") ? Math.max(1, o.get("count").getAsInt()) : 1; + if (count == 0) { + return EMPTY; + } + + return new TagPredicate(id, count); + } + + return new TagPredicate(new Identifier(json.getAsString()), 1); + } + + private final Tag tag; + private final int count; + + TagPredicate(Identifier res, int count) { + tag = ItemTags.getContainer().get(res); + this.count = count; + if (tag == null) { + throw new JsonSyntaxException("Unknown item tag '" + res + "'"); + } + } + + @Override + public ItemStack applyModifiers(ItemStack output, Random random) { + return output.isEmpty() ? new ItemStack(tag.getRandom(random)) : output; + } + + @Override + public Stream getMatchingStacks() { + return tag.values().stream().map(ItemStack::new); + } + + @Override + public boolean matches(ItemStack other, int materialMult) { + return !other.isEmpty() + && tag.contains(other.getItem()) + && other.getCount() > (count * materialMult); + } + + @Override + public void write(PacketByteBuf buf) { + buf.writeInt(count); + buf.writeIdentifier(tag.getId()); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/URecipes.java b/src/main/java/com/minelittlepony/unicopia/recipe/URecipes.java similarity index 67% rename from src/main/java/com/minelittlepony/unicopia/enchanting/recipe/URecipes.java rename to src/main/java/com/minelittlepony/unicopia/recipe/URecipes.java index aaf4f593..635f7928 100644 --- a/src/main/java/com/minelittlepony/unicopia/enchanting/recipe/URecipes.java +++ b/src/main/java/com/minelittlepony/unicopia/recipe/URecipes.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia.enchanting.recipe; +package com.minelittlepony.unicopia.recipe; import net.minecraft.recipe.Recipe; import net.minecraft.recipe.RecipeSerializer; @@ -7,11 +7,10 @@ import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; public interface URecipes { + RecipeType SPELL_BOOK = register("spell_book"); - RecipeType SPELL_BOOK = register("spell_book"); - - RecipeSerializer SPECIAL_SERIALIZER = register("special_spell", new SpecialRecipe.Serializer()); - RecipeSerializer SPELL_SERIALIZER = register("spell", new SpellRecipe.Serializer()); + RecipeSerializer ENCHANTING_SPELL_SERIALIZER = register("enchanting_spell", new SpellBookRecipe.Serializer()); + RecipeSerializer CRAFTING_SPELL_SERIALIZER = register("crafting_spell", new SpellBookRecipe.Serializer()); static > RecipeType register(final String id) { return Registry.register(Registry.RECIPE_TYPE, new Identifier("unicopia", id), new RecipeType() { diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/apple_bloom.json b/src/main/resources/assets/unicopia/enchanting/ingredients/apple_bloom.json deleted file mode 100644 index 8e428899..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/apple_bloom.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "items": [ - { "id": "unicopia:regular_apples" }, - { "item": "unicopia:apple_cider" }, - { "item": "unicopia:apple_seeds" }, - { "item": "minecraft:dye", "data": 1 } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/blood.json b/src/main/resources/assets/unicopia/enchanting/ingredients/blood.json deleted file mode 100644 index 70545d6c..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/blood.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "items": [ - { "item": "minecraft:red_glazed_terracotta" }, - { "item": "minecraft:dye", "data": 1 }, - { "item": "minecraft:redstone_block" }, - { "item": "minecraft:redstone" }, - { "item": "minecraft:emerald" }, - { "item": "minecraft:ghast_tear" }, - { "item": "minecraft:red_nether_brick" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/dark.json b/src/main/resources/assets/unicopia/enchanting/ingredients/dark.json deleted file mode 100644 index 1881d690..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/dark.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "items": [ - { "item": "minecraft:netherbrick" }, - { "item": "minecraft:brick" }, - { "item": "minecraft:red_nether_brick" }, - { "item": "minecraft:coal_block" }, - { "item": "minecraft:coal", "data": 0 }, - { "item": "unicopia:chitin_shell" }, - { "item": "unicopia:cuccoon" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/energy.json b/src/main/resources/assets/unicopia/enchanting/ingredients/energy.json deleted file mode 100644 index ff91f0a9..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/energy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "items": [ - { "item": "unicopia:zap_apple" }, - { "item": "minecraft:redstone_torch" }, - { "item": "minecraft:redstone_block" }, - { "item": "minecraft:redstone" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/fire.json b/src/main/resources/assets/unicopia/enchanting/ingredients/fire.json deleted file mode 100644 index 9adff9d6..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/fire.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "items": [ - { "item": "minecraft:fire_charge" }, - { "item": "minecraft:magma_cream" }, - { "item": "minecraft:blaze_powder" }, - { "item": "minecraft:blaze_rod" }, - { "item": "minecraft:gold_nugget" }, - { "item": "minecraft:lava_bucket" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/ice.json b/src/main/resources/assets/unicopia/enchanting/ingredients/ice.json deleted file mode 100644 index a215ee3d..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/ice.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "items": [ - { "item": "minecraft:ghast_tear" }, - { "item": "minecraft:water_bucket" }, - { "item": "minecraft:snowball" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/life.json b/src/main/resources/assets/unicopia/enchanting/ingredients/life.json deleted file mode 100644 index af7b9d89..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/life.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "items": [ - { "item": "minecraft:brown_mushroom" }, - { "item": "unicopia:rotten_apple" }, - { "item": "minecraft:golden_carrot" }, - { "item": "minecraft:wheat" }, - { "item": "minecraft:wheat_seeds" }, - { "item": "minecraft:grain" }, - { "item": "minecraft:alfalfa_leaves" }, - { "item": "unicopia:moss" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/light.json b/src/main/resources/assets/unicopia/enchanting/ingredients/light.json deleted file mode 100644 index 60c30fdb..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/light.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "items": [ - { "item": "minecraft:glowstone" }, - { "item": "minecraft:glowstone_dust" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/regular_apples.json b/src/main/resources/assets/unicopia/enchanting/ingredients/regular_apples.json deleted file mode 100644 index 7b538461..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/regular_apples.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "items": [ - { "item": "minecraft:apple" }, - { "item": "unicopia:apple_green" }, - { "item": "unicopia:apple_sweet" }, - { "item": "unicopia:apple_sour" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/rot.json b/src/main/resources/assets/unicopia/enchanting/ingredients/rot.json deleted file mode 100644 index 70f138fe..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/rot.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "items": [ - { "item": "minecraft:rotten_flesh" }, - { "item": "unicopia:cloudsdale_tomato", "data": 1 }, - { "item": "unicopia:tomato", "data": 1 }, - { "item": "unicopia:rotten_apple" }, - { "item": "minecraft:red_mushroom" }, - { "item": "minecraft:brown_mushroom" }, - { "item": "unicopia:moss" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/scootaloo.json b/src/main/resources/assets/unicopia/enchanting/ingredients/scootaloo.json deleted file mode 100644 index a8a0c031..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/scootaloo.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "items": [ - { "item": "minecraft:chicken" }, - { "item": "minecraft:cooked_chicken" }, - { "item": "minecraft:feather" }, - { "item": "minecraft:string" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/shard.json b/src/main/resources/assets/unicopia/enchanting/ingredients/shard.json deleted file mode 100644 index 073026fd..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/shard.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "items": [ - { "item": "minecraft:egg" }, - { "item": "minecraft:coal" }, - { "item": "minecraft:flint" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/shell.json b/src/main/resources/assets/unicopia/enchanting/ingredients/shell.json deleted file mode 100644 index b182c106..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/shell.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "items": [ - { "item": "minecraft:egg" }, - { "item": "minecraft:firework_charge" }, - { "item": "minecraft:ender_eye" }, - { "item": "minecraft:fire_charge" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/sight.json b/src/main/resources/assets/unicopia/enchanting/ingredients/sight.json deleted file mode 100644 index 327ab39f..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/sight.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "items": [ - { "item": "minecraft:ender_eye" }, - { "item": "minecraft:spider_eye" }, - { "item": "minecraft:speckled_mellon" }, - { "item": "minecraft:ender_pearl" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/sound.json b/src/main/resources/assets/unicopia/enchanting/ingredients/sound.json deleted file mode 100644 index 352edf39..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/sound.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "items": [ - { "item": "minecraft:record_13" }, - { "item": "minecraft:record_cat" }, - { "item": "minecraft:record_blocks" }, - { "item": "minecraft:record_chirp" }, - { "item": "minecraft:record_far" }, - { "item": "minecraft:record_mall" }, - { "item": "minecraft:record_mellohi" }, - { "item": "minecraft:record_stal" }, - { "item": "minecraft:record_strad" }, - { "item": "minecraft:record_ward" }, - { "item": "minecraft:record_wait" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/sweetie_belle.json b/src/main/resources/assets/unicopia/enchanting/ingredients/sweetie_belle.json deleted file mode 100644 index f5406c91..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/sweetie_belle.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "items": [ - { "item": "minecraft:noteblock" }, - { "item": "minecraft:jukebox" }, - { "item": "minecraft:diamond" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/ingredients/unaligned.json b/src/main/resources/assets/unicopia/enchanting/ingredients/unaligned.json deleted file mode 100644 index b7627d30..00000000 --- a/src/main/resources/assets/unicopia/enchanting/ingredients/unaligned.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "items": [ - { "item": "minecraft:red_flower" }, - { "item": "minecraft:yellow_flower" }, - { "item": "minecraft:tallgrass" }, - { "item": "minecraft:sapling" }, - { "item": "minecraft:stick" } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/awkward.json b/src/main/resources/assets/unicopia/enchanting/recipes/awkward.json deleted file mode 100644 index 17cccde8..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/awkward.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "id": "unicopia:unaligned" }, - { "id": "unicopia:unaligned" }, - { "id": "unicopia:unaligned" } - ], - "result": { - "item": [ - { "item": "unicopia:gem" }, - { "item": "unicopia:corrupted_gem" } - ], - "spell": "awkward" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/charge.json b/src/main/resources/assets/unicopia/enchanting/recipes/charge.json deleted file mode 100644 index a6cd9e59..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/charge.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "id": "unicopia:energy" }, - { "item": "unicopia:gem", "spell": "fire" }, - { "id": "unicopia:fire" } - ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "charge" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/fire.json b/src/main/resources/assets/unicopia/enchanting/recipes/fire.json deleted file mode 100644 index 7dcff85b..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/fire.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "item": "unicopia:gem", "spell": "flame" }, - { "id": "unicopia:fire" }, - { "id": "unicopia:fire" } - ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "fire" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/flame.json b/src/main/resources/assets/unicopia/enchanting/recipes/flame.json deleted file mode 100644 index 29013561..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/flame.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "id": "unicopia:fire" }, - { "id": "unicopia:fire" }, - { "id": "unicopia:fire" } - ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "fire" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/ice.json b/src/main/resources/assets/unicopia/enchanting/recipes/ice.json deleted file mode 100644 index 456761cf..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/ice.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "id": "unicopia:ice" }, - { "id": "unicopia:ice" }, - { "id": "unicopia:ice" } - ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "ice" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/inferno.json b/src/main/resources/assets/unicopia/enchanting/recipes/inferno.json deleted file mode 100644 index 0d5036c4..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/inferno.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "item": "unicopia:gem", "spell": "fire" }, - { "id": "unicopia:fire" }, - { "id": "unicopia:fire" } - ], - "result": { - "item": { "item": "unicopia:corrupted_gem" }, - "spell": "inferno" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/necromancy.json b/src/main/resources/assets/unicopia/enchanting/recipes/necromancy.json deleted file mode 100644 index 6f4a5aec..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/necromancy.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "id": "unicopia:blood" }, - { "id": "unicopia:energy" }, - { "id": "unicopia:rot" } - ], - "result": { - "item": { "item": "unicopia:corrupted_gem" }, - "spell": "necromancy" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/pilon.json b/src/main/resources/assets/unicopia/enchanting/recipes/pilon.json deleted file mode 100644 index 4e95c658..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/pilon.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "id": "unicopia:energy" }, - { "id": "unicopia:life" }, - { "item": "unicopia:gem", "spell": "charge" } - ], - "result": { - "item": [ - { "item": "unicopia:gem" } - ], - "spell": "siphon" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/portal.json b/src/main/resources/assets/unicopia/enchanting/recipes/portal.json deleted file mode 100644 index 442d3e7b..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/portal.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "id": "unicopia:sight" }, - { "item": "minecraft:ghast_tear" }, - { "id": "unicopia:energy" }, - { "item": "unicopia:gem", "spell": "fire" } - ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "portal" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/record_crusade.json b/src/main/resources/assets/unicopia/enchanting/recipes/record_crusade.json deleted file mode 100644 index a0090547..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/record_crusade.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "type": "unicopia:crafting_special", - "ingredients": [ - { "id": "unicopia:apple_bloom" }, - { "id": "unicopia:scootaloo" }, - { "id": "unicopia:sweetie_belle" } - ], - "input": { - "item": [ - { "id": "unicopia:sound"} - ] - }, - "output": { - "item": { "item": "unicopia:record_crusade" } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/repulsion.json b/src/main/resources/assets/unicopia/enchanting/recipes/repulsion.json deleted file mode 100644 index bef53703..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/repulsion.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "id": "unicopia:fire" }, - { "id": "unicopia:shell" }, - { "item": "unicopia:gem", "spell": "shield" }, - { "id": "unicopia:shell" } - ], - "result": { - "item": { "item": "unicopia:corrupted_gem" }, - "spell": "shield" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/suffering.json b/src/main/resources/assets/unicopia/enchanting/recipes/suffering.json deleted file mode 100644 index 83423fbb..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/suffering.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "item": "minecraft:fire_charge" }, - { "id": "unicopia:blood" }, - { "item": "unicopia:gem", "spell": "fire" } - ], - "result": { - "item": { "item": "unicopia:corrupted_gem" }, - "spell": "vortex" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/vortex.json b/src/main/resources/assets/unicopia/enchanting/recipes/vortex.json deleted file mode 100644 index f2ee039e..00000000 --- a/src/main/resources/assets/unicopia/enchanting/recipes/vortex.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "unicopia:crafting_spell", - "ingredients": [ - { "id": "unicopia:shell" }, - { "item": "unicopia:gem", "spell": "shield" }, - { "item": "unicopia:gem", "spell": "portal" } - ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "vortex" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/alicorn_amulet.json b/src/main/resources/assets/unicopia/recipes/alicorn_amulet.json deleted file mode 100644 index 3c663072..00000000 --- a/src/main/resources/assets/unicopia/recipes/alicorn_amulet.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "*D~", - "#$#", - " # " - ], - "key": { - "#": [ - { "item": "unicopia:corrupted_gem" } - ], - "D": [ - { "item": "minecraft:diamond" } - ], - "*": [ - { "item": "unicopia:corrupted_gem", "nbt": { "spell": "inferno" } } - ], - "$": [ - { "item": "unicopia:corrupted_gem", "nbt": { "spell": "darkness" } } - ], - "~": [ - { "item": "unicopia:corrupted_gem", "nbt": { "spell": "necromancy" } } - ] - }, - "result": { "item": "unicopia:alicorn_amulet" } -} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/assets/unicopia/recipes/cider.json b/src/main/resources/assets/unicopia/recipes/apple_cider.json similarity index 82% rename from src/main/resources/assets/unicopia/recipes/cider.json rename to src/main/resources/assets/unicopia/recipes/apple_cider.json index 54033fc9..5360fdc7 100644 --- a/src/main/resources/assets/unicopia/recipes/cider.json +++ b/src/main/resources/assets/unicopia/recipes/apple_cider.json @@ -19,5 +19,5 @@ { "item": "minecraft:apple" } ] }, - "result": { "item": "unicopia:apple_cider", "data": 0, "count": 1 } + "result": { "item": "unicopia:apple_cider" } } diff --git a/src/main/resources/assets/unicopia/recipes/bag_of_holding.json b/src/main/resources/assets/unicopia/recipes/bag_of_holding.json index cb57fd36..3edc1214 100644 --- a/src/main/resources/assets/unicopia/recipes/bag_of_holding.json +++ b/src/main/resources/assets/unicopia/recipes/bag_of_holding.json @@ -16,5 +16,5 @@ { "item": "minecraft:leather" } ] }, - "result": { "item": "unicopia:bag_of_holding", "data": 0, "count": 1 } + "result": { "item": "unicopia:bag_of_holding" } } diff --git a/src/main/resources/assets/unicopia/recipes/bakery_door.json b/src/main/resources/assets/unicopia/recipes/bakery_door.json index bfa3fbed..ce2257c8 100644 --- a/src/main/resources/assets/unicopia/recipes/bakery_door.json +++ b/src/main/resources/assets/unicopia/recipes/bakery_door.json @@ -10,7 +10,7 @@ { "item": "unicopia:sugar_block" } ], "*": [ - { "item": "minecraft:dye", "data": 9 } + { "item": "minecraft:pink_dye" } ] }, "result": { "item": "unicopia:bakery_door", "count": 3 } diff --git a/src/main/resources/assets/unicopia/recipes/boop_o_roops.json b/src/main/resources/assets/unicopia/recipes/boop_o_roops.json new file mode 100644 index 00000000..a200566a --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/boop_o_roops.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#*#", + "###" + ], + "key": { + "#": [ + { "item": "unicopia:sugar_block" } + ], + "*": [ + { "item": "unicopia:crereal" } + ] + }, + "result": { "item": "unicopia:boop_o_roops" } +} diff --git a/src/main/resources/assets/unicopia/recipes/burned_juice.json b/src/main/resources/assets/unicopia/recipes/burned_juice.json new file mode 100644 index 00000000..22ddf879 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/burned_juice.json @@ -0,0 +1,9 @@ +{ + "type": "smelting", + "ingredient": { + "item": "unicopia:juice" + }, + "result": "unicopia:burned_juice", + "experience": 0, + "cookingtime": 100 +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/cereal.json b/src/main/resources/assets/unicopia/recipes/cereal.json index 054a0d76..160aa5cc 100644 --- a/src/main/resources/assets/unicopia/recipes/cereal.json +++ b/src/main/resources/assets/unicopia/recipes/cereal.json @@ -6,5 +6,5 @@ { "item": "unicopia:alfalfa_leaves" }, { "item": "minecraft:milk_bucket" } ], - "result": { "item": "unicopia:cereal", "data": 0, "count": 1 } + "result": { "item": "unicopia:cereal" } } diff --git a/src/main/resources/assets/unicopia/recipes/chissled_chitin.json b/src/main/resources/assets/unicopia/recipes/chiseled_chitin_shell_block.json similarity index 68% rename from src/main/resources/assets/unicopia/recipes/chissled_chitin.json rename to src/main/resources/assets/unicopia/recipes/chiseled_chitin_shell_block.json index 6edc05fe..8a34f4cb 100644 --- a/src/main/resources/assets/unicopia/recipes/chissled_chitin.json +++ b/src/main/resources/assets/unicopia/recipes/chiseled_chitin_shell_block.json @@ -10,5 +10,5 @@ { "item": "unicopia:chitin_block" } ] }, - "result": { "item": "unicopia:chissled_chitin", "count": 4 } + "result": { "item": "unicopia:chiseled_chitin_shell_block", "count": 4 } } diff --git a/src/main/resources/assets/unicopia/recipes/chitin_shell.json b/src/main/resources/assets/unicopia/recipes/chitin_shell.json new file mode 100644 index 00000000..c924ea84 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/chitin_shell.json @@ -0,0 +1,9 @@ +{ + "type": "smelting", + "ingredient": { + "item": "unicopia:slime_drop" + }, + "result": "unicopia:chitin_shell", + "experience": 0.3, + "cookingtime": 130 +} diff --git a/src/main/resources/assets/unicopia/recipes/chitin_block.json b/src/main/resources/assets/unicopia/recipes/chitin_shell_block.json similarity index 74% rename from src/main/resources/assets/unicopia/recipes/chitin_block.json rename to src/main/resources/assets/unicopia/recipes/chitin_shell_block.json index 86c4a2f0..e908e8f5 100644 --- a/src/main/resources/assets/unicopia/recipes/chitin_block.json +++ b/src/main/resources/assets/unicopia/recipes/chitin_shell_block.json @@ -11,5 +11,5 @@ { "item": "unicopia:chitin_shell" } ] }, - "result": { "item": "unicopia:chitin_block", "count": 1 } + "result": { "item": "unicopia:chitin_shell_block" } } diff --git a/src/main/resources/assets/unicopia/recipes/chitin_shell_block_to_chitin_shell.json b/src/main/resources/assets/unicopia/recipes/chitin_shell_block_to_chitin_shell.json new file mode 100644 index 00000000..700d8b4d --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/chitin_shell_block_to_chitin_shell.json @@ -0,0 +1,7 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "unicopia:chitin_shell_block" } + ], + "result": { "item": "unicopia:chitin_shell", "count": 9 } +} diff --git a/src/main/resources/assets/unicopia/recipes/anvil.json b/src/main/resources/assets/unicopia/recipes/cloud_anvil.json similarity index 100% rename from src/main/resources/assets/unicopia/recipes/anvil.json rename to src/main/resources/assets/unicopia/recipes/cloud_anvil.json diff --git a/src/main/resources/assets/unicopia/recipes/cloud_banister.json b/src/main/resources/assets/unicopia/recipes/cloud_banister.json deleted file mode 100644 index 8b99674d..00000000 --- a/src/main/resources/assets/unicopia/recipes/cloud_banister.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "BBB" - ], - "key": { - "B": [ - { "item": "unicopia:enchanted_cloud_block" } - ] - }, - "result": { "item": "unicopia:cloud_banister", "count": 3 } -} diff --git a/src/main/resources/assets/unicopia/recipes/normal_cloud_block.json b/src/main/resources/assets/unicopia/recipes/cloud_block.json similarity index 86% rename from src/main/resources/assets/unicopia/recipes/normal_cloud_block.json rename to src/main/resources/assets/unicopia/recipes/cloud_block.json index 0d4d250e..e0f28c83 100644 --- a/src/main/resources/assets/unicopia/recipes/normal_cloud_block.json +++ b/src/main/resources/assets/unicopia/recipes/cloud_block.json @@ -1,9 +1,8 @@ { "type": "minecraft:crafting_shaped", "pattern": [ - "###", - "###", - "###" + "##", + "##" ], "key": { "#": [ diff --git a/src/main/resources/assets/unicopia/recipes/cloud_block_to_cloud_matter.json b/src/main/resources/assets/unicopia/recipes/cloud_block_to_cloud_matter.json new file mode 100644 index 00000000..17fb9a5d --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/cloud_block_to_cloud_matter.json @@ -0,0 +1,7 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "unicopia:cloud_block" } + ], + "result": { "item": "unicopia:cloud_matter", "count": 4 } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/normal_cloud_slab.json b/src/main/resources/assets/unicopia/recipes/cloud_slab.json similarity index 100% rename from src/main/resources/assets/unicopia/recipes/normal_cloud_slab.json rename to src/main/resources/assets/unicopia/recipes/cloud_slab.json diff --git a/src/main/resources/assets/unicopia/recipes/construction_cloud.json b/src/main/resources/assets/unicopia/recipes/construction_cloud_spawner.json similarity index 75% rename from src/main/resources/assets/unicopia/recipes/construction_cloud.json rename to src/main/resources/assets/unicopia/recipes/construction_cloud_spawner.json index 6e3ac349..dfd918da 100644 --- a/src/main/resources/assets/unicopia/recipes/construction_cloud.json +++ b/src/main/resources/assets/unicopia/recipes/construction_cloud_spawner.json @@ -13,5 +13,5 @@ { "item": "unicopia:cloud_matter" } ] }, - "result": { "item": "unicopia:construction_cloud_spawner", "count": 1 } + "result": { "item": "unicopia:construction_cloud_spawner" } } diff --git a/src/main/resources/assets/unicopia/recipes/cooked_zap_apple.json b/src/main/resources/assets/unicopia/recipes/cooked_zap_apple.json new file mode 100644 index 00000000..4a37347e --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/cooked_zap_apple.json @@ -0,0 +1,9 @@ +{ + "type": "smelting", + "ingredient": { + "item": "unicopia:zap_apple" + }, + "result": "unicopia:cooked_zap_apple", + "experience": 0.2, + "cookingtime": 430 +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/packed_cloud_block.json b/src/main/resources/assets/unicopia/recipes/dense_cloud_block.json similarity index 61% rename from src/main/resources/assets/unicopia/recipes/packed_cloud_block.json rename to src/main/resources/assets/unicopia/recipes/dense_cloud_block.json index 528dbb2e..e7e9a4f4 100644 --- a/src/main/resources/assets/unicopia/recipes/packed_cloud_block.json +++ b/src/main/resources/assets/unicopia/recipes/dense_cloud_block.json @@ -1,13 +1,13 @@ { "type": "minecraft:crafting_shaped", "pattern": [ - " ##", - " ##" + "##", + "##" ], "key": { "#": [ { "item": "unicopia:cloud_block" } ] }, - "result": { "item": "unicopia:packed_cloud_block", "count": 1 } + "result": { "item": "unicopia:dense_cloud_block", "count": 1 } } diff --git a/src/main/resources/assets/unicopia/recipes/dense_cloud_slab.json b/src/main/resources/assets/unicopia/recipes/dense_cloud_slab.json new file mode 100644 index 00000000..92b21509 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/dense_cloud_slab.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###" + ], + "key": { + "#": [ + { "item": "unicopia:dense_cloud_block" } + ] + }, + "result": { "item": "unicopia:dense_cloud_slab", "count": 6 } +} diff --git a/src/main/resources/assets/unicopia/recipes/enchanted_cloud_block.json b/src/main/resources/assets/unicopia/recipes/enchanted_cloud_block.json index 784b23e9..58af19b3 100644 --- a/src/main/resources/assets/unicopia/recipes/enchanted_cloud_block.json +++ b/src/main/resources/assets/unicopia/recipes/enchanted_cloud_block.json @@ -15,35 +15,7 @@ "*": [ { "item": "minecraft:enchanted_book", - "nbt": { - "ench": [ - { "id": 2, "lvl": 1 } - ] - } - }, - { - "item": "minecraft:enchanted_book", - "nbt": { - "ench": [ - { "id": 2, "lvl": 2 } - ] - } - }, - { - "item": "minecraft:enchanted_book", - "nbt": { - "ench": [ - { "id": 2, "lvl": 3 } - ] - } - }, - { - "item": "minecraft:enchanted_book", - "nbt": { - "ench": [ - { "id": 2, "lvl": 4 } - ] - } + "ench": "minecraft:feather_falling" } ] }, diff --git a/src/main/resources/assets/unicopia/recipes/enchanted_torch.json b/src/main/resources/assets/unicopia/recipes/enchanted_torch.json index 182f6673..112b076a 100644 --- a/src/main/resources/assets/unicopia/recipes/enchanted_torch.json +++ b/src/main/resources/assets/unicopia/recipes/enchanted_torch.json @@ -12,5 +12,5 @@ { "item": "unicopia:gem", "nbt": { "spell": "light" } } ] }, - "result": { "item": "unicopia:enchanted_torch", "count": 1 } + "result": { "item": "unicopia:enchanted_torch" } } diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/alicorn_amulet.json b/src/main/resources/assets/unicopia/recipes/enchantments/alicorn_amulet.json new file mode 100644 index 00000000..212593c4 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/alicorn_amulet.json @@ -0,0 +1,9 @@ +{ + "type": "unicopia:shapeless_crafting_spell", + "ingredients": [ + { "item": "unicopia:gem", "spell": "inferno" }, + { "item": "unicopia:gem", "spell": "darkness" }, + { "item": "unicopia:gem", "spell": "necromancy" } + ], + "result": { "item": "unicopia:alicorn_amulet" } +} diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/awkward.json b/src/main/resources/assets/unicopia/recipes/enchantments/awkward.json new file mode 100644 index 00000000..d6a30283 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/awkward.json @@ -0,0 +1,16 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "tag": "#unicopia:unaligned" }, + { "tag": "#unicopia:unaligned" }, + { "tag": "#unicopia:unaligned" } + ], + "result": { + "item": [ + { "item": "unicopia:gem" }, + { "item": "unicopia:corrupted_gem" } + ], + "spell": "awkward" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/charge.json b/src/main/resources/assets/unicopia/recipes/enchantments/charge.json new file mode 100644 index 00000000..3853719e --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/charge.json @@ -0,0 +1,10 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "tag": "unicopia:magic_energetic" }, + { "item": "unicopia:gem", "spell": "fire" }, + { "tag": "unicopia:magic_firey" } + ], + "result": { "item": "unicopia:gem", "spell": "charge" } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/drake.json b/src/main/resources/assets/unicopia/recipes/enchantments/drake.json similarity index 51% rename from src/main/resources/assets/unicopia/enchanting/recipes/drake.json rename to src/main/resources/assets/unicopia/recipes/enchantments/drake.json index 254ada88..e290824e 100644 --- a/src/main/resources/assets/unicopia/enchanting/recipes/drake.json +++ b/src/main/resources/assets/unicopia/recipes/enchantments/drake.json @@ -1,13 +1,11 @@ { - "type": "unicopia:crafting_spell", + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, "ingredients": [ { "item": "unicopia:gem", "spell": "charge" }, { "item": "unicopia:corrupted_gem" }, - { "id": "unicopia:life" }, + { "tag": "unicopia:life" }, { "item": "minecraft:red_flower", "data": 0 } ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "drake" - } + "result": { "item": "unicopia:gem", "spell": "drake" } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/fire.json b/src/main/resources/assets/unicopia/recipes/enchantments/fire.json new file mode 100644 index 00000000..26568223 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/fire.json @@ -0,0 +1,10 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "item": "unicopia:gem", "spell": "flame" }, + { "tag": "unicopia:fire" }, + { "tag": "unicopia:fire" } + ], + "result": { "item": "unicopia:gem", "spell": "fire" } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/flame.json b/src/main/resources/assets/unicopia/recipes/enchantments/flame.json new file mode 100644 index 00000000..d8672bec --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/flame.json @@ -0,0 +1,10 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "tag": "unicopia:fire" }, + { "tag": "unicopia:fire" }, + { "tag": "unicopia:fire" } + ], + "result": { "item": "unicopia:gem", "spell": "fire" } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/ice.json b/src/main/resources/assets/unicopia/recipes/enchantments/ice.json new file mode 100644 index 00000000..321a1cb2 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/ice.json @@ -0,0 +1,10 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "tag": "unicopia:ice" }, + { "tag": "unicopia:ice" }, + { "tag": "unicopia:ice" } + ], + "result": { "item": "unicopia:gem", "spell": "ice" } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/inferno.json b/src/main/resources/assets/unicopia/recipes/enchantments/inferno.json new file mode 100644 index 00000000..ebcb0bb7 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/inferno.json @@ -0,0 +1,10 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "item": "unicopia:gem", "spell": "fire" }, + { "tag": "unicopia:fire" }, + { "tag": "unicopia:fire" } + ], + "result": { "item": "unicopia:corrupted_gem", "spell": "inferno" } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/light.json b/src/main/resources/assets/unicopia/recipes/enchantments/light.json similarity index 61% rename from src/main/resources/assets/unicopia/enchanting/recipes/light.json rename to src/main/resources/assets/unicopia/recipes/enchantments/light.json index 7f49690e..5aaf9a5b 100644 --- a/src/main/resources/assets/unicopia/enchanting/recipes/light.json +++ b/src/main/resources/assets/unicopia/recipes/enchantments/light.json @@ -1,7 +1,8 @@ { - "type": "unicopia:crafting_spell", + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, "ingredients": [ - { "id": "unicopia:light" }, + { "tag": "unicopia:light" }, { "item": "unicopia:gem", "spell": "fire" }, [ { "item": "minecraft:apple" }, @@ -10,8 +11,5 @@ { "item": "unicopia:apple_sour" } ] ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "light" - } + "result": { "item": "unicopia:gem", "spell": "light" } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_crusade.json b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_crusade.json new file mode 100644 index 00000000..778c18fb --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_crusade.json @@ -0,0 +1,12 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "tag": "unicopia:sound"}, + "ingredients": [ + { "tag": "unicopia:apple_bloom" }, + { "tag": "unicopia:scootaloo" }, + { "tag": "unicopia:sweetie_belle" } + ], + "output": { + "item": "unicopia:music_disc_crusade" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_funk.json b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_funk.json new file mode 100644 index 00000000..98161bc3 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_funk.json @@ -0,0 +1,12 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "tag": "unicopia:sound"}, + "ingredients": [ + { "item": "minecraft:diamond" }, + { "item": "minecraft:diamond" }, + { "item": "unicopia:boop_o_roops" } + ], + "output": { + "item": "unicopia:music_disc_funk" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/record_pet.json b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_pet.json similarity index 55% rename from src/main/resources/assets/unicopia/enchanting/recipes/record_pet.json rename to src/main/resources/assets/unicopia/recipes/enchantments/music_disc_pet.json index 4ca4c212..fb38c925 100644 --- a/src/main/resources/assets/unicopia/enchanting/recipes/record_pet.json +++ b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_pet.json @@ -1,16 +1,12 @@ { - "type": "unicopia:crafting_special", + "type": "unicopia:enchanting_spell", + "input": { "tag": "unicopia:sound"}, "ingredients": [ { "item": "unicopia:gem", "spell": "awkward" }, { "item": "minecraft:feather" }, { "item": "minecraft:carrot" } ], - "input": { - "item": [ - { "id": "unicopia:sound" } - ] - }, "output": { - "item": { "item": "unicopia:record_pet" } + "item": "unicopia:music_disc_pet" } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/record_popular.json b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_popular.json similarity index 50% rename from src/main/resources/assets/unicopia/enchanting/recipes/record_popular.json rename to src/main/resources/assets/unicopia/recipes/enchantments/music_disc_popular.json index c9ae36b9..e2563b71 100644 --- a/src/main/resources/assets/unicopia/enchanting/recipes/record_popular.json +++ b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_popular.json @@ -1,16 +1,12 @@ { - "type": "unicopia:crafting_special", + "type": "unicopia:enchanting_spell", + "input": { "tag": "unicopia:sound"}, "ingredients": [ { "item": "minecraft:diamond" }, { "item": "minecraft:diamond" }, { "item": "minecraft:diamond" } ], - "input": { - "item": [ - { "id": "unicopia:sound"} - ] - }, "output": { - "item": { "item": "unicopia:record_popular" } + "item": "unicopia:music_disc_popular" } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/record_shuffle.json b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_shuffle.json similarity index 59% rename from src/main/resources/assets/unicopia/enchanting/recipes/record_shuffle.json rename to src/main/resources/assets/unicopia/recipes/enchantments/music_disc_shuffle.json index ca4bb929..c6c10ecd 100644 --- a/src/main/resources/assets/unicopia/enchanting/recipes/record_shuffle.json +++ b/src/main/resources/assets/unicopia/recipes/enchantments/music_disc_shuffle.json @@ -1,16 +1,12 @@ { - "type": "unicopia:crafting_special", + "type": "unicopia:enchanting_spell", + "input": { "tag": "unicopia:sound"}, "ingredients": [ { "item": "unicopia:gem", "spell": "awkward" }, { "item": "unicopia:gem", "spell": "awkward" }, { "item": "unicopia:gem", "spell": "awkward" } ], - "input": { - "item": [ - { "id": "unicopia:sound"} - ] - }, "output": { - "item": { "id": "unicopia:sound" } + "tag": "unicopia:sound" } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/necromancy.json b/src/main/resources/assets/unicopia/recipes/enchantments/necromancy.json new file mode 100644 index 00000000..1053d70b --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/necromancy.json @@ -0,0 +1,13 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "tag": "unicopia:blood" }, + { "tag": "unicopia:energy" }, + { "tag": "unicopia:rot" } + ], + "result": { + "item": "unicopia:corrupted_gem", + "spell": "necromancy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/pilon.json b/src/main/resources/assets/unicopia/recipes/enchantments/pilon.json new file mode 100644 index 00000000..77584190 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/pilon.json @@ -0,0 +1,10 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "tag": "unicopia:energy" }, + { "tag": "unicopia:life" }, + { "item": "unicopia:gem", "spell": "charge" } + ], + "result": { "item": "unicopia:gem", "spell": "siphon" } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/portal.json b/src/main/resources/assets/unicopia/recipes/enchantments/portal.json new file mode 100644 index 00000000..35931cc3 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/portal.json @@ -0,0 +1,11 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "tag": "unicopia:sight" }, + { "item": "minecraft:ghast_tear" }, + { "tag": "unicopia:energy" }, + { "item": "unicopia:gem", "spell": "fire" } + ], + "result": { "item": "unicopia:gem", "spell": "portal" } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/repulsion.json b/src/main/resources/assets/unicopia/recipes/enchantments/repulsion.json new file mode 100644 index 00000000..87410578 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/repulsion.json @@ -0,0 +1,14 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "tag": "unicopia:fire" }, + { "tag": "unicopia:shell" }, + { "item": "unicopia:gem", "spell": "shield" }, + { "tag": "unicopia:shell" } + ], + "result": { + "item": "unicopia:corrupted_gem", + "spell": "shield" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/reveal.json b/src/main/resources/assets/unicopia/recipes/enchantments/reveal.json similarity index 58% rename from src/main/resources/assets/unicopia/enchanting/recipes/reveal.json rename to src/main/resources/assets/unicopia/recipes/enchantments/reveal.json index 52bd3646..4adb9176 100644 --- a/src/main/resources/assets/unicopia/enchanting/recipes/reveal.json +++ b/src/main/resources/assets/unicopia/recipes/enchantments/reveal.json @@ -1,12 +1,10 @@ { - "type": "unicopia:crafting_spell", + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, "ingredients": [ { "item": "unicopia:gem", "spell": "light" }, { "item": "unicopia:gem", "spell": "charge" }, { "item": "unicopia:gem", "spell": "light" } ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "reveal" - } + "result": { "item": "unicopia:gem", "spell": "reveal" } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/shield.json b/src/main/resources/assets/unicopia/recipes/enchantments/shield.json similarity index 50% rename from src/main/resources/assets/unicopia/enchanting/recipes/shield.json rename to src/main/resources/assets/unicopia/recipes/enchantments/shield.json index 1fa35b37..2708cc4c 100644 --- a/src/main/resources/assets/unicopia/enchanting/recipes/shield.json +++ b/src/main/resources/assets/unicopia/recipes/enchantments/shield.json @@ -1,12 +1,10 @@ { - "type": "unicopia:crafting_spell", + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, "ingredients": [ { "id": "unicopia:shell" }, { "id": "unicopia:shell" }, { "id": "unicopia:shard" } ], - "result": { - "item": { "item": "unicopia:gem" }, - "spell": "shield" - } + "result": { "item": "unicopia:gem", "spell": "shield" } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/enchanting/recipes/siphon.json b/src/main/resources/assets/unicopia/recipes/enchantments/siphon.json similarity index 56% rename from src/main/resources/assets/unicopia/enchanting/recipes/siphon.json rename to src/main/resources/assets/unicopia/recipes/enchantments/siphon.json index 22949607..66f867a3 100644 --- a/src/main/resources/assets/unicopia/enchanting/recipes/siphon.json +++ b/src/main/resources/assets/unicopia/recipes/enchantments/siphon.json @@ -1,15 +1,11 @@ { - "type": "unicopia:crafting_spell", + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, "ingredients": [ { "id": "unicopia:energy" }, { "id": "unicopia:life" }, { "id": "unicopia:dark" }, { "item": "unicopia:gem", "spell": "siphon" } ], - "result": { - "item": [ - { "item": "unicopia:corrupted_gem" } - ], - "spell": "siphon" - } + "result": { "item": "unicopia:corrupted_gem", "spell": "siphon" } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/suffering.json b/src/main/resources/assets/unicopia/recipes/enchantments/suffering.json new file mode 100644 index 00000000..d1b5fcc0 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/suffering.json @@ -0,0 +1,10 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "item": "minecraft:fire_charge" }, + { "tag": "unicopia:blood" }, + { "item": "unicopia:gem", "spell": "fire" } + ], + "result": { "item": "unicopia:corrupted_gem", "spell": "vortex" } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/enchantments/vortex.json b/src/main/resources/assets/unicopia/recipes/enchantments/vortex.json new file mode 100644 index 00000000..e3e78426 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/enchantments/vortex.json @@ -0,0 +1,10 @@ +{ + "type": "unicopia:enchanting_spell", + "input": { "item": "unicopia:gem" }, + "ingredients": [ + { "tag": "unicopia:shell" }, + { "item": "unicopia:gem", "spell": "shield" }, + { "item": "unicopia:gem", "spell": "portal" } + ], + "result": { "item": "unicopia:gem", "spell": "vortex" } +} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/cider_two.json b/src/main/resources/assets/unicopia/recipes/flim_flam_cider.json similarity index 60% rename from src/main/resources/assets/unicopia/recipes/cider_two.json rename to src/main/resources/assets/unicopia/recipes/flim_flam_cider.json index 22e06dab..864113ca 100644 --- a/src/main/resources/assets/unicopia/recipes/cider_two.json +++ b/src/main/resources/assets/unicopia/recipes/flim_flam_cider.json @@ -11,14 +11,14 @@ { "item": "unicopia:mug" } ], "J": [ - { "item": "unicopia:juice", "data": 0 } + { "item": "unicopia:juice" } ], "B": [ - { "item": "unicopia:burned_juice", "data": 0 } + { "item": "unicopia:burned_juice" } ], "A": [ { "item": "minecraft:apple" } ] }, - "result": { "item": "unicopia:apple_cider", "data": 0, "count": 1 } + "result": { "item": "unicopia:apple_cider" } } diff --git a/src/main/resources/assets/unicopia/recipes/gem.json b/src/main/resources/assets/unicopia/recipes/gem.json index d7e11ed6..dfdde299 100644 --- a/src/main/resources/assets/unicopia/recipes/gem.json +++ b/src/main/resources/assets/unicopia/recipes/gem.json @@ -1,14 +1,20 @@ { "type": "minecraft:crafting_shaped", "pattern": [ - " # ", - "###", - " # " + "SCB", + "CSC", + "BCS" ], "key": { - "#": [ - { "item": "unicopia:corrupted_gem" } + "S": [ + { "item": "minecraft:andesite" } + ], + "C": [ + { "item": "#minecraft:stained_hardened_clay" } + ], + "B": [ + { "item": "minecraft:black_dye" } ] }, - "result": { "item": "unicopia:gem", "count": 1 } + "result": { "item": "unicopia:gem", "count": 4 } } diff --git a/src/main/resources/assets/unicopia/recipes/gem_2.json b/src/main/resources/assets/unicopia/recipes/gem_2.json deleted file mode 100644 index 8c20f4ca..00000000 --- a/src/main/resources/assets/unicopia/recipes/gem_2.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "SCB", - "CSC", - "BCS" - ], - "key": { - "S": [ - { "item": "minecraft:stone", "data": 3 } - ], - "C": [ - { "item": "minecraft:stained_hardened_clay", "data": 0 }, - { "item": "minecraft:stained_hardened_clay", "data": 1 }, - { "item": "minecraft:stained_hardened_clay", "data": 2 }, - { "item": "minecraft:stained_hardened_clay", "data": 3 }, - { "item": "minecraft:stained_hardened_clay", "data": 4 }, - { "item": "minecraft:stained_hardened_clay", "data": 5 }, - { "item": "minecraft:stained_hardened_clay", "data": 6 }, - { "item": "minecraft:stained_hardened_clay", "data": 7 }, - { "item": "minecraft:stained_hardened_clay", "data": 8 }, - { "item": "minecraft:stained_hardened_clay", "data": 9 }, - { "item": "minecraft:stained_hardened_clay", "data": 10 }, - { "item": "minecraft:stained_hardened_clay", "data": 11 }, - { "item": "minecraft:stained_hardened_clay", "data": 12 }, - { "item": "minecraft:stained_hardened_clay", "data": 13 }, - { "item": "minecraft:stained_hardened_clay", "data": 14 }, - { "item": "minecraft:stained_hardened_clay", "data": 15 } - ], - "B": [ - { "item": "minecraft:dye", "data": 15 } - ] - }, - "result": { "item": "unicopia:gem", "count": 4 } -} diff --git a/src/main/resources/assets/unicopia/recipes/gem_repair.json b/src/main/resources/assets/unicopia/recipes/gem_repair.json new file mode 100644 index 00000000..d7e11ed6 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/gem_repair.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " # ", + "###", + " # " + ], + "key": { + "#": [ + { "item": "unicopia:corrupted_gem" } + ] + }, + "result": { "item": "unicopia:gem", "count": 1 } +} diff --git a/src/main/resources/assets/unicopia/recipes/hay_burger_safe.json b/src/main/resources/assets/unicopia/recipes/hay_burger_safe.json index c054baa8..a9c34131 100644 --- a/src/main/resources/assets/unicopia/recipes/hay_burger_safe.json +++ b/src/main/resources/assets/unicopia/recipes/hay_burger_safe.json @@ -10,8 +10,8 @@ { "item": "unicopia:alfalfa_leaves" } ], "T": [ - { "item": "unicopia:tomato", "data": 0 }, - { "item": "unicopia:cloudsdale_tomato", "data": 0 } + { "item": "unicopia:tomato" }, + { "item": "unicopia:cloudsdale_tomato" } ], "F": [ { "item": "minecraft:red_flower", "data": 1 }, @@ -24,5 +24,5 @@ { "item": "minecraft:yellow_flower", "data": 0 } ] }, - "result": { "item": "unicopia:hay_burger", "data": 0, "count": 1 } + "result": { "item": "unicopia:hay_burger" } } diff --git a/src/main/resources/assets/unicopia/recipes/hay_fries.json b/src/main/resources/assets/unicopia/recipes/hay_fries.json index c4a33642..0e5195c3 100644 --- a/src/main/resources/assets/unicopia/recipes/hay_fries.json +++ b/src/main/resources/assets/unicopia/recipes/hay_fries.json @@ -10,5 +10,5 @@ { "item": "unicopia:alfalfa_leaves" } ] }, - "result": { "item": "unicopia:hay_fries", "data": 0, "count": 7 } + "result": { "item": "unicopia:hay_fries", "count": 7 } } diff --git a/src/main/resources/assets/unicopia/recipes/juice.json b/src/main/resources/assets/unicopia/recipes/juice.json index 7fd99af1..f9dd495e 100644 --- a/src/main/resources/assets/unicopia/recipes/juice.json +++ b/src/main/resources/assets/unicopia/recipes/juice.json @@ -14,5 +14,5 @@ { "item": "minecraft:apple" } ] }, - "result": { "item": "unicopia:juice", "data": 0, "count": 1 } + "result": { "item": "unicopia:juice" } } diff --git a/src/main/resources/assets/unicopia/recipes/library_door.json b/src/main/resources/assets/unicopia/recipes/library_door.json index a049147b..24799891 100644 --- a/src/main/resources/assets/unicopia/recipes/library_door.json +++ b/src/main/resources/assets/unicopia/recipes/library_door.json @@ -7,10 +7,10 @@ ], "key": { "#": [ - { "item": "minecraft:planks", "data": 5 } + { "item": "minecraft:dark_oak_planks" } ], "*": [ - { "item": "minecraft:planks", "data": 1 } + { "item": "minecraft:oak_planks" } ] }, "result": { "item": "unicopia:library_door", "count": 3 } diff --git a/src/main/resources/assets/unicopia/recipes/staff_meadow_brook.json b/src/main/resources/assets/unicopia/recipes/meadow_brook_staff.json similarity index 76% rename from src/main/resources/assets/unicopia/recipes/staff_meadow_brook.json rename to src/main/resources/assets/unicopia/recipes/meadow_brook_staff.json index 0109027f..75157f17 100644 --- a/src/main/resources/assets/unicopia/recipes/staff_meadow_brook.json +++ b/src/main/resources/assets/unicopia/recipes/meadow_brook_staff.json @@ -13,5 +13,5 @@ { "item": "unicopia:gem" } ] }, - "result": { "item": "unicopia:staff_meadow_brook", "count": 1 } + "result": { "item": "unicopia:meadow_brook_staff" } } diff --git a/src/main/resources/assets/unicopia/recipes/mist_door.json b/src/main/resources/assets/unicopia/recipes/mist_door.json deleted file mode 100644 index cadb5790..00000000 --- a/src/main/resources/assets/unicopia/recipes/mist_door.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "##", - "##", - "##" - ], - "key": { - "#": [ - { "item": "unicopia:cloud_block" } - ] - }, - "result": { "item": "unicopia:mist_door", "data": 0, "count": 1 } -} diff --git a/src/main/resources/assets/unicopia/recipes/misted_glass_door.json b/src/main/resources/assets/unicopia/recipes/misted_glass_door.json new file mode 100644 index 00000000..497a4073 --- /dev/null +++ b/src/main/resources/assets/unicopia/recipes/misted_glass_door.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "##", + "##", + "##" + ], + "key": { + "#": [ + { "item": "minecraft:stained_white_glass_block" } + ] + }, + "result": { "item": "unicopia:misted_glass_door", "data": 0, "count": 1 } +} diff --git a/src/main/resources/assets/unicopia/recipes/cactus_green.json b/src/main/resources/assets/unicopia/recipes/moss_to_green_dye.json similarity index 68% rename from src/main/resources/assets/unicopia/recipes/cactus_green.json rename to src/main/resources/assets/unicopia/recipes/moss_to_green_dye.json index e0cbb005..ecb8891c 100644 --- a/src/main/resources/assets/unicopia/recipes/cactus_green.json +++ b/src/main/resources/assets/unicopia/recipes/moss_to_green_dye.json @@ -8,5 +8,5 @@ { "item": "unicopia:moss" } ] }, - "result": { "item": "minecraft:dye", "data": 2, "count": 1 } + "result": { "item": "minecraft:green_dye" } } diff --git a/src/main/resources/assets/unicopia/recipes/mug.json b/src/main/resources/assets/unicopia/recipes/mug.json index eeeb4b50..55404f71 100644 --- a/src/main/resources/assets/unicopia/recipes/mug.json +++ b/src/main/resources/assets/unicopia/recipes/mug.json @@ -13,5 +13,5 @@ { "item": "minecraft:iron_nugget" } ] }, - "result": { "item": "unicopia:mug", "count": 1 } + "result": { "item": "unicopia:mug" } } diff --git a/src/main/resources/assets/unicopia/recipes/packed_cloud_slab.json b/src/main/resources/assets/unicopia/recipes/packed_cloud_slab.json deleted file mode 100644 index 224188c9..00000000 --- a/src/main/resources/assets/unicopia/recipes/packed_cloud_slab.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "###" - ], - "key": { - "#": [ - { "item": "unicopia:packed_cloud_block" } - ] - }, - "result": { "item": "unicopia:packed_cloud_slab", "count": 6 } -} diff --git a/src/main/resources/assets/unicopia/recipes/racing_cloud.json b/src/main/resources/assets/unicopia/recipes/racing_cloud_spawner.json similarity index 76% rename from src/main/resources/assets/unicopia/recipes/racing_cloud.json rename to src/main/resources/assets/unicopia/recipes/racing_cloud_spawner.json index 5c2308b5..41798db5 100644 --- a/src/main/resources/assets/unicopia/recipes/racing_cloud.json +++ b/src/main/resources/assets/unicopia/recipes/racing_cloud_spawner.json @@ -12,5 +12,5 @@ { "item": "unicopia:cloud_matter" } ] }, - "result": { "item": "unicopia:racing_cloud_spawner", "count": 1 } + "result": { "item": "unicopia:racing_cloud_spawner" } } diff --git a/src/main/resources/assets/unicopia/recipes/staff_remembrance.json b/src/main/resources/assets/unicopia/recipes/remembrance_staff.json similarity index 80% rename from src/main/resources/assets/unicopia/recipes/staff_remembrance.json rename to src/main/resources/assets/unicopia/recipes/remembrance_staff.json index 5f5ad4b1..1bd9db1e 100644 --- a/src/main/resources/assets/unicopia/recipes/staff_remembrance.json +++ b/src/main/resources/assets/unicopia/recipes/remembrance_staff.json @@ -18,5 +18,5 @@ } ] }, - "result": { "item": "unicopia:staff_remembrance", "count": 1 } + "result": { "item": "unicopia:remembrance_staff" } } diff --git a/src/main/resources/assets/unicopia/recipes/slime.json b/src/main/resources/assets/unicopia/recipes/slime_ball.json similarity index 100% rename from src/main/resources/assets/unicopia/recipes/slime.json rename to src/main/resources/assets/unicopia/recipes/slime_ball.json diff --git a/src/main/resources/assets/unicopia/recipes/spellbook.json b/src/main/resources/assets/unicopia/recipes/spellbook.json index 401513b1..c5e4f92f 100644 --- a/src/main/resources/assets/unicopia/recipes/spellbook.json +++ b/src/main/resources/assets/unicopia/recipes/spellbook.json @@ -1,8 +1,8 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "minecraft:book", "data": 0 }, + { "item": "minecraft:book" }, { "item": "unicopia:gem" } ], - "result": { "item": "unicopia:spellbook", "count": 1, "data": 0 } + "result": { "item": "unicopia:spellbook" } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/sugar_block.json b/src/main/resources/assets/unicopia/recipes/sugar_block.json index d26af56f..80a55cba 100644 --- a/src/main/resources/assets/unicopia/recipes/sugar_block.json +++ b/src/main/resources/assets/unicopia/recipes/sugar_block.json @@ -2,16 +2,13 @@ "type": "minecraft:crafting_shaped", "pattern": [ "###", - "#*#", + "###", "###" ], "key": { "#": [ - { "item": "unicopia:sugar_block" } - ], - "*": [ - { "item": "unicopia:cereal" } + { "item": "minecraft:sugar" } ] }, - "result": { "item": "unicopia:sugar_cereal", "data": 0, "count": 1 } + "result": { "item": "unicopia:sugar_block" } } diff --git a/src/main/resources/assets/unicopia/recipes/sugar.json b/src/main/resources/assets/unicopia/recipes/sugar_block_to_sugar.json similarity index 63% rename from src/main/resources/assets/unicopia/recipes/sugar.json rename to src/main/resources/assets/unicopia/recipes/sugar_block_to_sugar.json index 59779ffa..dd4653d9 100644 --- a/src/main/resources/assets/unicopia/recipes/sugar.json +++ b/src/main/resources/assets/unicopia/recipes/sugar_block_to_sugar.json @@ -3,5 +3,5 @@ "ingredients": [ { "item": "unicopia:sugar_block" } ], - "result": { "item": "minecraft:sugar", "count": 9, "data": 0 } + "result": { "item": "minecraft:sugar", "count": 9 } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/sugar_cereal.json b/src/main/resources/assets/unicopia/recipes/sugar_cereal.json deleted file mode 100644 index 7253d8dc..00000000 --- a/src/main/resources/assets/unicopia/recipes/sugar_cereal.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "###", - "###", - "###" - ], - "key": { - "#": [ - { "item": "minecraft:sugar" } - ] - }, - "result": { "item": "unicopia:sugar_block", "data": 0, "count": 1 } -} diff --git a/src/main/resources/assets/unicopia/recipes/tomato_seeds.json b/src/main/resources/assets/unicopia/recipes/tomato_seeds.json index 6712dc48..26b81c46 100644 --- a/src/main/resources/assets/unicopia/recipes/tomato_seeds.json +++ b/src/main/resources/assets/unicopia/recipes/tomato_seeds.json @@ -1,7 +1,7 @@ { "type": "minecraft:crafting_shapeless", "ingredients": [ - { "item": "unicopia:tomato", "data": 0 } + { "item": "#unicopia:fresh_tomatoes" } ], - "result": { "item": "unicopia:tomato_seeds", "count": 3, "data": 0 } + "result": { "item": "unicopia:tomato_seeds", "count": 3 } } \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/tomato_seeds_two.json b/src/main/resources/assets/unicopia/recipes/tomato_seeds_two.json deleted file mode 100644 index 884d90ee..00000000 --- a/src/main/resources/assets/unicopia/recipes/tomato_seeds_two.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "ingredients": [ - { "item": "unicopia:cloudsdale_tomato", "data": 0 } - ], - "result": { "item": "unicopia:tomato_seeds", "count": 3, "data": 0 } -} \ No newline at end of file diff --git a/src/main/resources/assets/unicopia/recipes/wild_cloud.json b/src/main/resources/assets/unicopia/recipes/wild_cloud_spawner.json similarity index 72% rename from src/main/resources/assets/unicopia/recipes/wild_cloud.json rename to src/main/resources/assets/unicopia/recipes/wild_cloud_spawner.json index 06b4ab95..fb0de6f0 100644 --- a/src/main/resources/assets/unicopia/recipes/wild_cloud.json +++ b/src/main/resources/assets/unicopia/recipes/wild_cloud_spawner.json @@ -10,5 +10,5 @@ { "item": "unicopia:cloud_block" } ] }, - "result": { "item": "unicopia:wild_cloud_spawner", "count": 1 } + "result": { "item": "unicopia:wild_cloud_spawner" } } diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/chiseled_chitin_shell_block.json b/src/main/resources/data/unicopia/loot_tables/blocks/chiseled_chitin_shell_block.json index e00c8b5a..290d721b 100644 --- a/src/main/resources/data/unicopia/loot_tables/blocks/chiseled_chitin_shell_block.json +++ b/src/main/resources/data/unicopia/loot_tables/blocks/chiseled_chitin_shell_block.json @@ -6,13 +6,7 @@ "entries": [ { "type": "minecraft:item", - "name": "unicopia:chitin_shell", - "functions": [ - { - "function": "minecraft:set_count", - "count": 9 - } - ] + "name": "unicopia:chiseled_chitin_shell_block" } ] } diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/chitin_shell_block.json b/src/main/resources/data/unicopia/loot_tables/blocks/chitin_shell_block.json index e00c8b5a..536544b6 100644 --- a/src/main/resources/data/unicopia/loot_tables/blocks/chitin_shell_block.json +++ b/src/main/resources/data/unicopia/loot_tables/blocks/chitin_shell_block.json @@ -5,12 +5,39 @@ "rolls": 1, "entries": [ { - "type": "minecraft:item", - "name": "unicopia:chitin_shell", - "functions": [ + "type": "minecraft:alternatives", + "children": [ { - "function": "minecraft:set_count", - "count": 9 + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "unicopia:chitin_shell_block" + }, + { + "type": "minecraft:item", + "name": "unicopia:chitin_shell", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 2, + "max": 5 + } + } + ] } ] } diff --git a/src/main/resources/data/unicopia/loot_tables/blocks/tomato_plant.json b/src/main/resources/data/unicopia/loot_tables/blocks/tomato_plant.json index 062168aa..3126e86f 100644 --- a/src/main/resources/data/unicopia/loot_tables/blocks/tomato_plant.json +++ b/src/main/resources/data/unicopia/loot_tables/blocks/tomato_plant.json @@ -54,6 +54,28 @@ } ] }, + { + "type": "minecraft:item", + "name": "unicopia:rotten_tomato", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "unicopia:tomato_plant", + "properties": { "age": "7" } + } + ], + "functions": [ + { "function": "minecraft:set_count", "count": 2 }, + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:uniform_bonus_count", + "parameters": { + "bonusMultiplier": 1 + } + } + ] + }, { "type": "minecraft:item", "name": "unicopia:cloudsdale_tomato", @@ -92,6 +114,34 @@ } ] }, + { + "type": "minecraft:item", + "name": "unicopia:rotten_cloudsdale_tomato", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "unicopia:tomato_plant", + "properties": { + "age": "7", + "type": "cloudsdale" + } + } + ], + "functions": [ + { + "function": "minecraft:set_count", + "count": 2 + }, + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:uniform_bonus_count", + "parameters": { + "bonusMultiplier": 1 + } + } + ] + }, { "type": "minecraft:item", "name": "unicopia:tomato_seeds" diff --git a/src/main/resources/data/unicopia/loot_tables/entities/cloud.json b/src/main/resources/data/unicopia/loot_tables/entities/cloud.json index 5378acf9..69112ed8 100644 --- a/src/main/resources/data/unicopia/loot_tables/entities/cloud.json +++ b/src/main/resources/data/unicopia/loot_tables/entities/cloud.json @@ -4,6 +4,27 @@ { "rolls": 1, "entries": [ + { + "type": "minecraft:item", + "name": "unicopia:dew_drop", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 0, + "max": 4, + "type": "minecraft:uniform" + } + }, + { + "function": "minecraft:looting_enchant", + "count": { + "min": 0, + "max": 9 + } + } + ] + }, { "type": "minecraft:item", "functions": [ diff --git a/src/main/resources/data/unicopia/loot_tables/entities/racing_cloud.json b/src/main/resources/data/unicopia/loot_tables/entities/racing_cloud.json index 782934c9..8db9b3da 100644 --- a/src/main/resources/data/unicopia/loot_tables/entities/racing_cloud.json +++ b/src/main/resources/data/unicopia/loot_tables/entities/racing_cloud.json @@ -6,20 +6,41 @@ "entries": [ { "type": "minecraft:item", + "name": "unicopia:dew_drop", "functions": [ { "function": "minecraft:set_count", "count": { - "min": 0.0, - "max": 2.0, + "min": 0, + "max": 4, "type": "minecraft:uniform" } }, { "function": "minecraft:looting_enchant", "count": { - "min": 0.0, - "max": 1.0 + "min": 0, + "max": 9 + } + } + ] + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 0, + "max": 2, + "type": "minecraft:uniform" + } + }, + { + "function": "minecraft:looting_enchant", + "count": { + "min": 0, + "max": 1 } } ], diff --git a/src/main/resources/data/unicopia/loot_tables/entities/wild_cloud.json b/src/main/resources/data/unicopia/loot_tables/entities/wild_cloud.json index 782934c9..8db9b3da 100644 --- a/src/main/resources/data/unicopia/loot_tables/entities/wild_cloud.json +++ b/src/main/resources/data/unicopia/loot_tables/entities/wild_cloud.json @@ -6,20 +6,41 @@ "entries": [ { "type": "minecraft:item", + "name": "unicopia:dew_drop", "functions": [ { "function": "minecraft:set_count", "count": { - "min": 0.0, - "max": 2.0, + "min": 0, + "max": 4, "type": "minecraft:uniform" } }, { "function": "minecraft:looting_enchant", "count": { - "min": 0.0, - "max": 1.0 + "min": 0, + "max": 9 + } + } + ] + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 0, + "max": 2, + "type": "minecraft:uniform" + } + }, + { + "function": "minecraft:looting_enchant", + "count": { + "min": 0, + "max": 1 } } ], diff --git a/src/main/resources/data/unicopia/tags/items/apple_bloom_spirit.json b/src/main/resources/data/unicopia/tags/items/apple_bloom_spirit.json new file mode 100644 index 00000000..1f0a3e6f --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/apple_bloom_spirit.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "#unicopia:regular_apples", + "unicopia:apple_cider", + "unicopia:apple_seeds", + "minecraft:red_dye" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/apples.json b/src/main/resources/data/unicopia/tags/items/apples.json index 73e7a6e5..5907d9c4 100644 --- a/src/main/resources/data/unicopia/tags/items/apples.json +++ b/src/main/resources/data/unicopia/tags/items/apples.json @@ -10,4 +10,4 @@ "unicopia:zap_apple", "unicopia:cooked_zap_apple" ] -} \ No newline at end of file +} diff --git a/src/main/resources/data/unicopia/tags/items/cursed_artefacts.json b/src/main/resources/data/unicopia/tags/items/cursed_artefacts.json index bf38e1ee..9abd5d58 100644 --- a/src/main/resources/data/unicopia/tags/items/cursed_artefacts.json +++ b/src/main/resources/data/unicopia/tags/items/cursed_artefacts.json @@ -3,4 +3,4 @@ "values": [ "unicopia:alicorn_amulet" ] -} \ No newline at end of file +} diff --git a/src/main/resources/data/unicopia/tags/items/dark_elementals.json b/src/main/resources/data/unicopia/tags/items/dark_elementals.json new file mode 100644 index 00000000..8c7df2ad --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/dark_elementals.json @@ -0,0 +1,12 @@ +{ + "replace": false, + "values": [ + "minecraft:netherbrick", + "minecraft:brick", + "minecraft:red_nether_brick", + "minecraft:coal_block", + "minecraft:coal", + "unicopia:chitin_shell", + "unicopia:slime_drop" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/death_elementals.json b/src/main/resources/data/unicopia/tags/items/death_elementals.json new file mode 100644 index 00000000..27134cf4 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/death_elementals.json @@ -0,0 +1,12 @@ +{ + "replace": false, + "values": [ + "minecraft:red_glazed_terracotta", + "minecraft:red_dye", + "minecraft:redstone_block", + "minecraft:redstone", + "minecraft:emerald", + "minecraft:ghast_tear", + "minecraft:red_nether_brick" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/fire_elementals.json b/src/main/resources/data/unicopia/tags/items/fire_elementals.json new file mode 100644 index 00000000..c408b7d6 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/fire_elementals.json @@ -0,0 +1,11 @@ +{ + "replace": false, + "values": [ + "minecraft:fire_charge", + "minecraft:magma_cream", + "minecraft:blaze_powder", + "minecraft:blaze_rod", + "minecraft:gold_nugget", + "minecraft:lava_bucket" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/unicopia/tags/items/fresh_apples.json b/src/main/resources/data/unicopia/tags/items/fresh_apples.json new file mode 100644 index 00000000..e693b8f9 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/fresh_apples.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "minecraft:apple", + "unicopia:green_apple", + "unicopia:sweet_apple", + "unicopia:sour_apple" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/fresh_tomatoes.json b/src/main/resources/data/unicopia/tags/items/fresh_tomatoes.json new file mode 100644 index 00000000..ead2b903 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/fresh_tomatoes.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "unicopia:tomato", + "unicopia:cloudsdale_tomato" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/hammerspace_immune.json b/src/main/resources/data/unicopia/tags/items/hammerspace_immune.json index 6b2cc1e9..1ee3a715 100644 --- a/src/main/resources/data/unicopia/tags/items/hammerspace_immune.json +++ b/src/main/resources/data/unicopia/tags/items/hammerspace_immune.json @@ -20,4 +20,4 @@ "minecraft:black_shulker_box", "unicopia:bag_of_holding" ] -} \ No newline at end of file +} diff --git a/src/main/resources/data/unicopia/tags/items/harmonic_elementals.json b/src/main/resources/data/unicopia/tags/items/harmonic_elementals.json new file mode 100644 index 00000000..b5d95dbc --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/harmonic_elementals.json @@ -0,0 +1,10 @@ +{ + "replace": false, + "values": [ + "#minecraft:red_flower", + "#minecraft:yellow_flower", + "minecraft:tallgrass", + "minecraft:sapling", + "minecraft:stick" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/ice_elementals.json b/src/main/resources/data/unicopia/tags/items/ice_elementals.json new file mode 100644 index 00000000..1fbb4821 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/ice_elementals.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "minecraft:ghast_tear", + "minecraft:water_bucket", + "minecraft:snowball" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/knowledge_elementals.json b/src/main/resources/data/unicopia/tags/items/knowledge_elementals.json new file mode 100644 index 00000000..9f53b35b --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/knowledge_elementals.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "unicopia:zap_apple", + "minecraft:redstone_torch", + "minecraft:redstone_block", + "minecraft:redstone" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/life_elementals.json b/src/main/resources/data/unicopia/tags/items/life_elementals.json new file mode 100644 index 00000000..eaf5a1ce --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/life_elementals.json @@ -0,0 +1,13 @@ +{ + "replace": false, + "values": [ + "minecraft:brown_mushroom", + "unicopia:rotten_apple", + "minecraft:golden_carrot", + "minecraft:wheat", + "minecraft:wheat_seeds", + "minecraft:grain", + "minecraft:alfalfa_leaves", + "unicopia:moss" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/light_elementals.json b/src/main/resources/data/unicopia/tags/items/light_elementals.json new file mode 100644 index 00000000..0d18d68f --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/light_elementals.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "minecraft:glowstone", + "minecraft:glowstone_dust" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/rotting_elementals.json b/src/main/resources/data/unicopia/tags/items/rotting_elementals.json new file mode 100644 index 00000000..e437c650 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/rotting_elementals.json @@ -0,0 +1,12 @@ +{ + "replace": false, + "values": [ + "minecraft:rotten_flesh", + "unicopia:rotten_cloudsdale_tomato", + "unicopia:rotten_tomato", + "unicopia:rotten_apple", + "minecraft:red_mushroom", + "minecraft:brown_mushroom", + "unicopia:moss" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/scootaloo_spirit.json b/src/main/resources/data/unicopia/tags/items/scootaloo_spirit.json new file mode 100644 index 00000000..700887ce --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/scootaloo_spirit.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "minecraft:chicken", + "minecraft:cooked_chicken", + "minecraft:feather", + "minecraft:string" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/shards.json b/src/main/resources/data/unicopia/tags/items/shards.json new file mode 100644 index 00000000..d60a517f --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/shards.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "minecraft:egg", + "minecraft:coal", + "minecraft:flint" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/shells.json b/src/main/resources/data/unicopia/tags/items/shells.json new file mode 100644 index 00000000..840a1477 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/shells.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "minecraft:egg", + "minecraft:firework_charge", + "minecraft:ender_eye", + "minecraft:fire_charge" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/sight_elementals.json b/src/main/resources/data/unicopia/tags/items/sight_elementals.json new file mode 100644 index 00000000..13674db5 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/sight_elementals.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "minecraft:ender_eye", + "minecraft:spider_eye", + "minecraft:speckled_mellon", + "minecraft:ender_pearl" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/sound_elementals.json b/src/main/resources/data/unicopia/tags/items/sound_elementals.json new file mode 100644 index 00000000..f349fcf6 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/sound_elementals.json @@ -0,0 +1,16 @@ +{ + "replace": false, + "values": [ + "minecraft:record_13", + "minecraft:record_cat", + "minecraft:record_blocks", + "minecraft:record_chirp", + "minecraft:record_far", + "minecraft:record_mall", + "minecraft:record_mellohi", + "minecraft:record_stal", + "minecraft:record_strad", + "minecraft:record_ward", + "minecraft:record_wait" + ] +} diff --git a/src/main/resources/data/unicopia/tags/items/sweetie_belle_spirit.json b/src/main/resources/data/unicopia/tags/items/sweetie_belle_spirit.json new file mode 100644 index 00000000..986be8c3 --- /dev/null +++ b/src/main/resources/data/unicopia/tags/items/sweetie_belle_spirit.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "minecraft:noteblock", + "minecraft:jukebox", + "minecraft:diamond" + ] +}