New sounds, registry rename
This commit is contained in:
parent
c609f98ec2
commit
1c03ecb5e3
105 changed files with 1449 additions and 1447 deletions
|
@ -14,8 +14,8 @@ import net.minecraft.world.StructureWorldAccess;
|
|||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import ru.betterend.noise.OpenSimplexNoise;
|
||||
import ru.betterend.registry.BlockTagRegistry;
|
||||
import ru.betterend.registry.StructureRegistry;
|
||||
import ru.betterend.registry.EndStructures;
|
||||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
|
@ -25,7 +25,7 @@ public class CavePiece extends BasePiece {
|
|||
private float radius;
|
||||
|
||||
public CavePiece(BlockPos center, float radius, int id) {
|
||||
super(StructureRegistry.CAVE_PIECE, id);
|
||||
super(EndStructures.CAVE_PIECE, id);
|
||||
this.center = center;
|
||||
this.radius = radius;
|
||||
this.noise = new OpenSimplexNoise(MHelper.getSeed(534, center.getX(), center.getZ()));
|
||||
|
@ -33,7 +33,7 @@ public class CavePiece extends BasePiece {
|
|||
}
|
||||
|
||||
public CavePiece(StructureManager manager, CompoundTag tag) {
|
||||
super(StructureRegistry.CAVE_PIECE, tag);
|
||||
super(EndStructures.CAVE_PIECE, tag);
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class CavePiece extends BasePiece {
|
|||
double r2 = r - 4.5;
|
||||
double dist = xsq + ysq + zsq;
|
||||
if (dist < r2 * r2) {
|
||||
if (world.getBlockState(pos).isIn(BlockTagRegistry.END_GROUND)) {
|
||||
if (world.getBlockState(pos).isIn(EndTags.END_GROUND)) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos, AIR);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,10 +22,10 @@ import net.minecraft.world.chunk.Chunk;
|
|||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import ru.betterend.noise.OpenSimplexNoise;
|
||||
import ru.betterend.registry.BiomeRegistry;
|
||||
import ru.betterend.registry.BlockRegistry;
|
||||
import ru.betterend.registry.BlockTagRegistry;
|
||||
import ru.betterend.registry.StructureRegistry;
|
||||
import ru.betterend.registry.EndBiomes;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndStructures;
|
||||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class LakePiece extends BasePiece {
|
||||
|
@ -38,7 +38,7 @@ public class LakePiece extends BasePiece {
|
|||
private float r2;
|
||||
|
||||
public LakePiece(BlockPos center, float radius, float depth, int id) {
|
||||
super(StructureRegistry.LAKE_PIECE, id);
|
||||
super(EndStructures.LAKE_PIECE, id);
|
||||
this.center = center;
|
||||
this.radius = radius;
|
||||
this.depth = depth;
|
||||
|
@ -48,7 +48,7 @@ public class LakePiece extends BasePiece {
|
|||
}
|
||||
|
||||
public LakePiece(StructureManager manager, CompoundTag tag) {
|
||||
super(StructureRegistry.LAKE_PIECE, tag);
|
||||
super(EndStructures.LAKE_PIECE, tag);
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
||||
|
@ -100,13 +100,13 @@ public class LakePiece extends BasePiece {
|
|||
}
|
||||
minY = MathHelper.lerp(lerp, maxY - minY, 56 - minY);
|
||||
pos.setY(maxY);
|
||||
while (chunk.getBlockState(pos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
|
||||
while (chunk.getBlockState(pos).isIn(EndTags.GEN_TERRAIN)) {
|
||||
pos.setY(maxY ++);
|
||||
}
|
||||
for (int y = maxY; y >= minY; y--) {
|
||||
pos.setY(y - 1);
|
||||
BlockState state = chunk.getBlockState(pos);
|
||||
if (state.getMaterial().isReplaceable() || state.isIn(BlockTagRegistry.GEN_TERRAIN)) {
|
||||
if (state.getMaterial().isReplaceable() || state.isIn(EndTags.GEN_TERRAIN)) {
|
||||
pos.setY(y);
|
||||
chunk.setBlockState(pos, y > 56 ? AIR : WATER, false);
|
||||
}
|
||||
|
@ -117,15 +117,15 @@ public class LakePiece extends BasePiece {
|
|||
}
|
||||
if (pos.getY() < 57) {
|
||||
BlockState state = chunk.getBlockState(pos);
|
||||
if (state.getMaterial().isReplaceable() || state.isIn(BlockTagRegistry.GEN_TERRAIN)) {
|
||||
chunk.setBlockState(pos, BlockRegistry.ENDSTONE_DUST.getDefaultState(), false);
|
||||
if (state.getMaterial().isReplaceable() || state.isIn(EndTags.GEN_TERRAIN)) {
|
||||
chunk.setBlockState(pos, EndBlocks.ENDSTONE_DUST.getDefaultState(), false);
|
||||
pos.setY(pos.getY() - 1);
|
||||
state = chunk.getBlockState(pos);
|
||||
if (state.getMaterial().isReplaceable() || state.isIn(BlockTagRegistry.GEN_TERRAIN)) {
|
||||
chunk.setBlockState(pos, BlockRegistry.ENDSTONE_DUST.getDefaultState(), false);
|
||||
if (state.getMaterial().isReplaceable() || state.isIn(EndTags.GEN_TERRAIN)) {
|
||||
chunk.setBlockState(pos, EndBlocks.ENDSTONE_DUST.getDefaultState(), false);
|
||||
pos.setY(pos.getY() - 1);
|
||||
}
|
||||
if (!chunk.getBlockState(pos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
|
||||
if (!chunk.getBlockState(pos).isIn(EndTags.GEN_TERRAIN)) {
|
||||
|
||||
chunk.setBlockState(pos, Blocks.END_STONE.getDefaultState(), false);
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ public class LakePiece extends BasePiece {
|
|||
return h;
|
||||
}
|
||||
|
||||
if (BiomeRegistry.getFromBiome(world.getBiome(pos)) != BiomeRegistry.MEGALAKE) {
|
||||
if (EndBiomes.getFromBiome(world.getBiome(pos)) != EndBiomes.MEGALAKE) {
|
||||
heightmap.put(p, -4);
|
||||
return -4;
|
||||
}
|
||||
|
|
|
@ -24,10 +24,10 @@ import net.minecraft.world.chunk.Chunk;
|
|||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import ru.betterend.noise.OpenSimplexNoise;
|
||||
import ru.betterend.registry.BiomeRegistry;
|
||||
import ru.betterend.registry.BlockRegistry;
|
||||
import ru.betterend.registry.BlockTagRegistry;
|
||||
import ru.betterend.registry.StructureRegistry;
|
||||
import ru.betterend.registry.EndBiomes;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndStructures;
|
||||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class MountainPiece extends BasePiece {
|
||||
|
@ -41,19 +41,19 @@ public class MountainPiece extends BasePiece {
|
|||
private BlockState top;
|
||||
|
||||
public MountainPiece(BlockPos center, float radius, float height, int id, Biome biome) {
|
||||
super(StructureRegistry.MOUNTAIN_PIECE, id);
|
||||
super(EndStructures.MOUNTAIN_PIECE, id);
|
||||
this.center = center;
|
||||
this.radius = radius;
|
||||
this.height = height;
|
||||
this.r2 = radius * radius;
|
||||
this.noise = new OpenSimplexNoise(MHelper.getSeed(534, center.getX(), center.getZ()));
|
||||
this.biomeID = BiomeRegistry.getBiomeID(biome);
|
||||
this.biomeID = EndBiomes.getBiomeID(biome);
|
||||
top = biome.getGenerationSettings().getSurfaceConfig().getTopMaterial();
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
||||
public MountainPiece(StructureManager manager, CompoundTag tag) {
|
||||
super(StructureRegistry.MOUNTAIN_PIECE, tag);
|
||||
super(EndStructures.MOUNTAIN_PIECE, tag);
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class MountainPiece extends BasePiece {
|
|||
biomeID = new Identifier(tag.getString("biome"));
|
||||
r2 = radius * radius;
|
||||
noise = new OpenSimplexNoise(MHelper.getSeed(534, center.getX(), center.getZ()));
|
||||
top = BiomeRegistry.getBiome(biomeID).getBiome().getGenerationSettings().getSurfaceConfig().getTopMaterial();
|
||||
top = EndBiomes.getBiome(biomeID).getBiome().getGenerationSettings().getSurfaceConfig().getTopMaterial();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -163,7 +163,7 @@ public class MountainPiece extends BasePiece {
|
|||
return h;
|
||||
}
|
||||
|
||||
if (!BiomeRegistry.getBiomeID(world.getBiome(pos)).equals(biomeID)) {
|
||||
if (!EndBiomes.getBiomeID(world.getBiome(pos)).equals(biomeID)) {
|
||||
heightmap.put(p, -4);
|
||||
return -4;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class MountainPiece extends BasePiece {
|
|||
|
||||
Mutable m = new Mutable();
|
||||
m.set(pos.getX(), h - 1, pos.getZ());
|
||||
while (h > 56 && world.getBlockState(pos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
|
||||
while (h > 56 && world.getBlockState(pos).isIn(EndTags.GEN_TERRAIN)) {
|
||||
m.setY(m.getY() - 1);
|
||||
}
|
||||
h = m.getY();
|
||||
|
@ -245,7 +245,7 @@ public class MountainPiece extends BasePiece {
|
|||
int h = coefX * x + coefZ * z + height;
|
||||
for (int y = minY; y < h; y++) {
|
||||
mut.setY(y);
|
||||
chunk.setBlockState(mut, BlockRegistry.AURORA_CRYSTAL.getDefaultState(), false);
|
||||
chunk.setBlockState(mut, EndBlocks.AURORA_CRYSTAL.getDefaultState(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@ import net.minecraft.world.chunk.Chunk;
|
|||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import ru.betterend.noise.OpenSimplexNoise;
|
||||
import ru.betterend.registry.BiomeRegistry;
|
||||
import ru.betterend.registry.BlockTagRegistry;
|
||||
import ru.betterend.registry.StructureRegistry;
|
||||
import ru.betterend.registry.EndBiomes;
|
||||
import ru.betterend.registry.EndStructures;
|
||||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class PaintedMountainPiece extends BasePiece {
|
||||
|
@ -40,19 +40,19 @@ public class PaintedMountainPiece extends BasePiece {
|
|||
private BlockState[] slises;
|
||||
|
||||
public PaintedMountainPiece(BlockPos center, float radius, float height, int id, Biome biome, BlockState[] slises) {
|
||||
super(StructureRegistry.PAINTED_MOUNTAIN_PIECE, id);
|
||||
super(EndStructures.PAINTED_MOUNTAIN_PIECE, id);
|
||||
this.center = center;
|
||||
this.radius = radius;
|
||||
this.height = height;
|
||||
this.r2 = radius * radius;
|
||||
this.noise = new OpenSimplexNoise(MHelper.getSeed(534, center.getX(), center.getZ()));
|
||||
this.biomeID = BiomeRegistry.getBiomeID(biome);
|
||||
this.biomeID = EndBiomes.getBiomeID(biome);
|
||||
this.slises = slises;
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
||||
public PaintedMountainPiece(StructureManager manager, CompoundTag tag) {
|
||||
super(StructureRegistry.PAINTED_MOUNTAIN_PIECE, tag);
|
||||
super(EndStructures.PAINTED_MOUNTAIN_PIECE, tag);
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ public class PaintedMountainPiece extends BasePiece {
|
|||
return h;
|
||||
}
|
||||
|
||||
if (!BiomeRegistry.getBiomeID(world.getBiome(pos)).equals(biomeID)) {
|
||||
if (!EndBiomes.getBiomeID(world.getBiome(pos)).equals(biomeID)) {
|
||||
heightmap.put(p, -6);
|
||||
return -6;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ public class PaintedMountainPiece extends BasePiece {
|
|||
|
||||
Mutable m = new Mutable();
|
||||
m.set(pos.getX(), h - 1, pos.getZ());
|
||||
while (h > 56 && world.getBlockState(pos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
|
||||
while (h > 56 && world.getBlockState(pos).isIn(EndTags.GEN_TERRAIN)) {
|
||||
m.setY(m.getY() - 1);
|
||||
}
|
||||
h = m.getY();
|
||||
|
|
|
@ -11,21 +11,21 @@ import net.minecraft.util.math.ChunkPos;
|
|||
import net.minecraft.world.StructureWorldAccess;
|
||||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import ru.betterend.registry.StructureRegistry;
|
||||
import ru.betterend.registry.EndStructures;
|
||||
import ru.betterend.world.structures.StructureWorld;
|
||||
|
||||
public class VoxelPiece extends BasePiece {
|
||||
private StructureWorld world;
|
||||
|
||||
public VoxelPiece(Consumer<StructureWorld> function, int id) {
|
||||
super(StructureRegistry.VOXEL_PIECE, id);
|
||||
super(EndStructures.VOXEL_PIECE, id);
|
||||
world = new StructureWorld();
|
||||
function.accept(world);
|
||||
this.boundingBox = world.getBounds();
|
||||
}
|
||||
|
||||
public VoxelPiece(StructureManager manager, CompoundTag tag) {
|
||||
super(StructureRegistry.VOXEL_PIECE, tag);
|
||||
super(EndStructures.VOXEL_PIECE, tag);
|
||||
this.boundingBox = world.getBounds();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue