From 94721a0149d8b6b9cc77f4df2a94b1a808435aef Mon Sep 17 00:00:00 2001 From: Hubry Date: Sun, 26 Aug 2018 23:52:13 +0200 Subject: [PATCH] Add llamas and parrots to the cocoon's rare animal spawns Llamas were added in 1.11, while parrots were added in 1.12. Both of them are an exotic pet and so should be available from the cocoon. --- .../vazkii/botania/common/block/tile/TileCocoon.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/vazkii/botania/common/block/tile/TileCocoon.java b/src/main/java/vazkii/botania/common/block/tile/TileCocoon.java index d96a55065..d4f85499a 100644 --- a/src/main/java/vazkii/botania/common/block/tile/TileCocoon.java +++ b/src/main/java/vazkii/botania/common/block/tile/TileCocoon.java @@ -16,8 +16,10 @@ import net.minecraft.entity.monster.EntityShulker; import net.minecraft.entity.passive.EntityChicken; import net.minecraft.entity.passive.EntityCow; import net.minecraft.entity.passive.EntityHorse; +import net.minecraft.entity.passive.EntityLlama; import net.minecraft.entity.passive.EntityMooshroom; import net.minecraft.entity.passive.EntityOcelot; +import net.minecraft.entity.passive.EntityParrot; import net.minecraft.entity.passive.EntityPig; import net.minecraft.entity.passive.EntityRabbit; import net.minecraft.entity.passive.EntitySheep; @@ -66,7 +68,7 @@ public class TileCocoon extends TileMod implements ITickable{ } else { float specialChance = 0.05F; if(Math.random() < specialChance) { - int entityType = world.rand.nextInt(3); + int entityType = world.rand.nextInt(5); switch(entityType) { case 0: entity = new EntityHorse(world); @@ -77,6 +79,12 @@ public class TileCocoon extends TileMod implements ITickable{ case 2: entity = new EntityOcelot(world); break; + case 3: + entity = new EntityParrot(world); + break; + case 4: + entity = new EntityLlama(world); + break; } } else { int entityType = world.rand.nextInt(5);