Search in sources :

Example 1 with ILandDecorator

use of com.mraof.minestuck.world.lands.decorator.ILandDecorator in project Minestuck by mraof.

the class LandAspectRock method getDecorators.

@Override
public List<ILandDecorator> getDecorators() {
    List<ILandDecorator> list = new ArrayList<ILandDecorator>();
    list.add(new UndergroundDecoratorVein(Blocks.COAL_ORE.getDefaultState(), 20, 17, 128));
    list.add(new UndergroundDecoratorVein(Blocks.IRON_ORE.getDefaultState(), 20, 9, 64));
    list.add(new UndergroundDecoratorVein(Blocks.REDSTONE_ORE.getDefaultState(), 10, 8, 32));
    list.add(new UndergroundDecoratorVein(Blocks.LAPIS_ORE.getDefaultState(), 4, 7, 24));
    list.add(new UndergroundDecoratorVein(Blocks.GOLD_ORE.getDefaultState(), 4, 9, 32));
    list.add(new UndergroundDecoratorVein(Blocks.DIAMOND_ORE.getDefaultState(), 2, 6, 24));
    list.add(new UndergroundDecoratorVein(Blocks.GRAVEL.getDefaultState(), 10, 33, 256));
    list.add(new UndergroundDecoratorVein(Blocks.MONSTER_EGG.getDefaultState().withProperty(BlockSilverfish.VARIANT, BlockSilverfish.EnumType.STONE), 7, 9, 64));
    list.add(new SurfaceDecoratorVein(Blocks.CLAY.getDefaultState(), 25, 20, BiomeMinestuck.mediumOcean));
    list.add(new BlockBlobDecorator(Blocks.COBBLESTONE.getDefaultState(), 0, 3, BiomeMinestuck.mediumNormal));
    list.add(new BlockBlobDecorator(Blocks.COBBLESTONE.getDefaultState(), 1, 4, BiomeMinestuck.mediumRough));
    return list;
}
Also used : UndergroundDecoratorVein(com.mraof.minestuck.world.lands.decorator.UndergroundDecoratorVein) SurfaceDecoratorVein(com.mraof.minestuck.world.lands.decorator.SurfaceDecoratorVein) ILandDecorator(com.mraof.minestuck.world.lands.decorator.ILandDecorator) ArrayList(java.util.ArrayList) BlockBlobDecorator(com.mraof.minestuck.world.lands.decorator.BlockBlobDecorator)

Example 2 with ILandDecorator

use of com.mraof.minestuck.world.lands.decorator.ILandDecorator in project Minestuck by mraof.

the class ChunkProviderLands method populate.

@Override
public void populate(int chunkX, int chunkZ) {
    ChunkPos coord = new ChunkPos(chunkX, chunkZ);
    BlockPos gatePos = GateHandler.getGatePos(-1, landWorld.provider.getDimension());
    boolean generatingGate = false;
    if (gatePos != null)
        if (gatePos.getX() >= (chunkX << 4) && gatePos.getX() < (chunkX << 4) + 32 && gatePos.getZ() >= (chunkZ << 4) && gatePos.getZ() < (chunkZ << 4) + 32) {
            generatingGate = true;
            this.generatingStructure = true;
        }
    this.random.setSeed(getSeedFor(chunkX, chunkZ));
    this.generatingStructure = structureHandler.generateStructure(landWorld, random, new ChunkPos(chunkX, chunkZ));
    this.generatingStructure |= villageHandler.generateStructure(landWorld, random, new ChunkPos(chunkX, chunkZ));
    BlockPos pos = null;
    for (Object decorator : decorators) {
        BlockPos tempPos = ((ILandDecorator) decorator).generate(landWorld, random, chunkX, chunkZ, this);
        if (tempPos != null)
            pos = tempPos;
    }
    if (!generatingGate)
        structureHandler.placeReturnNodes(landWorld, random, new ChunkPos(chunkX, chunkZ), pos);
    else if (gatePos.getX() >= (chunkX << 4) + 8 && gatePos.getX() < (chunkX << 4) + 24 && gatePos.getZ() >= (chunkZ << 4) + 8 && gatePos.getZ() < (chunkZ << 4) + 24) {
        IGateStructure gate1 = aspect1.getGateStructure();
        IGateStructure gate2 = aspect2.getGateStructure();
        IGateStructure structure;
        if (gate1 != null && gate2 != null)
            structure = random.nextBoolean() ? gate1 : gate2;
        else if (gate1 != null)
            structure = gate1;
        else if (gate2 != null)
            structure = gate2;
        else
            structure = new DefaultGatePlacement();
        gatePos = structure.generateGateStructure(landWorld, gatePos, this);
        GateHandler.setDefiniteGatePos(-1, landWorld.provider.getDimension(), gatePos);
        for (int x = -1; x <= 1; x++) for (int z = -1; z <= 1; z++) {
            if (x == 0 && z == 0) {
                landWorld.setBlockState(gatePos, MinestuckBlocks.gate.getDefaultState().cycleProperty(BlockGate.isMainComponent), 2);
                TileEntityGate tileEntity = (TileEntityGate) landWorld.getTileEntity(gatePos);
                tileEntity.gateCount = -1;
            } else
                landWorld.setBlockState(gatePos.add(x, 0, z), MinestuckBlocks.gate.getDefaultState(), 2);
        }
    }
    this.generatingStructure = false;
}
Also used : IGateStructure(com.mraof.minestuck.world.lands.structure.IGateStructure) ILandDecorator(com.mraof.minestuck.world.lands.decorator.ILandDecorator) DefaultGatePlacement(com.mraof.minestuck.world.lands.structure.DefaultGatePlacement) ChunkPos(net.minecraft.util.math.ChunkPos) BlockPos(net.minecraft.util.math.BlockPos) TileEntityGate(com.mraof.minestuck.tileentity.TileEntityGate)

Example 3 with ILandDecorator

use of com.mraof.minestuck.world.lands.decorator.ILandDecorator in project Minestuck by mraof.

the class LandAspectHeat method getDecorators.

@Override
public List<ILandDecorator> getDecorators() {
    ArrayList<ILandDecorator> list = new ArrayList<ILandDecorator>();
    list.add(new FireFieldDecorator(7, BiomeMinestuck.mediumNormal));
    list.add(new FireFieldDecorator(10, BiomeMinestuck.mediumRough));
    list.add(new SurfaceDecoratorVein(Blocks.SOUL_SAND.getDefaultState(), 15, 32, BiomeMinestuck.mediumRough));
    list.add(new SurfaceDecoratorVein(Blocks.SOUL_SAND.getDefaultState(), 8, 32, BiomeMinestuck.mediumNormal));
    list.add(new SurfaceDecoratorVein(Blocks.GLOWSTONE.getDefaultState(), 5, 8, BiomeMinestuck.mediumNormal));
    list.add(new UndergroundDecoratorVein(Blocks.GRAVEL.getDefaultState(), 8, 33, 256));
    list.add(new UndergroundDecoratorVein(MinestuckBlocks.coalOreNetherrack.getDefaultState(), 26, 17, 128));
    list.add(new UndergroundDecoratorVein(Blocks.QUARTZ_ORE.getDefaultState(), 13, 8, 64));
    return list;
}
Also used : UndergroundDecoratorVein(com.mraof.minestuck.world.lands.decorator.UndergroundDecoratorVein) FireFieldDecorator(com.mraof.minestuck.world.lands.decorator.FireFieldDecorator) SurfaceDecoratorVein(com.mraof.minestuck.world.lands.decorator.SurfaceDecoratorVein) ILandDecorator(com.mraof.minestuck.world.lands.decorator.ILandDecorator) ArrayList(java.util.ArrayList)

Example 4 with ILandDecorator

use of com.mraof.minestuck.world.lands.decorator.ILandDecorator in project Minestuck by mraof.

the class LandAspectSand method getDecorators.

@Override
public List<ILandDecorator> getDecorators() {
    ArrayList<ILandDecorator> list = new ArrayList<ILandDecorator>();
    list.add(new WorldGenDecorator(new WorldGenCactus(), 15, 0.4F, BiomeMinestuck.mediumNormal));
    list.add(new WorldGenDecorator(new WorldGenCactus(), 5, 0.4F, BiomeMinestuck.mediumRough));
    list.add(new WorldGenDecorator(new WorldGenDeadBush(), 1, 0.4F, BiomeMinestuck.mediumNormal, BiomeMinestuck.mediumRough));
    list.add(new OasisDecorator());
    list.add(new UndergroundDecoratorVein(Blocks.SAND.getDefaultState().withProperty(BlockSand.VARIANT, type == Variant.SAND_RED ? BlockSand.EnumType.RED_SAND : BlockSand.EnumType.SAND), 8, 28, 256));
    list.add(new UndergroundDecoratorVein((type == Variant.SAND_RED ? MinestuckBlocks.ironOreSandstoneRed : MinestuckBlocks.ironOreSandstone).getDefaultState(), 24, 9, 64));
    list.add(new UndergroundDecoratorVein((type == Variant.SAND_RED ? MinestuckBlocks.goldOreSandstoneRed : MinestuckBlocks.goldOreSandstone).getDefaultState(), 6, 9, 32));
    return list;
}
Also used : UndergroundDecoratorVein(com.mraof.minestuck.world.lands.decorator.UndergroundDecoratorVein) ILandDecorator(com.mraof.minestuck.world.lands.decorator.ILandDecorator) WorldGenCactus(net.minecraft.world.gen.feature.WorldGenCactus) WorldGenDeadBush(net.minecraft.world.gen.feature.WorldGenDeadBush) ArrayList(java.util.ArrayList) WorldGenDecorator(com.mraof.minestuck.world.lands.decorator.WorldGenDecorator) OasisDecorator(com.mraof.minestuck.world.lands.decorator.structure.OasisDecorator)

Example 5 with ILandDecorator

use of com.mraof.minestuck.world.lands.decorator.ILandDecorator in project Minestuck by mraof.

the class LandAspectShade method getDecorators.

@Override
public List<ILandDecorator> getDecorators() {
    ArrayList<ILandDecorator> list = new ArrayList<ILandDecorator>();
    list.add(new SurfaceMushroomGenerator(10, 64, BiomeMinestuck.mediumNormal));
    list.add(new SurfaceMushroomGenerator(5, 32, BiomeMinestuck.mediumRough));
    list.add(new LeaflessTreeDecorator(MinestuckBlocks.glowingLog.getDefaultState(), 0.5F, BiomeMinestuck.mediumNormal));
    list.add(new LeaflessTreeDecorator(MinestuckBlocks.glowingLog.getDefaultState(), 2, BiomeMinestuck.mediumRough));
    list.add(new UndergroundDecoratorVein(Blocks.GRAVEL.getDefaultState(), 8, 33, 256));
    list.add(new UndergroundDecoratorVein(Blocks.IRON_ORE.getDefaultState(), 24, 9, 64));
    list.add(new UndergroundDecoratorVein(Blocks.LAPIS_ORE.getDefaultState(), 6, 7, 35));
    return list;
}
Also used : UndergroundDecoratorVein(com.mraof.minestuck.world.lands.decorator.UndergroundDecoratorVein) ILandDecorator(com.mraof.minestuck.world.lands.decorator.ILandDecorator) LeaflessTreeDecorator(com.mraof.minestuck.world.lands.decorator.LeaflessTreeDecorator) ArrayList(java.util.ArrayList) SurfaceMushroomGenerator(com.mraof.minestuck.world.lands.decorator.SurfaceMushroomGenerator)

Aggregations

ILandDecorator (com.mraof.minestuck.world.lands.decorator.ILandDecorator)6 UndergroundDecoratorVein (com.mraof.minestuck.world.lands.decorator.UndergroundDecoratorVein)5 ArrayList (java.util.ArrayList)5 SurfaceDecoratorVein (com.mraof.minestuck.world.lands.decorator.SurfaceDecoratorVein)3 SurfaceMushroomGenerator (com.mraof.minestuck.world.lands.decorator.SurfaceMushroomGenerator)2 TileEntityGate (com.mraof.minestuck.tileentity.TileEntityGate)1 BlockBlobDecorator (com.mraof.minestuck.world.lands.decorator.BlockBlobDecorator)1 FireFieldDecorator (com.mraof.minestuck.world.lands.decorator.FireFieldDecorator)1 LeaflessTreeDecorator (com.mraof.minestuck.world.lands.decorator.LeaflessTreeDecorator)1 WorldGenDecorator (com.mraof.minestuck.world.lands.decorator.WorldGenDecorator)1 OasisDecorator (com.mraof.minestuck.world.lands.decorator.structure.OasisDecorator)1 DefaultGatePlacement (com.mraof.minestuck.world.lands.structure.DefaultGatePlacement)1 IGateStructure (com.mraof.minestuck.world.lands.structure.IGateStructure)1 BlockPos (net.minecraft.util.math.BlockPos)1 ChunkPos (net.minecraft.util.math.ChunkPos)1 WorldGenCactus (net.minecraft.world.gen.feature.WorldGenCactus)1 WorldGenDeadBush (net.minecraft.world.gen.feature.WorldGenDeadBush)1