Search in sources :

Example 1 with Cuboid

use of kaptainwutax.seedcrackerX.render.Cuboid in project SeedcrackerX by 19MisterX98.

the class DesertWellFinder method findInChunk.

@Override
public List<BlockPos> findInChunk() {
    Biome biome = this.world.getBiomeForNoiseGen((this.chunkPos.x << 2) + 2, 0, (this.chunkPos.z << 2) + 2).value();
    if (!Features.DESERT_WELL.isValidBiome(BiomeFixer.swap(biome))) {
        return new ArrayList<>();
    }
    List<BlockPos> result = super.findInChunk();
    result.forEach(pos -> {
        pos = pos.add(2, 1, 2);
        DesertWell.Data data = Features.DESERT_WELL.at(pos.getX(), pos.getZ());
        if (SeedCracker.get().getDataStorage().addBaseData(data, DataAddedEvent.POKE_STRUCTURES)) {
            this.renderers.add(new Cuboid(pos.add(-2, -1, -2), SIZE, new Color(128, 128, 255)));
            this.renderers.add(new Cube(pos, new Color(128, 128, 255)));
        }
    });
    return result;
}
Also used : DesertWell(com.seedfinding.mcfeature.decorator.DesertWell) Biome(net.minecraft.world.biome.Biome) Cube(kaptainwutax.seedcrackerX.render.Cube) Color(kaptainwutax.seedcrackerX.render.Color) ArrayList(java.util.ArrayList) Cuboid(kaptainwutax.seedcrackerX.render.Cuboid) BlockPos(net.minecraft.util.math.BlockPos)

Example 2 with Cuboid

use of kaptainwutax.seedcrackerX.render.Cuboid in project SeedcrackerX by 19MisterX98.

the class AbstractTempleFinder method addRenderers.

public void addRenderers(PieceFinder pieceFinder, BlockPos origin, Color color) {
    this.renderers.add(new Cuboid(origin, pieceFinder.getLayout(), color));
    BlockPos chunkStart = new BlockPos(origin.getX() & -16, origin.getY(), origin.getZ() & -16);
    this.renderers.add(new Cube(chunkStart, color));
}
Also used : Cube(kaptainwutax.seedcrackerX.render.Cube) Cuboid(kaptainwutax.seedcrackerX.render.Cuboid) BlockPos(net.minecraft.util.math.BlockPos)

Example 3 with Cuboid

use of kaptainwutax.seedcrackerX.render.Cuboid in project SeedcrackerX by 19MisterX98.

the class IglooFinder method findInChunk.

@Override
public List<BlockPos> findInChunk() {
    Map<JigsawFinder, List<BlockPos>> result = this.findInChunkPieces();
    List<BlockPos> combinedResult = new ArrayList<>();
    result.forEach((pieceFinder, positions) -> {
        combinedResult.addAll(positions);
        positions.forEach(pos -> {
            RegionStructure.Data<?> data = Features.IGLOO.at(this.chunkPos.x, this.chunkPos.z);
            if (SeedCracker.get().getDataStorage().addBaseData(data, DataAddedEvent.POKE_LIFTING)) {
                this.renderers.add(new Cuboid(pos, pieceFinder.getLayout(), new Color(176, 207, 252)));
                this.renderers.add(new Cube(chunkPos.getStartPos().add(0, pos.getY(), 0), new Color(176, 207, 252)));
            }
        });
    });
    return combinedResult;
}
Also used : Cube(kaptainwutax.seedcrackerX.render.Cube) Color(kaptainwutax.seedcrackerX.render.Color) ArrayList(java.util.ArrayList) Cuboid(kaptainwutax.seedcrackerX.render.Cuboid) ArrayList(java.util.ArrayList) List(java.util.List) BlockPos(net.minecraft.util.math.BlockPos) RegionStructure(com.seedfinding.mcfeature.structure.RegionStructure)

Example 4 with Cuboid

use of kaptainwutax.seedcrackerX.render.Cuboid in project SeedcrackerX by 19MisterX98.

the class MonumentFinder method findInChunk.

@Override
public List<BlockPos> findInChunk() {
    Biome biome = this.world.getBiomeForNoiseGen((this.chunkPos.x << 2) + 2, 64, (this.chunkPos.z << 2) + 2).value();
    if (BiomeFixer.swap(biome).getCategory() != com.seedfinding.mcbiome.biome.Biome.Category.OCEAN)
        return new ArrayList<>();
    Map<PieceFinder, List<BlockPos>> result = this.findInChunkPieces();
    List<BlockPos> combinedResult = new ArrayList<>();
    result.forEach((pieceFinder, positions) -> {
        positions.removeIf(pos -> {
            // Figure this out, it's not a trivial task.
            return false;
        });
        combinedResult.addAll(positions);
        positions.forEach(pos -> {
            ChunkPos monumentStart = new ChunkPos(this.chunkPos.x + 1, this.chunkPos.z + 1);
            RegionStructure.Data<?> data = Features.MONUMENT.at(monumentStart.x, monumentStart.z);
            if (SeedCracker.get().getDataStorage().addBaseData(data, DataAddedEvent.POKE_STRUCTURES)) {
                this.renderers.add(new Cuboid(pos, pieceFinder.getLayout(), new Color(0, 0, 255)));
                this.renderers.add(new Cube(monumentStart.getStartPos().add(0, pos.getY(), 0), new Color(0, 0, 255)));
            }
        });
    });
    return combinedResult;
}
Also used : Color(kaptainwutax.seedcrackerX.render.Color) ArrayList(java.util.ArrayList) Cuboid(kaptainwutax.seedcrackerX.render.Cuboid) Biome(net.minecraft.world.biome.Biome) Cube(kaptainwutax.seedcrackerX.render.Cube) ArrayList(java.util.ArrayList) List(java.util.List) BlockPos(net.minecraft.util.math.BlockPos) ChunkPos(net.minecraft.util.math.ChunkPos) RegionStructure(com.seedfinding.mcfeature.structure.RegionStructure)

Example 5 with Cuboid

use of kaptainwutax.seedcrackerX.render.Cuboid in project SeedcrackerX by 19MisterX98.

the class OutpostFinder method findInChunk.

@Override
public List<BlockPos> findInChunk() {
    Biome biome = this.world.getBiomeForNoiseGen((this.chunkPos.x << 2) + 2, 64, (this.chunkPos.z << 2) + 2).value();
    if (!Features.PILLAGER_OUTPOST.isValidBiome(BiomeFixer.swap(biome)))
        return new ArrayList<>();
    Map<JigsawFinder, List<BlockPos>> result = this.findInChunkPieces();
    List<BlockPos> combinedResult = new ArrayList<>();
    result.forEach((pieceFinder, positions) -> {
        combinedResult.addAll(positions);
        positions.forEach(pos -> {
            RegionStructure.Data<?> data = Features.PILLAGER_OUTPOST.at(this.chunkPos.x, this.chunkPos.z);
            if (SeedCracker.get().getDataStorage().addBaseData(data, DataAddedEvent.POKE_LIFTING)) {
                this.renderers.add(new Cuboid(pos, pieceFinder.getLayout(), new Color(170, 84, 3)));
                this.renderers.add(new Cube(chunkPos.getStartPos().add(0, pos.getY(), 0), new Color(170, 84, 3)));
            }
        });
    });
    return combinedResult;
}
Also used : Color(kaptainwutax.seedcrackerX.render.Color) ArrayList(java.util.ArrayList) Cuboid(kaptainwutax.seedcrackerX.render.Cuboid) Biome(net.minecraft.world.biome.Biome) Cube(kaptainwutax.seedcrackerX.render.Cube) ArrayList(java.util.ArrayList) List(java.util.List) BlockPos(net.minecraft.util.math.BlockPos) RegionStructure(com.seedfinding.mcfeature.structure.RegionStructure)

Aggregations

Cuboid (kaptainwutax.seedcrackerX.render.Cuboid)10 BlockPos (net.minecraft.util.math.BlockPos)10 Color (kaptainwutax.seedcrackerX.render.Color)9 Cube (kaptainwutax.seedcrackerX.render.Cube)9 ArrayList (java.util.ArrayList)7 Biome (net.minecraft.world.biome.Biome)7 RegionStructure (com.seedfinding.mcfeature.structure.RegionStructure)5 List (java.util.List)4 Block (net.minecraft.block.Block)2 BlockBox (net.minecraft.util.math.BlockBox)2 ChunkPos (net.minecraft.util.math.ChunkPos)2 DesertWell (com.seedfinding.mcfeature.decorator.DesertWell)1 EndGateway (com.seedfinding.mcfeature.decorator.EndGateway)1 Decorator (kaptainwutax.seedcrackerX.cracker.decorator.Decorator)1 Dungeon (kaptainwutax.seedcrackerX.cracker.decorator.Dungeon)1 FullFungusData (kaptainwutax.seedcrackerX.cracker.decorator.FullFungusData)1 WarpedFungus (kaptainwutax.seedcrackerX.cracker.decorator.WarpedFungus)1 DataStorage (kaptainwutax.seedcrackerX.cracker.storage.DataStorage)1 BlockEntity (net.minecraft.block.entity.BlockEntity)1 MobSpawnerBlockEntity (net.minecraft.block.entity.MobSpawnerBlockEntity)1