diff --git a/src/main/java/com/minelittlepony/unicopia/structure/CloudDungeon.java b/src/main/java/com/minelittlepony/unicopia/structure/CloudDungeon.java index 055ee101..ca9c7b45 100644 --- a/src/main/java/com/minelittlepony/unicopia/structure/CloudDungeon.java +++ b/src/main/java/com/minelittlepony/unicopia/structure/CloudDungeon.java @@ -13,8 +13,11 @@ import net.minecraft.world.gen.structure.template.TemplateManager; public class CloudDungeon extends TemplateBasedFeature { - private static final ResourceLocation TEMPLE = new ResourceLocation(Unicopia.MODID, "cloud/temple_small"); - private static final ResourceLocation HOUSE = new ResourceLocation(Unicopia.MODID, "cloud/house_small"); + private static final ResourceLocation[] VARIANTS = new ResourceLocation[] { + new ResourceLocation(Unicopia.MODID, "cloud/temple_small"), + new ResourceLocation(Unicopia.MODID, "cloud/house_small"), + new ResourceLocation(Unicopia.MODID, "cloud/island_small") + }; public CloudDungeon() { } @@ -26,11 +29,9 @@ public class CloudDungeon extends TemplateBasedFeature { @Override public boolean addComponentParts(World world, BlockPos startPos, TemplateManager templates, PlacementSettings placement) { - if (world.rand.nextBoolean()) { - applyTemplate(world, startPos, templates, placement, TEMPLE); - } else { - applyTemplate(world, startPos, templates, placement, HOUSE); - } + int index = world.rand.nextInt(VARIANTS.length); + + applyTemplate(world, startPos, templates, placement, VARIANTS[index]); return true; } diff --git a/src/main/java/com/minelittlepony/unicopia/structure/GroundDungeon.java b/src/main/java/com/minelittlepony/unicopia/structure/GroundDungeon.java index e056bde4..868fc8b0 100644 --- a/src/main/java/com/minelittlepony/unicopia/structure/GroundDungeon.java +++ b/src/main/java/com/minelittlepony/unicopia/structure/GroundDungeon.java @@ -12,8 +12,12 @@ import net.minecraft.world.gen.structure.template.TemplateManager; public class GroundDungeon extends TemplateBasedFeature { - private static final ResourceLocation TOWER = new ResourceLocation(Unicopia.MODID, "ground/tower"); - private static final ResourceLocation TEMPLE_1 = new ResourceLocation(Unicopia.MODID, "ground/temple_with_book"); + private static final ResourceLocation[] VARIANTS = new ResourceLocation[] { + new ResourceLocation(Unicopia.MODID, "ground/tower"), + new ResourceLocation(Unicopia.MODID, "ground/temple_with_book"), + new ResourceLocation(Unicopia.MODID, "ground/temple_without_book"), + new ResourceLocation(Unicopia.MODID, "ground/wizard_tower_red") + }; public GroundDungeon() { } @@ -25,11 +29,9 @@ public class GroundDungeon extends TemplateBasedFeature { @Override public boolean addComponentParts(World world, BlockPos startPos, TemplateManager templates, PlacementSettings placement) { - if (world.rand.nextBoolean()) { - applyTemplate(world, startPos, templates, placement, TOWER); - } else { - applyTemplate(world, startPos, templates, placement, TEMPLE_1); - } + int index = world.rand.nextInt(VARIANTS.length); + + applyTemplate(world, startPos, templates, placement, VARIANTS[index]); return true; } diff --git a/src/main/resources/assets/unicopia/structures/cloud/island_tiny.nbt b/src/main/resources/assets/unicopia/structures/cloud/island_tiny.nbt new file mode 100644 index 00000000..3633eb31 Binary files /dev/null and b/src/main/resources/assets/unicopia/structures/cloud/island_tiny.nbt differ diff --git a/src/main/resources/assets/unicopia/structures/ground/temple_with_book.nbt b/src/main/resources/assets/unicopia/structures/ground/temple_with_book.nbt index 5efbe6c8..cb771030 100644 Binary files a/src/main/resources/assets/unicopia/structures/ground/temple_with_book.nbt and b/src/main/resources/assets/unicopia/structures/ground/temple_with_book.nbt differ diff --git a/src/main/resources/assets/unicopia/structures/ground/temple_without_book.nbt b/src/main/resources/assets/unicopia/structures/ground/temple_without_book.nbt new file mode 100644 index 00000000..0ea35eaa Binary files /dev/null and b/src/main/resources/assets/unicopia/structures/ground/temple_without_book.nbt differ diff --git a/src/main/resources/assets/unicopia/structures/ground/wizard_tower_red.nbt b/src/main/resources/assets/unicopia/structures/ground/wizard_tower_red.nbt new file mode 100644 index 00000000..90848940 Binary files /dev/null and b/src/main/resources/assets/unicopia/structures/ground/wizard_tower_red.nbt differ