From b336b74efa515a03e79139a59d1392c21067fbd0 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 1 Jan 2019 15:20:12 +0100 Subject: [PATCH] finished the spawni boi --- .../api/recipes/AnimalSpawnerRecipe.java | 15 +- .../blocks/tiles/TileEntityAnimalSpawner.java | 14 +- .../crafttweaker/AnimalSpawnerTweaker.java | 4 +- .../jei/animal/AnimalSpawnerCategory.java | 8 +- .../jei/animal/AnimalSpawnerWrapper.java | 6 + .../patchouli/ProcessorAnimalSpawner.java | 55 ++++++ .../naturesaura/recipes/ModRecipes.java | 92 +++++----- .../en_us/entries/using/animal_spawner.json | 173 ++++++++++++++++++ .../book/en_us/templates/animal_spawner.json | 66 +++++++ .../naturesaura/recipes/animal_spawner.json | 29 +++ .../textures/gui/patchouli/elements.png | Bin 3894 -> 4623 bytes 11 files changed, 402 insertions(+), 60 deletions(-) create mode 100644 src/main/java/de/ellpeck/naturesaura/compat/patchouli/ProcessorAnimalSpawner.java create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/animal_spawner.json create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/book/en_us/templates/animal_spawner.json create mode 100644 src/main/resources/assets/naturesaura/recipes/animal_spawner.json diff --git a/src/main/java/de/ellpeck/naturesaura/api/recipes/AnimalSpawnerRecipe.java b/src/main/java/de/ellpeck/naturesaura/api/recipes/AnimalSpawnerRecipe.java index 4c26c188..904e9339 100644 --- a/src/main/java/de/ellpeck/naturesaura/api/recipes/AnimalSpawnerRecipe.java +++ b/src/main/java/de/ellpeck/naturesaura/api/recipes/AnimalSpawnerRecipe.java @@ -5,18 +5,18 @@ import net.minecraft.entity.Entity; import net.minecraft.item.crafting.Ingredient; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; - -import java.util.function.Function; +import net.minecraftforge.fml.common.registry.EntityEntry; +import net.minecraftforge.fml.common.registry.ForgeRegistries; public class AnimalSpawnerRecipe { public final ResourceLocation name; public final Ingredient[] ingredients; - public final Function entity; + public final ResourceLocation entity; public final int aura; public final int time; - public AnimalSpawnerRecipe(ResourceLocation name, Function entity, int aura, int time, Ingredient... ingredients) { + public AnimalSpawnerRecipe(ResourceLocation name, ResourceLocation entity, int aura, int time, Ingredient... ingredients) { this.name = name; this.ingredients = ingredients; this.entity = entity; @@ -24,6 +24,13 @@ public class AnimalSpawnerRecipe { this.time = time; } + public Entity makeEntity(World world) { + EntityEntry entry = ForgeRegistries.ENTITIES.getValue(this.entity); + if (entry == null) + return null; + return entry.newInstance(world); + } + public AnimalSpawnerRecipe register() { NaturesAuraAPI.ANIMAL_SPAWNER_RECIPES.put(this.name, this); return this; diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityAnimalSpawner.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityAnimalSpawner.java index 2a2c6f5a..ab03fcd8 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityAnimalSpawner.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityAnimalSpawner.java @@ -9,6 +9,7 @@ import de.ellpeck.naturesaura.blocks.multi.Multiblocks; import de.ellpeck.naturesaura.packet.PacketHandler; import de.ellpeck.naturesaura.packet.PacketParticles; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.Ingredient; @@ -52,8 +53,15 @@ public class TileEntityAnimalSpawner extends TileEntityImpl implements ITickable this.time += 10; if (this.time >= this.currentRecipe.time) { - Entity entity = this.currentRecipe.entity.apply(this.world); - entity.setPosition(this.spawnX, this.pos.getY() + 1, this.spawnZ); + Entity entity = this.currentRecipe.makeEntity(this.world); + entity.setLocationAndAngles(this.spawnX, this.pos.getY() + 1, this.spawnZ, + MathHelper.wrapDegrees(this.world.rand.nextFloat() * 360F), 0F); + if (entity instanceof EntityLiving) { + EntityLiving living = (EntityLiving) entity; + living.rotationYawHead = entity.rotationYaw; + living.renderYawOffset = entity.rotationYaw; + living.onInitialSpawn(this.world.getDifficultyForLocation(living.getPosition()), null); + } this.world.spawnEntity(entity); this.currentRecipe = null; @@ -117,7 +125,7 @@ public class TileEntityAnimalSpawner extends TileEntityImpl implements ITickable this.world.rand.nextFloat() + 0.5F); if (this.entityClient == null) { - this.entityClient = this.currentRecipe.entity.apply(this.world); + this.entityClient = this.currentRecipe.makeEntity(this.world); this.entityClient.setPosition(this.spawnX, this.pos.getY() + 1, this.spawnZ); } AxisAlignedBB bounds = this.entityClient.getEntityBoundingBox(); diff --git a/src/main/java/de/ellpeck/naturesaura/compat/crafttweaker/AnimalSpawnerTweaker.java b/src/main/java/de/ellpeck/naturesaura/compat/crafttweaker/AnimalSpawnerTweaker.java index e6c976f2..fdf3830b 100644 --- a/src/main/java/de/ellpeck/naturesaura/compat/crafttweaker/AnimalSpawnerTweaker.java +++ b/src/main/java/de/ellpeck/naturesaura/compat/crafttweaker/AnimalSpawnerTweaker.java @@ -10,7 +10,6 @@ import de.ellpeck.naturesaura.api.NaturesAuraAPI; import de.ellpeck.naturesaura.api.recipes.AnimalSpawnerRecipe; import net.minecraft.item.crafting.Ingredient; import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.common.registry.ForgeRegistries; import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; @@ -26,8 +25,7 @@ public final class AnimalSpawnerTweaker { public static void addRecipe(String name, String entity, int aura, int time, IItemStack[] ingredients) { CraftTweakerCompat.SCHEDULED_ACTIONS.add(() -> { ResourceLocation res = new ResourceLocation(name); - return new Add(Collections.singletonMap(res, new AnimalSpawnerRecipe(res, - world -> ForgeRegistries.ENTITIES.getValue(new ResourceLocation(entity)).newInstance(world), aura, time, + return new Add(Collections.singletonMap(res, new AnimalSpawnerRecipe(res, new ResourceLocation(entity), aura, time, Arrays.stream(ingredients).map(ing -> Ingredient.fromStacks(InputHelper.toStack(ing))).toArray(Ingredient[]::new) ))); }); diff --git a/src/main/java/de/ellpeck/naturesaura/compat/jei/animal/AnimalSpawnerCategory.java b/src/main/java/de/ellpeck/naturesaura/compat/jei/animal/AnimalSpawnerCategory.java index ffb5d2a7..5abb4190 100644 --- a/src/main/java/de/ellpeck/naturesaura/compat/jei/animal/AnimalSpawnerCategory.java +++ b/src/main/java/de/ellpeck/naturesaura/compat/jei/animal/AnimalSpawnerCategory.java @@ -16,7 +16,6 @@ import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.resources.I18n; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; import java.util.Arrays; @@ -64,17 +63,16 @@ public class AnimalSpawnerCategory implements IRecipeCategory provider) { + ResourceLocation res = new ResourceLocation(provider.get("recipe")); + this.recipe = NaturesAuraAPI.ANIMAL_SPAWNER_RECIPES.get(res); + } + + @Override + public String process(String key) { + if (key.startsWith("input")) { + int id = Integer.parseInt(key.substring(5)) - 1; + if (this.recipe.ingredients.length > id) + return PatchouliAPI.instance.serializeIngredient(this.recipe.ingredients[id]); + else + return null; + } else { + switch (key) { + case "name": + EntityEntry entry = ForgeRegistries.ENTITIES.getValue(this.recipe.entity); + return I18n.format("entity." + entry.getName() + ".name"); + case "entity": + return this.recipe.entity.toString(); + case "egg": + ItemStack egg = new ItemStack(Items.SPAWN_EGG); + ItemMonsterPlacer.applyEntityIdToItemStack(egg, this.recipe.entity); + return PatchouliAPI.instance.serializeItemStack(egg); + default: + return null; + } + } + } + + @Override + public boolean allowRender(String group) { + return !"seekrit".equals(group); + } +} diff --git a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java index 6792c48c..74c7c94c 100644 --- a/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java +++ b/src/main/java/de/ellpeck/naturesaura/recipes/ModRecipes.java @@ -20,8 +20,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockStoneBrick; import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.*; -import net.minecraft.entity.passive.*; +import net.minecraft.entity.passive.EntitySheep; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.EnumDyeColor; @@ -32,8 +31,6 @@ import net.minecraft.world.World; import net.minecraftforge.fml.common.registry.ForgeRegistries; import net.minecraftforge.oredict.OreDictionary; -import java.util.function.Function; - public final class ModRecipes { public static void init() { @@ -151,52 +148,57 @@ public final class ModRecipes { if (block instanceof BlockFlower) NaturesAuraAPI.FLOWERS.addAll(block.getBlockState().getValidStates()); - spawner("cow", EntityCow::new, 500, 60, Ingredient.fromItem(Items.BEEF), Ingredient.fromItem(Items.LEATHER)); + spawner("cow", "minecraft:cow", 500, 60, Ingredient.fromItem(Items.BEEF), Ingredient.fromItem(Items.LEATHER)); for (EnumDyeColor color : EnumDyeColor.values()) - spawner("sheep_" + color.getName(), world -> { - EntitySheep sheep = new EntitySheep(world); - sheep.setFleeceColor(color); - return sheep; - }, 500, 60, Ingredient.fromItem(Items.MUTTON), Ingredient.fromStacks(new ItemStack(Blocks.WOOL, 1, color.getMetadata()))); - spawner("chicken", EntityChicken::new, 300, 40, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.EGG)); - spawner("pig", EntityPig::new, 500, 60, Ingredient.fromItem(Items.PORKCHOP)); - spawner("blaze", EntityBlaze::new, 1500, 120, Ingredient.fromItem(Items.BLAZE_ROD), Ingredient.fromItem(Items.BLAZE_POWDER)); - spawner("ghast", EntityGhast::new, 1200, 150, Ingredient.fromItem(Items.GUNPOWDER), Ingredient.fromItem(Items.GHAST_TEAR)); - spawner("ocelot", EntityOcelot::new, 800, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.WOOL)); - spawner("mule", EntityMule::new, 1000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST), Ingredient.fromItem(Items.APPLE)); - spawner("bat", EntityBat::new, 300, 40, Ingredient.fromItem(Items.FEATHER)); - spawner("endermite", EntityEndermite::new, 300, 40, Ingredient.fromItem(Items.ENDER_PEARL), Helper.blockIng(Blocks.STONE)); - spawner("parrot", EntityParrot::new, 500, 60, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.COOKIE)); - spawner("slime", EntitySlime::new, 300, 40, Ingredient.fromItem(Items.SLIME_BALL)); - spawner("spider", EntitySpider::new, 1000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.SPIDER_EYE)); - spawner("skeleton", EntitySkeleton::new, 1000, 120, Ingredient.fromItem(Items.BONE), Ingredient.fromItem(Items.ARROW)); - spawner("enderman", EntityEnderman::new, 1200, 120, Ingredient.fromItem(Items.ENDER_PEARL)); - spawner("silverfish", EntitySilverfish::new, 300, 40, Helper.blockIng(Blocks.STONE)); - spawner("squid", EntitySquid::new, 500, 40, Ingredient.fromStacks(new ItemStack(Items.DYE, 1, EnumDyeColor.BLACK.getDyeDamage()))); - spawner("stray", EntityStray::new, 1000, 120, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.ICE)); - spawner("shulker", EntityShulker::new, 1500, 100, Ingredient.fromItem(Items.SHULKER_SHELL)); - spawner("husk", EntityHusk::new, 1000, 120, Ingredient.fromItem(Items.ROTTEN_FLESH), Helper.blockIng(Blocks.SAND)); - spawner("llama", EntityLlama::new, 600, 80, Ingredient.fromStacks(new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE))); - spawner("rabbit", EntityRabbit::new, 300, 40, Ingredient.fromItem(Items.RABBIT_HIDE)); - spawner("magma_cube", EntityMagmaCube::new, 1000, 100, Ingredient.fromItem(Items.MAGMA_CREAM)); - spawner("zombie_pigman", EntityPigZombie::new, 1200, 150, Ingredient.fromItem(Items.ROTTEN_FLESH), Ingredient.fromItem(Items.GOLD_NUGGET)); - spawner("polar_bear", EntityPolarBear::new, 500, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.ICE)); - spawner("mooshroom", EntityMooshroom::new, 400, 60, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.RED_MUSHROOM)); - spawner("guardian", EntityGuardian::new, 1500, 150, Ingredient.fromItem(Items.PRISMARINE_SHARD), Ingredient.fromItem(Items.PRISMARINE_CRYSTALS)); - spawner("horse", EntityHorse::new, 1000, 100, Ingredient.fromItem(Items.LEATHER)); - spawner("donkey", EntityDonkey::new, 1000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST)); - spawner("cave_spider", EntityCaveSpider::new, 1000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.FERMENTED_SPIDER_EYE)); - spawner("creeper", EntityCreeper::new, 1000, 120, Ingredient.fromItem(Items.GUNPOWDER)); - spawner("witch", EntityWitch::new, 1500, 150, Ingredient.fromItem(Items.GLASS_BOTTLE), Ingredient.fromItem(Items.GLOWSTONE_DUST)); - spawner("wither_skeleton", EntityWitherSkeleton::new, 1500, 150, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.OBSIDIAN)); - spawner("wolf", EntityWolf::new, 500, 60, Ingredient.fromItem(Items.LEATHER), Ingredient.fromItem(Items.BONE)); - spawner("zombie", EntityZombie::new, 1000, 100, Ingredient.fromItem(Items.ROTTEN_FLESH)); + new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, "sheep_" + color.getName()), new ResourceLocation("minecraft:sheep"), + 500, 60, Ingredient.fromItem(ModItems.BIRTH_SPIRIT), Ingredient.fromItem(Items.MUTTON), + Ingredient.fromStacks(new ItemStack(Blocks.WOOL, 1, color.getMetadata()))) { + @Override + public Entity makeEntity(World world) { + EntitySheep sheep = (EntitySheep) super.makeEntity(world); + sheep.setFleeceColor(color); + return sheep; + } + }.register(); + spawner("chicken", "minecraft:chicken", 300, 40, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.EGG)); + spawner("pig", "minecraft:pig", 500, 60, Ingredient.fromItem(Items.PORKCHOP)); + spawner("blaze", "minecraft:blaze", 1500, 120, Ingredient.fromItem(Items.BLAZE_ROD), Ingredient.fromItem(Items.BLAZE_POWDER)); + spawner("ghast", "minecraft:ghast", 1200, 150, Ingredient.fromItem(Items.GUNPOWDER), Ingredient.fromItem(Items.GHAST_TEAR)); + spawner("ocelot", "minecraft:ocelot", 800, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.WOOL)); + spawner("mule", "minecraft:mule", 1000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST), Ingredient.fromItem(Items.APPLE)); + spawner("bat", "minecraft:bat", 300, 40, Ingredient.fromItem(Items.FEATHER)); + spawner("endermite", "minecraft:endermite", 300, 40, Ingredient.fromItem(Items.ENDER_PEARL), Helper.blockIng(Blocks.STONE)); + spawner("parrot", "minecraft:parrot", 500, 60, Ingredient.fromItem(Items.FEATHER), Ingredient.fromItem(Items.COOKIE)); + spawner("slime", "minecraft:slime", 300, 40, Ingredient.fromItem(Items.SLIME_BALL)); + spawner("spider", "minecraft:spider", 1000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.SPIDER_EYE)); + spawner("skeleton", "minecraft:skeleton", 1000, 120, Ingredient.fromItem(Items.BONE), Ingredient.fromItem(Items.ARROW)); + spawner("enderman", "minecraft:enderman", 1200, 120, Ingredient.fromItem(Items.ENDER_PEARL)); + spawner("silverfish", "minecraft:silverfish", 300, 40, Helper.blockIng(Blocks.STONE)); + spawner("squid", "minecraft:squid", 500, 40, Ingredient.fromStacks(new ItemStack(Items.DYE, 1, EnumDyeColor.BLACK.getDyeDamage()))); + spawner("stray", "minecraft:stray", 1000, 120, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.ICE)); + spawner("shulker", "minecraft:shulker", 1500, 100, Ingredient.fromItem(Items.SHULKER_SHELL)); + spawner("husk", "minecraft:husk", 1000, 120, Ingredient.fromItem(Items.ROTTEN_FLESH), Helper.blockIng(Blocks.SAND)); + spawner("llama", "minecraft:llama", 600, 80, Ingredient.fromStacks(new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE))); + spawner("rabbit", "minecraft:rabbit", 300, 40, Ingredient.fromItem(Items.RABBIT_HIDE)); + spawner("magma_cube", "minecraft:magma_cube", 1000, 100, Ingredient.fromItem(Items.MAGMA_CREAM)); + spawner("zombie_pigman", "minecraft:zombie_pigman", 1200, 150, Ingredient.fromItem(Items.ROTTEN_FLESH), Ingredient.fromItem(Items.GOLD_NUGGET)); + spawner("polar_bear", "minecraft:polar_bear", 500, 60, Ingredient.fromItem(Items.FISH), Helper.blockIng(Blocks.ICE)); + spawner("mooshroom", "minecraft:mooshroom", 400, 60, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.RED_MUSHROOM)); + spawner("guardian", "minecraft:guardian", 1500, 150, Ingredient.fromItem(Items.PRISMARINE_SHARD), Ingredient.fromItem(Items.PRISMARINE_CRYSTALS)); + spawner("horse", "minecraft:horse", 1000, 100, Ingredient.fromItem(Items.LEATHER)); + spawner("donkey", "minecraft:donkey", 1000, 100, Ingredient.fromItem(Items.LEATHER), Helper.blockIng(Blocks.CHEST)); + spawner("cave_spider", "minecraft:cave_spider", 1000, 120, Ingredient.fromItem(Items.STRING), Ingredient.fromItem(Items.FERMENTED_SPIDER_EYE)); + spawner("creeper", "minecraft:creeper", 1000, 120, Ingredient.fromItem(Items.GUNPOWDER)); + spawner("witch", "minecraft:witch", 1500, 150, Ingredient.fromItem(Items.GLASS_BOTTLE), Ingredient.fromItem(Items.GLOWSTONE_DUST)); + spawner("wither_skeleton", "minecraft:wither_skeleton", 1500, 150, Ingredient.fromItem(Items.BONE), Helper.blockIng(Blocks.OBSIDIAN)); + spawner("wolf", "minecraft:wolf", 500, 60, Ingredient.fromItem(Items.LEATHER), Ingredient.fromItem(Items.BONE)); + spawner("zombie", "minecraft:zombie", 1000, 100, Ingredient.fromItem(Items.ROTTEN_FLESH)); } - private static void spawner(String name, Function entity, int aura, int time, Ingredient... ings) { + private static void spawner(String name, String entity, int aura, int time, Ingredient... ings) { Ingredient[] actualIngs = new Ingredient[ings.length + 1]; actualIngs[0] = Ingredient.fromItem(ModItems.BIRTH_SPIRIT); System.arraycopy(ings, 0, actualIngs, 1, ings.length); - new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, name), entity, aura, time, actualIngs).register(); + new AnimalSpawnerRecipe(new ResourceLocation(NaturesAura.MOD_ID, name), new ResourceLocation(entity), aura, time, actualIngs).register(); } } diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/animal_spawner.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/animal_spawner.json new file mode 100644 index 00000000..ea119167 --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/animal_spawner.json @@ -0,0 +1,173 @@ +{ + "name": "Altar of Birthing", + "icon": "naturesaura:animal_spawner", + "category": "using", + "advancement": "naturesaura:sky_ingot", + "pages": [ + { + "type": "text", + "text": "Sometimes, the $(thing)creation$() of certain living creatures would be of use for any slightly gruesome botanist. For this, the $(item)Altar of Birthing$() can be used: It can create and spawn almost any $(thing)living creature$() at the cost of some ingredients that are related to that very creature and a bit of $(aura) from the environment." + }, + { + "type": "text", + "text": "For it to work, it requires the right structure to be assembled as well as the usage of a $(item)Spirit of Birthing$() as follows: All ingredients, including the $(item)Spirit of Birthing$(), are required to be thrown down on the ground close to the $(item)Altar of Birthing$() and the process will begin automatically.$(p)The following pages outline the construction, the way to obtain the $(item)Spirit of Birthing$() and all of the possible creatures to be spawned." + }, + { + "type": "spotlight", + "item": "naturesaura:birth_spirit", + "link_recipe": true, + "text": "The required $(item)Spirit of Birthing$() can be obtained easily by a person $(thing)breeding$() two passive animals together while there is a (slight) excess of $(aura) present in the surrounding area. For each new baby born, there is a chance of a few $(item)Spirits of Birthing$() to be created in the process." + }, + { + "type": "crafting", + "recipe": "naturesaura:animal_spawner", + "text": "Creating the $(item)Altar of Birthing$()" + }, + { + "type": "multiblock", + "multiblock_id": "naturesaura:animal_spawner", + "text": "This formation needs to be created around the $(item)Altar of Birthing$() for it to work as expected." + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:cow" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:sheep_white", + "text": "The color of the $(item)Wool$() used determines the color of the $(thing)Sheep$() created." + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:chicken" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:pig" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:blaze" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:ghast" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:ocelot" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:mule" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:bat" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:endermite" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:parrot" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:slime" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:spider" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:skeleton" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:enderman" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:silverfish" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:squid" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:stray" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:shulker" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:husk" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:llama" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:rabbit" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:magma_cube" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:zombie_pigman" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:polar_bear" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:mooshroom" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:guardian" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:horse" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:donkey" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:cave_spider" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:creeper" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:witch" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:wither_skeleton" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:wolf" + }, + { + "type": "naturesaura:animal_spawner", + "recipe": "naturesaura:zombie" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/templates/animal_spawner.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/templates/animal_spawner.json new file mode 100644 index 00000000..a6f6a558 --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/templates/animal_spawner.json @@ -0,0 +1,66 @@ +{ + "processor": "de.ellpeck.naturesaura.compat.patchouli.ProcessorAnimalSpawner", + "components": [ + { + "type": "item", + "item": "#input1", + "x": 12, + "y": 100 + }, + { + "type": "item", + "item": "#input2", + "x": 36, + "y": 100 + }, + { + "type": "item", + "item": "#input3", + "x": 60, + "y": 100 + }, + { + "type": "item", + "item": "#input4", + "x": 84, + "y": 100 + }, + { + "type": "entity", + "entity": "#entity", + "x": 56, + "y": 60, + "render_size": 60 + }, + { + "type": "image", + "image": "naturesaura:textures/gui/patchouli/elements.png", + "x": 8, + "y": 10, + "u": 0, + "v": 131, + "width": 96, + "height": 110 + }, + { + "type": "header", + "text": "#name", + "x": -1, + "y": 0 + }, + { + "type": "text", + "text": "#text", + "x": 0, + "y": 122 + }, + { + "type": "item", + "item": "#egg", + "x": 0, + "y": 0, + "link_recipe": true, + "group": "seekrit" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/recipes/animal_spawner.json b/src/main/resources/assets/naturesaura/recipes/animal_spawner.json new file mode 100644 index 00000000..d22bc923 --- /dev/null +++ b/src/main/resources/assets/naturesaura/recipes/animal_spawner.json @@ -0,0 +1,29 @@ +{ + "type": "forge:ore_shaped", + "pattern": [ + "SHS", + "IWI", + "SHS" + ], + "key": { + "H": { + "item": "minecraft:hay_block" + }, + "I": { + "item": "minecraft:iron_bars" + }, + "S": { + "item": "naturesaura:sky_ingot" + }, + "W": { + "type": "minecraft:item_nbt", + "item": "naturesaura:aura_bottle", + "nbt": { + "stored_type": "naturesaura:end" + } + } + }, + "result": { + "item": "naturesaura:animal_spawner" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/textures/gui/patchouli/elements.png b/src/main/resources/assets/naturesaura/textures/gui/patchouli/elements.png index d3773dbabd579acc3f902ddb5c7473c5257ea100..608830e5eda87b72b520c519c9da9ac030de1eb4 100644 GIT binary patch literal 4623 zcmd5=c{r49-@eCW!q|G$m?9&Js4=4?`%;!9OOhl^Dp|`~#y&#Q$Y@oBYzbK^YnB<) zlR=B7EFlboL6$6IH}l@;d5`Bkj_>{cc>nm`?~gg|`*&Tx<^0{(eVylZPpqZ6v5>$H z0RRAmOpX~?0RRNNg#dgo@M7=#;xc&IaTRw*w5Du-=)kU~L{8k!yZv!2E+jvPJS0EaOC}!_(On!4RlSBPyE)6Ki%f%e zxjs99YmxJe!Qyw)dB)AUV+zuvmm1|oI1V98Bayue{oUe&zd}0WJEO)$VMVfb&uU(o z+N8h0c^DC`iR?a_2xs9}AB{_oQV@p$GJ=lAmDr!5F;;n=F2W9q8Ude<8KD+_`# zD$5q|R3)ch8coq>Cp8~fIcxe2ThS{$jJ{G^Gg=FHg%f-iT5(+`lZ$s!8P^`b-}D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