mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Added some more structures
This commit is contained in:
parent
672f78d35e
commit
31dddf73a3
6 changed files with 17 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue