New sounds, registry rename

This commit is contained in:
paulevsGitch 2020-10-27 03:16:55 +03:00
parent c609f98ec2
commit 1c03ecb5e3
105 changed files with 1449 additions and 1447 deletions

View file

@ -5,10 +5,10 @@ import net.minecraft.particle.ParticleTypes;
import net.minecraft.world.gen.GenerationStep.Feature;
import net.minecraft.world.gen.feature.ConfiguredFeatures;
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EntityRegistry;
import ru.betterend.registry.FeatureRegistry;
import ru.betterend.registry.SoundRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndEntities;
import ru.betterend.registry.EndFeatures;
import ru.betterend.registry.EndSounds;
public class BiomeChorusForest extends EndBiome {
public BiomeChorusForest() {
@ -16,19 +16,19 @@ public class BiomeChorusForest extends EndBiome {
.setFogColor(87, 26, 87)
.setFogDensity(1.5F)
.setPlantsColor(122, 45, 122)
.setSurface(BlockRegistry.CHORUS_NYLIUM)
.setSurface(EndBlocks.CHORUS_NYLIUM)
.setParticles(ParticleTypes.PORTAL, 0.01F)
.setLoop(SoundRegistry.AMBIENT_CHORUS_FOREST)
.setMusic(SoundRegistry.MUSIC_CHORUS_FOREST)
.addFeature(FeatureRegistry.VIOLECITE_LAYER)
.addFeature(FeatureRegistry.END_LAKE_RARE)
.addFeature(FeatureRegistry.PYTHADENDRON_TREE)
.addFeature(FeatureRegistry.PYTHADENDRON_BUSH)
.setLoop(EndSounds.AMBIENT_CHORUS_FOREST)
.setMusic(EndSounds.MUSIC_CHORUS_FOREST)
.addFeature(EndFeatures.VIOLECITE_LAYER)
.addFeature(EndFeatures.END_LAKE_RARE)
.addFeature(EndFeatures.PYTHADENDRON_TREE)
.addFeature(EndFeatures.PYTHADENDRON_BUSH)
.addFeature(Feature.VEGETAL_DECORATION, ConfiguredFeatures.CHORUS_PLANT)
.addFeature(Feature.VEGETAL_DECORATION, ConfiguredFeatures.CHORUS_PLANT)
.addFeature(FeatureRegistry.CHORUS_GRASS)
.addFeature(EndFeatures.CHORUS_GRASS)
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
.addMobSpawn(EntityRegistry.END_SLIME, 5, 1, 2)
.addMobSpawn(EndEntities.END_SLIME, 5, 1, 2)
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 4));
}
}

View file

@ -1,20 +1,20 @@
package ru.betterend.world.biome;
import net.minecraft.entity.EntityType;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.FeatureRegistry;
import ru.betterend.registry.SoundRegistry;
import ru.betterend.registry.StructureRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndFeatures;
import ru.betterend.registry.EndSounds;
import ru.betterend.registry.EndStructures;
public class BiomeCrystalMountains extends EndBiome {
public BiomeCrystalMountains() {
super(new BiomeDefinition("crystal_mountains")
.setPlantsColor(255, 133, 211)
.setSurface(BlockRegistry.CRYSTAL_MOSS)
.setMusic(SoundRegistry.MUSIC_CRYSTAL_MOUNTAINS)
.addStructureFeature(StructureRegistry.MOUNTAIN)
.addFeature(FeatureRegistry.ROUND_CAVE)
.addFeature(FeatureRegistry.CRYSTAL_GRASS)
.setSurface(EndBlocks.CRYSTAL_MOSS)
.setMusic(EndSounds.MUSIC_CRYSTAL_MOUNTAINS)
.addStructureFeature(EndStructures.MOUNTAIN)
.addFeature(EndFeatures.ROUND_CAVE)
.addFeature(EndFeatures.CRYSTAL_GRASS)
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
}
}

View file

@ -3,8 +3,8 @@ package ru.betterend.world.biome;
import net.minecraft.entity.EntityType;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.SoundRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndSounds;
public class BiomeDustWastelands extends EndBiome {
public BiomeDustWastelands() {
@ -13,10 +13,10 @@ public class BiomeDustWastelands extends EndBiome {
.setFogDensity(2)
.setWaterColor(192, 180, 131)
.setWaterFogColor(192, 180, 131)
.setSurface(BlockRegistry.ENDSTONE_DUST)
.setSurface(EndBlocks.ENDSTONE_DUST)
.setParticles(ParticleTypes.WHITE_ASH, 0.01F)
//.setLoop(SoundRegistry.AMBIENT_FOGGY_MUSHROOMLAND)
.setMusic(SoundRegistry.DUST_WASTELANDS)
.setLoop(EndSounds.AMBIENT_DUST_WASTELANDS)
.setMusic(EndSounds.DUST_WASTELANDS)
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
}

View file

@ -2,12 +2,12 @@ package ru.betterend.world.biome;
import net.minecraft.entity.EntityType;
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EntityRegistry;
import ru.betterend.registry.FeatureRegistry;
import ru.betterend.registry.ParticleRegistry;
import ru.betterend.registry.SoundRegistry;
import ru.betterend.registry.StructureRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndEntities;
import ru.betterend.registry.EndFeatures;
import ru.betterend.registry.EndParticles;
import ru.betterend.registry.EndSounds;
import ru.betterend.registry.EndStructures;
public class BiomeFoggyMushroomland extends EndBiome {
public BiomeFoggyMushroomland() {
@ -17,23 +17,23 @@ public class BiomeFoggyMushroomland extends EndBiome {
.setFogDensity(3)
.setWaterColor(119, 227, 250)
.setWaterFogColor(119, 227, 250)
.setSurface(BlockRegistry.END_MOSS, BlockRegistry.END_MYCELIUM)
.setParticles(ParticleRegistry.GLOWING_SPHERE, 0.001F)
.setLoop(SoundRegistry.AMBIENT_FOGGY_MUSHROOMLAND)
.setMusic(SoundRegistry.MUSIC_FOGGY_MUSHROOMLAND)
.addStructureFeature(StructureRegistry.GIANT_MOSSY_GLOWSHROOM)
.addFeature(FeatureRegistry.END_LAKE)
.addFeature(FeatureRegistry.MOSSY_GLOWSHROOM)
.addFeature(FeatureRegistry.BLUE_VINE)
.addFeature(FeatureRegistry.UMBRELLA_MOSS)
.addFeature(FeatureRegistry.CREEPING_MOSS)
.addFeature(FeatureRegistry.DENSE_VINE)
.addFeature(FeatureRegistry.END_LILY)
.addFeature(FeatureRegistry.BUBBLE_CORAL)
.setSurface(EndBlocks.END_MOSS, EndBlocks.END_MYCELIUM)
.setParticles(EndParticles.GLOWING_SPHERE, 0.001F)
.setLoop(EndSounds.AMBIENT_FOGGY_MUSHROOMLAND)
.setMusic(EndSounds.MUSIC_FOGGY_MUSHROOMLAND)
.addStructureFeature(EndStructures.GIANT_MOSSY_GLOWSHROOM)
.addFeature(EndFeatures.END_LAKE)
.addFeature(EndFeatures.MOSSY_GLOWSHROOM)
.addFeature(EndFeatures.BLUE_VINE)
.addFeature(EndFeatures.UMBRELLA_MOSS)
.addFeature(EndFeatures.CREEPING_MOSS)
.addFeature(EndFeatures.DENSE_VINE)
.addFeature(EndFeatures.END_LILY)
.addFeature(EndFeatures.BUBBLE_CORAL)
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
.addMobSpawn(EntityRegistry.DRAGONFLY, 80, 2, 5)
.addMobSpawn(EntityRegistry.END_FISH, 20, 2, 5)
.addMobSpawn(EntityRegistry.END_SLIME, 10, 1, 2)
.addMobSpawn(EndEntities.DRAGONFLY, 80, 2, 5)
.addMobSpawn(EndEntities.END_FISH, 20, 2, 5)
.addMobSpawn(EndEntities.END_SLIME, 10, 1, 2)
.addMobSpawn(EntityType.ENDERMAN, 10, 1, 2));
}
}

View file

@ -2,11 +2,11 @@ package ru.betterend.world.biome;
import net.minecraft.entity.EntityType;
import net.minecraft.world.gen.feature.ConfiguredStructureFeatures;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EntityRegistry;
import ru.betterend.registry.FeatureRegistry;
import ru.betterend.registry.SoundRegistry;
import ru.betterend.registry.StructureRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndEntities;
import ru.betterend.registry.EndFeatures;
import ru.betterend.registry.EndSounds;
import ru.betterend.registry.EndStructures;
public class BiomeMegalake extends EndBiome {
public BiomeMegalake() {
@ -16,19 +16,19 @@ public class BiomeMegalake extends EndBiome {
.setWaterColor(96, 163, 255)
.setWaterFogColor(96, 163, 255)
.setFogDensity(1.75F)
.setMusic(SoundRegistry.MUSIC_MEGALAKE)
.setLoop(SoundRegistry.AMBIENT_MEGALAKE)
.setSurface(BlockRegistry.ENDSTONE_DUST, BlockRegistry.END_MOSS)
.addStructureFeature(StructureRegistry.MEGALAKE)
.setMusic(EndSounds.MUSIC_MEGALAKE)
.setLoop(EndSounds.AMBIENT_MEGALAKE)
.setSurface(EndBlocks.ENDSTONE_DUST, EndBlocks.END_MOSS)
.addStructureFeature(EndStructures.MEGALAKE)
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
.addFeature(FeatureRegistry.END_LOTUS)
.addFeature(FeatureRegistry.END_LOTUS_LEAF)
.addFeature(FeatureRegistry.BUBBLE_CORAL_RARE)
.addFeature(FeatureRegistry.END_LILY_RARE)
.addFeature(FeatureRegistry.UMBRELLA_MOSS)
.addFeature(FeatureRegistry.CREEPING_MOSS)
.addMobSpawn(EntityRegistry.DRAGONFLY, 50, 1, 3)
.addMobSpawn(EntityRegistry.END_FISH, 50, 3, 8)
.addFeature(EndFeatures.END_LOTUS)
.addFeature(EndFeatures.END_LOTUS_LEAF)
.addFeature(EndFeatures.BUBBLE_CORAL_RARE)
.addFeature(EndFeatures.END_LILY_RARE)
.addFeature(EndFeatures.UMBRELLA_MOSS)
.addFeature(EndFeatures.CREEPING_MOSS)
.addMobSpawn(EndEntities.DRAGONFLY, 50, 1, 3)
.addMobSpawn(EndEntities.END_FISH, 50, 3, 8)
.addMobSpawn(EntityType.ENDERMAN, 10, 1, 2));
}
}

View file

@ -2,9 +2,9 @@ package ru.betterend.world.biome;
import net.minecraft.entity.EntityType;
import net.minecraft.particle.ParticleTypes;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.SoundRegistry;
import ru.betterend.registry.StructureRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndSounds;
import ru.betterend.registry.EndStructures;
public class BiomePaintedMountains extends EndBiome {
public BiomePaintedMountains() {
@ -13,10 +13,11 @@ public class BiomePaintedMountains extends EndBiome {
.setFogDensity(2)
.setWaterColor(192, 180, 131)
.setWaterFogColor(192, 180, 131)
.setMusic(SoundRegistry.DUST_WASTELANDS)
.setSurface(BlockRegistry.ENDSTONE_DUST)
.setMusic(EndSounds.DUST_WASTELANDS)
.setLoop(EndSounds.AMBIENT_DUST_WASTELANDS)
.setSurface(EndBlocks.ENDSTONE_DUST)
.setParticles(ParticleTypes.WHITE_ASH, 0.01F)
.addStructureFeature(StructureRegistry.PAINTED_MOUNTAIN)
.addStructureFeature(EndStructures.PAINTED_MOUNTAIN)
.addMobSpawn(EntityType.ENDERMAN, 50, 1, 2));
}
}

View file

@ -5,7 +5,7 @@ import java.util.Random;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.StructureWorldAccess;
import ru.betterend.blocks.basis.BlockPlantWithAge;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
@ -20,16 +20,16 @@ public class BlueVineFeature extends ScatterFeature {
public boolean canGenerate(StructureWorldAccess world, Random random, BlockPos center, BlockPos blockPos, float radius) {
float d = MHelper.length(center.getX() - blockPos.getX(), center.getZ() - blockPos.getZ()) / radius * 0.6F + random.nextFloat() * 0.4F;
small = d > 0.5F;
return BlockRegistry.BLUE_VINE_SEED.canPlaceAt(AIR, world, blockPos);
return EndBlocks.BLUE_VINE_SEED.canPlaceAt(AIR, world, blockPos);
}
@Override
public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) {
if (small) {
BlocksHelper.setWithoutUpdate(world, blockPos, BlockRegistry.BLUE_VINE_SEED.getDefaultState().with(BlockPlantWithAge.AGE, random.nextInt(4)));
BlocksHelper.setWithoutUpdate(world, blockPos, EndBlocks.BLUE_VINE_SEED.getDefaultState().with(BlockPlantWithAge.AGE, random.nextInt(4)));
}
else {
BlockPlantWithAge seed = ((BlockPlantWithAge) BlockRegistry.BLUE_VINE_SEED);
BlockPlantWithAge seed = ((BlockPlantWithAge) EndBlocks.BLUE_VINE_SEED);
seed.grow(world, random, blockPos);
}
}

View file

@ -8,7 +8,7 @@ import net.minecraft.block.Material;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.StructureWorldAccess;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
import ru.betterend.util.sdf.SDF;
@ -27,21 +27,21 @@ public class CaveBushFeature extends FullHeightScatterFeature {
@Override
public boolean canGenerate(StructureWorldAccess world, Random random, BlockPos center, BlockPos blockPos, float radius) {
return world.getBlockState(blockPos.down()).isOf(BlockRegistry.CAVE_MOSS);
return world.getBlockState(blockPos.down()).isOf(EndBlocks.CAVE_MOSS);
}
@Override
public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) {
float radius = MHelper.randRange(0.8F, 2.5F, random);
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextInt());
SDF sphere = new SDFSphere().setRadius(radius).setBlock(BlockRegistry.CAVE_BUSH);
SDF sphere = new SDFSphere().setRadius(radius).setBlock(EndBlocks.CAVE_BUSH);
sphere = new SDFScale3D().setScale(MHelper.randRange(0.8F, 1.2F, random), MHelper.randRange(0.8F, 1.2F, random), MHelper.randRange(0.8F, 1.2F, random)).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return (float) noise.eval(vec.getX() * 0.2, vec.getY() * 0.2, vec.getZ() * 0.2) * 3; }).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return random.nextFloat() * 3F - 1.5F; }).setSource(sphere);
sphere = new SDFSubtraction().setSourceA(sphere).setSourceB(new SDFTranslate().setTranslate(0, -radius, 0).setSource(sphere));
sphere.setReplaceFunction(REPLACE);
sphere.fillRecursive(world, blockPos);
BlocksHelper.setWithoutUpdate(world, blockPos, BlockRegistry.CAVE_BUSH);
BlocksHelper.setWithoutUpdate(world, blockPos, EndBlocks.CAVE_BUSH);
}
static {

View file

@ -8,8 +8,8 @@ import net.minecraft.block.Material;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.StructureWorldAccess;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.BlockTagRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndTags;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
import ru.betterend.util.sdf.SDF;
@ -29,22 +29,22 @@ public class CaveBushFeatureCeil extends InvertedScatterFeature {
@Override
public boolean canGenerate(StructureWorldAccess world, Random random, BlockPos center, BlockPos blockPos, float radius) {
return world.isAir(blockPos.down())
&& world.getBlockState(blockPos.up()).isIn(BlockTagRegistry.GEN_TERRAIN)
&& world.getBlockState(blockPos.down(BlocksHelper.downRay(world, blockPos.down(), 64) + 2)).isIn(BlockTagRegistry.GEN_TERRAIN);
&& world.getBlockState(blockPos.up()).isIn(EndTags.GEN_TERRAIN)
&& world.getBlockState(blockPos.down(BlocksHelper.downRay(world, blockPos.down(), 64) + 2)).isIn(EndTags.GEN_TERRAIN);
}
@Override
public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) {
float radius = MHelper.randRange(1.0F, 3.2F, random);
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextInt());
SDF sphere = new SDFSphere().setRadius(radius).setBlock(BlockRegistry.CAVE_BUSH);
SDF sphere = new SDFSphere().setRadius(radius).setBlock(EndBlocks.CAVE_BUSH);
sphere = new SDFScale3D().setScale(MHelper.randRange(0.8F, 1.2F, random), MHelper.randRange(0.8F, 1.2F, random), MHelper.randRange(0.8F, 1.2F, random)).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return (float) noise.eval(vec.getX() * 0.2, vec.getY() * 0.2, vec.getZ() * 0.2) * 3; }).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return random.nextFloat() * 3F - 1.5F; }).setSource(sphere);
sphere = new SDFSubtraction().setSourceA(sphere).setSourceB(new SDFTranslate().setTranslate(0, -radius, 0).setSource(sphere));
sphere.setReplaceFunction(REPLACE);
sphere.fillRecursive(world, blockPos.down());
BlocksHelper.setWithoutUpdate(world, blockPos.down(), BlockRegistry.CAVE_BUSH);
BlocksHelper.setWithoutUpdate(world, blockPos.down(), EndBlocks.CAVE_BUSH);
}
static {

View file

@ -10,7 +10,7 @@ import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.Feature;
import ru.betterend.blocks.EndPortalBlock;
import ru.betterend.blocks.RunedFlavolite;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.util.BlocksHelper;
public class DefaultEndPortalFeature extends Feature<EndPortalFeatureConfig> {
@ -24,7 +24,7 @@ public class DefaultEndPortalFeature extends Feature<EndPortalFeatureConfig> {
EndPortalFeatureConfig config) {
BlockState portalFrame = config.frameBlock.getDefaultState().with(RunedFlavolite.ACTIVATED, config.activated);
BlockState portalBlock = BlockRegistry.END_PORTAL_BLOCK.getDefaultState().with(EndPortalBlock.AXIS, config.axis);
BlockState portalBlock = EndBlocks.END_PORTAL_BLOCK.getDefaultState().with(EndPortalBlock.AXIS, config.axis);
BlockPos bottomCorner = pos;
BlockPos topCorner;
int width = config.width - 1;

View file

@ -12,8 +12,8 @@ import net.minecraft.world.StructureWorldAccess;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.BlockTagRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndTags;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
@ -108,18 +108,18 @@ public class EndLakeFeature extends DefaultFeature {
r *= r;
if (x2 + z2 <= r) {
state = world.getBlockState(POS);
if (state.isIn(BlockTagRegistry.GEN_TERRAIN)) {
if (state.isIn(EndTags.GEN_TERRAIN)) {
BlocksHelper.setWithoutUpdate(world, POS, AIR);
}
pos = POS.down();
if (world.getBlockState(pos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
if (world.getBlockState(pos).isIn(EndTags.GEN_TERRAIN)) {
state = world.getBiome(pos).getGenerationSettings().getSurfaceConfig().getTopMaterial();
if (y > waterLevel + 1)
BlocksHelper.setWithoutUpdate(world, pos, state);
else if (y > waterLevel)
BlocksHelper.setWithoutUpdate(world, pos, random.nextBoolean() ? state : BlockRegistry.ENDSTONE_DUST.getDefaultState());
BlocksHelper.setWithoutUpdate(world, pos, random.nextBoolean() ? state : EndBlocks.ENDSTONE_DUST.getDefaultState());
else
BlocksHelper.setWithoutUpdate(world, pos, BlockRegistry.ENDSTONE_DUST.getDefaultState());
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.ENDSTONE_DUST.getDefaultState());
}
}
}
@ -163,8 +163,8 @@ public class EndLakeFeature extends DefaultFeature {
}*/
}
pos = POS.down();
if (world.getBlockState(pos).getBlock().isIn(BlockTagRegistry.GEN_TERRAIN)) {
BlocksHelper.setWithoutUpdate(world, POS.down(), BlockRegistry.ENDSTONE_DUST.getDefaultState());
if (world.getBlockState(pos).getBlock().isIn(EndTags.GEN_TERRAIN)) {
BlocksHelper.setWithoutUpdate(world, POS.down(), EndBlocks.ENDSTONE_DUST.getDefaultState());
}
pos = POS.up();
while (canReplace(state = world.getBlockState(pos)) && !state.isAir() && state.getFluidState().isEmpty()) {
@ -180,11 +180,11 @@ public class EndLakeFeature extends DefaultFeature {
//if (world.getBlockState(POS).getMaterial().isReplaceable()) {
if (world.isAir(POS.up())) {
state = world.getBiome(POS).getGenerationSettings().getSurfaceConfig().getTopMaterial();
BlocksHelper.setWithoutUpdate(world, POS, random.nextBoolean() ? state : BlockRegistry.ENDSTONE_DUST.getDefaultState());
BlocksHelper.setWithoutUpdate(world, POS, random.nextBoolean() ? state : EndBlocks.ENDSTONE_DUST.getDefaultState());
BlocksHelper.setWithoutUpdate(world, POS.down(), END_STONE);
}
else {
BlocksHelper.setWithoutUpdate(world, POS, BlockRegistry.ENDSTONE_DUST.getDefaultState());
BlocksHelper.setWithoutUpdate(world, POS, EndBlocks.ENDSTONE_DUST.getDefaultState());
BlocksHelper.setWithoutUpdate(world, POS.down(), END_STONE);
}
//}
@ -216,8 +216,8 @@ public class EndLakeFeature extends DefaultFeature {
private boolean canReplace(BlockState state) {
return state.getMaterial().isReplaceable()
|| state.isIn(BlockTagRegistry.GEN_TERRAIN)
|| state.isOf(BlockRegistry.ENDSTONE_DUST)
|| state.isIn(EndTags.GEN_TERRAIN)
|| state.isOf(EndBlocks.ENDSTONE_DUST)
|| state.getMaterial().equals(Material.PLANT)
|| state.getMaterial().equals(Material.UNDERWATER_PLANT)
|| state.getMaterial().equals(Material.UNUSED_PLANT);

View file

@ -5,7 +5,7 @@ import java.util.Random;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.StructureWorldAccess;
import ru.betterend.blocks.BlockEndLilySeed;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EndBlocks;
public class EndLilyFeature extends UnderwaterPlantScatter {
public EndLilyFeature(int radius) {
@ -14,7 +14,7 @@ public class EndLilyFeature extends UnderwaterPlantScatter {
@Override
public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) {
BlockEndLilySeed seed = (BlockEndLilySeed) BlockRegistry.END_LILY_SEED;
BlockEndLilySeed seed = (BlockEndLilySeed) EndBlocks.END_LILY_SEED;
seed.grow(world, random, blockPos);
}

View file

@ -5,7 +5,7 @@ import java.util.Random;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.StructureWorldAccess;
import ru.betterend.blocks.BlockEndLotusSeed;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EndBlocks;
public class EndLotusFeature extends UnderwaterPlantScatter {
public EndLotusFeature(int radius) {
@ -14,7 +14,7 @@ public class EndLotusFeature extends UnderwaterPlantScatter {
@Override
public void generate(StructureWorldAccess world, Random random, BlockPos blockPos) {
BlockEndLotusSeed seed = (BlockEndLotusSeed) BlockRegistry.END_LOTUS_SEED;
BlockEndLotusSeed seed = (BlockEndLotusSeed) EndBlocks.END_LOTUS_SEED;
seed.grow(world, random, blockPos);
}

View file

@ -10,7 +10,7 @@ import net.minecraft.util.math.Direction;
import net.minecraft.world.StructureWorldAccess;
import ru.betterend.blocks.BlockEndLotusLeaf;
import ru.betterend.blocks.BlockProperties.TripleShape;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.util.BlocksHelper;
public class EndLotusLeafFeature extends ScatterFeature {
@ -37,7 +37,7 @@ public class EndLotusLeafFeature extends ScatterFeature {
private void generateLeaf(StructureWorldAccess world, BlockPos pos) {
Mutable p = new Mutable();
BlockState leaf = BlockRegistry.END_LOTUS_LEAF.getDefaultState();
BlockState leaf = EndBlocks.END_LOTUS_LEAF.getDefaultState();
BlocksHelper.setWithoutUpdate(world, pos, leaf.with(BlockEndLotusLeaf.SHAPE, TripleShape.BOTTOM));
for (Direction move: BlocksHelper.HORIZONTAL) {
BlocksHelper.setWithoutUpdate(world, p.set(pos).move(move), leaf.with(BlockEndLotusLeaf.HORIZONTAL_FACING, move).with(BlockEndLotusLeaf.SHAPE, TripleShape.MIDDLE));

View file

@ -17,8 +17,8 @@ import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import ru.betterend.blocks.BlockMossyGlowshroomCap;
import ru.betterend.blocks.basis.BlockGlowingFur;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.BlockTagRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndTags;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
import ru.betterend.util.SplineHelper;
@ -56,21 +56,21 @@ public class MossyGlowshroomFeature extends DefaultFeature {
if (blockPos.getY() < 5) {
return false;
}
if (!world.getBlockState(blockPos.down()).isIn(BlockTagRegistry.END_GROUND)) {
if (!world.getBlockState(blockPos.down()).isIn(EndTags.END_GROUND)) {
return false;
}
CONE1.setBlock(BlockRegistry.MOSSY_GLOWSHROOM_CAP);
CONE2.setBlock(BlockRegistry.MOSSY_GLOWSHROOM_CAP);
CONE_GLOW.setBlock(BlockRegistry.MOSSY_GLOWSHROOM_HYMENOPHORE);
ROOTS.setBlock(BlockRegistry.MOSSY_GLOWSHROOM.bark);
CONE1.setBlock(EndBlocks.MOSSY_GLOWSHROOM_CAP);
CONE2.setBlock(EndBlocks.MOSSY_GLOWSHROOM_CAP);
CONE_GLOW.setBlock(EndBlocks.MOSSY_GLOWSHROOM_HYMENOPHORE);
ROOTS.setBlock(EndBlocks.MOSSY_GLOWSHROOM.bark);
float height = MHelper.randRange(10F, 25F, random);
int count = MHelper.floor(height / 4);
List<Vector3f> spline = SplineHelper.makeSpline(0, 0, 0, 0, height, 0, count);
SplineHelper.offsetParts(spline, random, 1F, 0, 1F);
SDF sdf = SplineHelper.buildSDF(spline, 2.1F, 1.5F, (pos) -> {
return BlockRegistry.MOSSY_GLOWSHROOM.log.getDefaultState();
return EndBlocks.MOSSY_GLOWSHROOM.log.getDefaultState();
});
Vector3f pos = spline.get(spline.size() - 1);
float scale = MHelper.randRange(0.75F, 1.1F, random);
@ -113,34 +113,34 @@ public class MossyGlowshroomFeature extends DefaultFeature {
.setSource(FUNCTION)
.setReplaceFunction(REPLACE)
.setPostProcess((info) -> {
if (BlockRegistry.MOSSY_GLOWSHROOM.isTreeLog(info.getState())) {
if (random.nextBoolean() && info.getStateUp().getBlock() == BlockRegistry.MOSSY_GLOWSHROOM_CAP) {
info.setState(BlockRegistry.MOSSY_GLOWSHROOM_CAP.getDefaultState().with(BlockMossyGlowshroomCap.TRANSITION, true));
if (EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getState())) {
if (random.nextBoolean() && info.getStateUp().getBlock() == EndBlocks.MOSSY_GLOWSHROOM_CAP) {
info.setState(EndBlocks.MOSSY_GLOWSHROOM_CAP.getDefaultState().with(BlockMossyGlowshroomCap.TRANSITION, true));
return info.getState();
}
else if (!BlockRegistry.MOSSY_GLOWSHROOM.isTreeLog(info.getStateUp()) || !BlockRegistry.MOSSY_GLOWSHROOM.isTreeLog(info.getStateDown())) {
info.setState(BlockRegistry.MOSSY_GLOWSHROOM.bark.getDefaultState());
else if (!EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getStateUp()) || !EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getStateDown())) {
info.setState(EndBlocks.MOSSY_GLOWSHROOM.bark.getDefaultState());
return info.getState();
}
}
else if (info.getState().getBlock() == BlockRegistry.MOSSY_GLOWSHROOM_CAP) {
if (BlockRegistry.MOSSY_GLOWSHROOM.isTreeLog(info.getStateDown().getBlock())) {
info.setState(BlockRegistry.MOSSY_GLOWSHROOM_CAP.getDefaultState().with(BlockMossyGlowshroomCap.TRANSITION, true));
else if (info.getState().getBlock() == EndBlocks.MOSSY_GLOWSHROOM_CAP) {
if (EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getStateDown().getBlock())) {
info.setState(EndBlocks.MOSSY_GLOWSHROOM_CAP.getDefaultState().with(BlockMossyGlowshroomCap.TRANSITION, true));
return info.getState();
}
info.setState(BlockRegistry.MOSSY_GLOWSHROOM_CAP.getDefaultState());
info.setState(EndBlocks.MOSSY_GLOWSHROOM_CAP.getDefaultState());
return info.getState();
}
else if (info.getState().getBlock() == BlockRegistry.MOSSY_GLOWSHROOM_HYMENOPHORE) {
else if (info.getState().getBlock() == EndBlocks.MOSSY_GLOWSHROOM_HYMENOPHORE) {
for (Direction dir: BlocksHelper.HORIZONTAL) {
if (info.getState(dir) == AIR) {
info.setBlockPos(info.getPos().offset(dir), BlockRegistry.MOSSY_GLOWSHROOM_FUR.getDefaultState().with(BlockGlowingFur.FACING, dir));
info.setBlockPos(info.getPos().offset(dir), EndBlocks.MOSSY_GLOWSHROOM_FUR.getDefaultState().with(BlockGlowingFur.FACING, dir));
}
}
if (info.getStateDown().getBlock() != BlockRegistry.MOSSY_GLOWSHROOM_HYMENOPHORE) {
info.setBlockPos(info.getPos().down(), BlockRegistry.MOSSY_GLOWSHROOM_FUR.getDefaultState().with(BlockGlowingFur.FACING, Direction.DOWN));
if (info.getStateDown().getBlock() != EndBlocks.MOSSY_GLOWSHROOM_HYMENOPHORE) {
info.setBlockPos(info.getPos().down(), EndBlocks.MOSSY_GLOWSHROOM_FUR.getDefaultState().with(BlockGlowingFur.FACING, Direction.DOWN));
}
}
return info.getState();
@ -190,7 +190,7 @@ public class MossyGlowshroomFeature extends DefaultFeature {
FUNCTION = new SDFSmoothUnion().setRadius(4).setSourceB(new SDFUnion().setSourceA(HEAD_POS).setSourceB(ROOTS_ROT));
REPLACE = (state) -> {
if (state.isIn(BlockTagRegistry.END_GROUND)) {
if (state.isIn(EndTags.END_GROUND)) {
return true;
}
if (state.getMaterial().equals(Material.PLANT)) {

View file

@ -11,7 +11,7 @@ import net.minecraft.world.StructureWorldAccess;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
import ru.betterend.util.sdf.SDF;
@ -26,18 +26,18 @@ public class PythadendronBushFeature extends DefaultFeature {
@Override
public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos, DefaultFeatureConfig config) {
if (world.getBlockState(pos.down()).getBlock() != BlockRegistry.CHORUS_NYLIUM) return false;
if (world.getBlockState(pos.down()).getBlock() != EndBlocks.CHORUS_NYLIUM) return false;
float radius = MHelper.randRange(1.8F, 4.5F, random);
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextInt());
SDF sphere = new SDFSphere().setRadius(radius).setBlock(BlockRegistry.PYTHADENDRON_LEAVES.getDefaultState().with(LeavesBlock.DISTANCE, 1));
SDF sphere = new SDFSphere().setRadius(radius).setBlock(EndBlocks.PYTHADENDRON_LEAVES.getDefaultState().with(LeavesBlock.DISTANCE, 1));
sphere = new SDFScale3D().setScale(1, 0.5F, 1).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return (float) noise.eval(vec.getX() * 0.2, vec.getY() * 0.2, vec.getZ() * 0.2) * 3; }).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return random.nextFloat() * 3F - 1.5F; }).setSource(sphere);
sphere = new SDFSubtraction().setSourceA(sphere).setSourceB(new SDFTranslate().setTranslate(0, -radius, 0).setSource(sphere));
sphere.setReplaceFunction(REPLACE);
sphere.fillRecursive(world, pos);
BlocksHelper.setWithoutUpdate(world, pos, BlockRegistry.PYTHADENDRON.bark);
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.PYTHADENDRON.bark);
return true;
}

View file

@ -13,8 +13,8 @@ import net.minecraft.world.StructureWorldAccess;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.BlockTagRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndTags;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
import ru.betterend.util.SplineHelper;
@ -30,7 +30,7 @@ public class PythadendronTreeFeature extends DefaultFeature {
@Override
public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos pos, DefaultFeatureConfig config) {
if (world.getBlockState(pos.down()).getBlock() != BlockRegistry.CHORUS_NYLIUM) return false;
if (world.getBlockState(pos.down()).getBlock() != EndBlocks.CHORUS_NYLIUM) return false;
float size = MHelper.randRange(10, 20, random);
List<Vector3f> spline = SplineHelper.makeSpline(0, 0, 0, 0, size, 0, 4);
@ -42,11 +42,11 @@ public class PythadendronTreeFeature extends DefaultFeature {
branch(last.getX(), last.getY(), last.getZ(), size * bsize, MHelper.randRange(0, MHelper.PI2, random), random, depth, world, pos);
SDF function = SplineHelper.buildSDF(spline, 1.7F, 1.1F, (bpos) -> {
return BlockRegistry.PYTHADENDRON.bark.getDefaultState();
return EndBlocks.PYTHADENDRON.bark.getDefaultState();
});
function.setPostProcess((info) -> {
if (BlockRegistry.PYTHADENDRON.isTreeLog(info.getStateUp()) && BlockRegistry.PYTHADENDRON.isTreeLog(info.getStateDown())) {
return BlockRegistry.PYTHADENDRON.log.getDefaultState();
if (EndBlocks.PYTHADENDRON.isTreeLog(info.getStateUp()) && EndBlocks.PYTHADENDRON.isTreeLog(info.getStateDown())) {
return EndBlocks.PYTHADENDRON.log.getDefaultState();
}
return info.getState();
});
@ -73,14 +73,14 @@ public class PythadendronTreeFeature extends DefaultFeature {
SplineHelper.offsetParts(spline, random, 0.3F, 0, 0.3F);
Vector3f pos1 = spline.get(spline.size() - 1);
boolean s1 = SplineHelper.fillSpline(spline, world, BlockRegistry.PYTHADENDRON.bark.getDefaultState(), pos, REPLACE);
boolean s1 = SplineHelper.fillSpline(spline, world, EndBlocks.PYTHADENDRON.bark.getDefaultState(), pos, REPLACE);
spline = SplineHelper.makeSpline(x, y, z, x2, y, z2, 5);
SplineHelper.powerOffset(spline, size * MHelper.randRange(1.0F, 2.0F, random), 4);
SplineHelper.offsetParts(spline, random, 0.3F, 0, 0.3F);
Vector3f pos2 = spline.get(spline.size() - 1);
boolean s2 = SplineHelper.fillSpline(spline, world, BlockRegistry.PYTHADENDRON.bark.getDefaultState(), pos, REPLACE);
boolean s2 = SplineHelper.fillSpline(spline, world, EndBlocks.PYTHADENDRON.bark.getDefaultState(), pos, REPLACE);
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextInt());
if (depth < 3) {
@ -138,7 +138,7 @@ public class PythadendronTreeFeature extends DefaultFeature {
private void leavesBall(StructureWorldAccess world, BlockPos pos, Random random, OpenSimplexNoise noise) {
float radius = MHelper.randRange(4.5F, 6.5F, random);
SDF sphere = new SDFSphere().setRadius(radius).setBlock(BlockRegistry.PYTHADENDRON_LEAVES.getDefaultState().with(LeavesBlock.DISTANCE, 1));
SDF sphere = new SDFSphere().setRadius(radius).setBlock(EndBlocks.PYTHADENDRON_LEAVES.getDefaultState().with(LeavesBlock.DISTANCE, 1));
sphere = new SDFScale3D().setScale(1, 0.6F, 1).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return (float) noise.eval(vec.getX() * 0.2, vec.getY() * 0.2, vec.getZ() * 0.2) * 3; }).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return random.nextFloat() * 3F - 1.5F; }).setSource(sphere);
@ -150,17 +150,17 @@ public class PythadendronTreeFeature extends DefaultFeature {
int count = (int) (radius * 2.5F);
for (int i = 0; i < count; i++) {
BlockPos p = pos.add(random.nextGaussian() * 1.5, random.nextGaussian() * 1.5, random.nextGaussian() * 1.5);
BlocksHelper.setWithoutUpdate(world, p, BlockRegistry.PYTHADENDRON.bark);
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.PYTHADENDRON.bark);
}
}
}
static {
REPLACE = (state) -> {
if (state.isIn(BlockTagRegistry.END_GROUND)) {
if (state.isIn(EndTags.END_GROUND)) {
return true;
}
if (state.getBlock() == BlockRegistry.PYTHADENDRON_LEAVES) {
if (state.getBlock() == EndBlocks.PYTHADENDRON_LEAVES) {
return true;
}
if (state.getMaterial().equals(Material.PLANT)) {

View file

@ -16,9 +16,9 @@ import net.minecraft.world.StructureWorldAccess;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.BlockTagRegistry;
import ru.betterend.registry.StructureRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndStructures;
import ru.betterend.registry.EndTags;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
import ru.betterend.util.sdf.SDF;
@ -45,7 +45,7 @@ public class RoundCaveFeature extends DefaultFeature {
bpos.setX(pos.getX());
bpos.setZ(pos.getZ());
bpos.setY(top);
while (top > bottom && !world.getBlockState(bpos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
while (top > bottom && !world.getBlockState(bpos).isIn(EndTags.GEN_TERRAIN)) {
bpos.setY(--top);
}
top -= radius + 5;
@ -69,7 +69,7 @@ public class RoundCaveFeature extends DefaultFeature {
double nr = radius * 0.25;
Set<BlockPos> bushes = Sets.newHashSet();
BlockState terrain = BlockRegistry.CAVE_MOSS.getDefaultState();
BlockState terrain = EndBlocks.CAVE_MOSS.getDefaultState();
for (int x = x1; x <= x2; x++) {
int xsq = x - pos.getX();
xsq *= xsq;
@ -105,7 +105,7 @@ public class RoundCaveFeature extends DefaultFeature {
}
}
bpos.setY(y - 1);
if (world.getBlockState(bpos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
if (world.getBlockState(bpos).isIn(EndTags.GEN_TERRAIN)) {
BlocksHelper.setWithoutUpdate(world, bpos, terrain);
}
}
@ -114,16 +114,16 @@ public class RoundCaveFeature extends DefaultFeature {
if (!state.getFluidState().isEmpty()) {
BlocksHelper.setWithoutUpdate(world, bpos, Blocks.END_STONE.getDefaultState());
}
else if (world.getBlockState(bpos).isIn(BlockTagRegistry.GEN_TERRAIN)) {
else if (world.getBlockState(bpos).isIn(EndTags.GEN_TERRAIN)) {
if (world.isAir(bpos.down())) {
int h = BlocksHelper.downRay(world, bpos.down(), 64);
if (h > 6 && h < 32 && world.getBlockState(bpos.down(h + 3)).isIn(BlockTagRegistry.GEN_TERRAIN)) {
if (h > 6 && h < 32 && world.getBlockState(bpos.down(h + 3)).isIn(EndTags.GEN_TERRAIN)) {
bushes.add(bpos.down());
}
}
else if (world.isAir(bpos.up())) {
int h = BlocksHelper.upRay(world, bpos.up(), 64);
if (h > 6 && h < 32 && world.getBlockState(bpos.up(h + 3)).isIn(BlockTagRegistry.GEN_TERRAIN)) {
if (h > 6 && h < 32 && world.getBlockState(bpos.up(h + 3)).isIn(EndTags.GEN_TERRAIN)) {
bushes.add(bpos.up());
}
}
@ -138,23 +138,23 @@ public class RoundCaveFeature extends DefaultFeature {
}
});
if (random.nextBoolean() && world.getBiome(pos).getGenerationSettings().hasStructureFeature(StructureRegistry.MOUNTAIN.getStructure())) {
if (random.nextBoolean() && world.getBiome(pos).getGenerationSettings().hasStructureFeature(EndStructures.MOUNTAIN.getStructure())) {
pos = pos.add(random.nextGaussian() * 5, random.nextGaussian() * 5, random.nextGaussian() * 5);
BlockPos down = pos.down(BlocksHelper.downRay(world, pos, 64) + 2);
if (isReplaceable(world.getBlockState(down))) {
SDF prism = new SDFHexPrism().setHeight(radius * MHelper.randRange(0.6F, 0.75F, random)).setRadius(MHelper.randRange(1.7F, 3F, random)).setBlock(BlockRegistry.AURORA_CRYSTAL);
SDF prism = new SDFHexPrism().setHeight(radius * MHelper.randRange(0.6F, 0.75F, random)).setRadius(MHelper.randRange(1.7F, 3F, random)).setBlock(EndBlocks.AURORA_CRYSTAL);
float angleY = MHelper.randRange(0, MHelper.PI2, random);
float vx = (float) Math.sin(angleY);
float vz = (float) Math.sin(angleY);
prism = new SDFRotation().setRotation(new Vector3f(vx, 0, vz), random.nextFloat()).setSource(prism);
prism.setReplaceFunction((state) -> {
return state.getMaterial().isReplaceable()
|| state.isIn(BlockTagRegistry.GEN_TERRAIN)
|| state.isIn(EndTags.GEN_TERRAIN)
|| state.getMaterial().equals(Material.PLANT)
|| state.getMaterial().equals(Material.LEAVES);
});
prism.fillRecursive(world, pos);
BlocksHelper.setWithoutUpdate(world, pos, BlockRegistry.AURORA_CRYSTAL);
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.AURORA_CRYSTAL);
}
}
@ -164,7 +164,7 @@ public class RoundCaveFeature extends DefaultFeature {
}
private boolean isReplaceable(BlockState state) {
return state.isIn(BlockTagRegistry.GEN_TERRAIN)
return state.isIn(EndTags.GEN_TERRAIN)
|| state.getMaterial().isReplaceable()
|| state.getMaterial().equals(Material.PLANT)
|| state.getMaterial().equals(Material.LEAVES);
@ -173,12 +173,12 @@ public class RoundCaveFeature extends DefaultFeature {
private void generateBush(StructureWorldAccess world, Random random, BlockPos blockPos) {
float radius = MHelper.randRange(1.0F, 3.2F, random);
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextInt());
SDF sphere = new SDFSphere().setRadius(radius).setBlock(BlockRegistry.CAVE_BUSH);
SDF sphere = new SDFSphere().setRadius(radius).setBlock(EndBlocks.CAVE_BUSH);
sphere = new SDFScale3D().setScale(MHelper.randRange(0.8F, 1.2F, random), MHelper.randRange(0.8F, 1.2F, random), MHelper.randRange(0.8F, 1.2F, random)).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return (float) noise.eval(vec.getX() * 0.2, vec.getY() * 0.2, vec.getZ() * 0.2) * 3; }).setSource(sphere);
sphere = new SDFDisplacement().setFunction((vec) -> { return random.nextFloat() * 3F - 1.5F; }).setSource(sphere);
sphere = new SDFSubtraction().setSourceA(sphere).setSourceB(new SDFTranslate().setTranslate(0, -radius, 0).setSource(sphere));
sphere.fillRecursive(world, blockPos);
BlocksHelper.setWithoutUpdate(world, blockPos, BlockRegistry.CAVE_BUSH);
BlocksHelper.setWithoutUpdate(world, blockPos, EndBlocks.CAVE_BUSH);
}
}

View file

@ -7,7 +7,7 @@ import net.minecraft.util.math.BlockPos.Mutable;
import net.minecraft.world.StructureWorldAccess;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import ru.betterend.registry.BlockTagRegistry;
import ru.betterend.registry.EndTags;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
@ -31,7 +31,7 @@ public abstract class ScatterFeature extends DefaultFeature {
if (pos.getY() < 5) {
return false;
}
else if (!world.getBlockState(pos.down()).isIn(BlockTagRegistry.END_GROUND)) {
else if (!world.getBlockState(pos.down()).isIn(EndTags.END_GROUND)) {
return false;
}
return true;

View file

@ -17,8 +17,8 @@ import net.minecraft.world.biome.source.TheEndBiomeSource;
import net.minecraft.world.gen.ChunkRandom;
import ru.betterend.BetterEnd;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.BiomeRegistry;
import ru.betterend.registry.BlockTagRegistry;
import ru.betterend.registry.EndBiomes;
import ru.betterend.registry.EndTags;
import ru.betterend.util.FeaturesHelper;
import ru.betterend.world.biome.EndBiome;
@ -42,8 +42,8 @@ public class BetterEndBiomeSource extends BiomeSource {
public BetterEndBiomeSource(Registry<Biome> biomeRegistry, long seed) {
super(getBiomes(biomeRegistry));
this.mapLand = new BiomeMap(seed, 256, BiomeRegistry.LAND_BIOMES);
this.mapVoid = new BiomeMap(seed, 256, BiomeRegistry.VOID_BIOMES);
this.mapLand = new BiomeMap(seed, 256, EndBiomes.LAND_BIOMES);
this.mapVoid = new BiomeMap(seed, 256, EndBiomes.VOID_BIOMES);
this.centerBiome = biomeRegistry.getOrThrow(BiomeKeys.THE_END);
this.barrens = biomeRegistry.getOrThrow(BiomeKeys.END_BARRENS);
this.biomeRegistry = biomeRegistry;
@ -53,8 +53,8 @@ public class BetterEndBiomeSource extends BiomeSource {
chunkRandom.consume(17292);
this.noise = new SimplexNoiseSampler(chunkRandom);
BiomeRegistry.mutateRegistry(biomeRegistry);
BlockTagRegistry.addTerrainTags(biomeRegistry);
EndBiomes.mutateRegistry(biomeRegistry);
EndTags.addTerrainTags(biomeRegistry);
FeaturesHelper.addFeatures(biomeRegistry);
}
@ -86,7 +86,7 @@ public class BetterEndBiomeSource extends BiomeSource {
mapVoid.clearCache();
}
return biomeRegistry.getOrThrow(BiomeRegistry.getBiomeKey(netherBiome));
return biomeRegistry.getOrThrow(EndBiomes.getBiomeKey(netherBiome));
}
@Override

View file

@ -5,7 +5,7 @@ import java.util.Random;
import com.google.common.collect.Lists;
import ru.betterend.registry.BiomeRegistry;
import ru.betterend.registry.EndBiomes;
import ru.betterend.world.biome.EndBiome;
public class BiomePicker {
@ -37,7 +37,7 @@ public class BiomePicker {
for (EndBiome biome: biomes)
if (biome.canGenerate(chance))
return biome;
return BiomeRegistry.END;
return EndBiomes.END;
}
public List<EndBiome> getBiomes() {

View file

@ -9,7 +9,7 @@ import net.minecraft.util.math.Direction;
import ru.betterend.blocks.BlockMossyGlowshroomCap;
import ru.betterend.blocks.basis.BlockGlowingFur;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
import ru.betterend.util.SplineHelper;
@ -66,17 +66,17 @@ public class StructureGiantMossyGlowshroom extends SDFStructureFeature {
SDFBinary function = new SDFSmoothUnion().setRadius(4).setSourceB(new SDFUnion().setSourceA(HEAD_POS).setSourceB(rotRoots));
cone1.setBlock(BlockRegistry.MOSSY_GLOWSHROOM_CAP);
cone2.setBlock(BlockRegistry.MOSSY_GLOWSHROOM_CAP);
priGlowCone.setBlock(BlockRegistry.MOSSY_GLOWSHROOM_HYMENOPHORE);
primRoots.setBlock(BlockRegistry.MOSSY_GLOWSHROOM.bark);
cone1.setBlock(EndBlocks.MOSSY_GLOWSHROOM_CAP);
cone2.setBlock(EndBlocks.MOSSY_GLOWSHROOM_CAP);
priGlowCone.setBlock(EndBlocks.MOSSY_GLOWSHROOM_HYMENOPHORE);
primRoots.setBlock(EndBlocks.MOSSY_GLOWSHROOM.bark);
float height = MHelper.randRange(10F, 25F, random);
int count = MHelper.floor(height / 4);
List<Vector3f> spline = SplineHelper.makeSpline(0, 0, 0, 0, height, 0, count);
SplineHelper.offsetParts(spline, random, 1F, 0, 1F);
SDF sdf = SplineHelper.buildSDF(spline, 2.1F, 1.5F, (pos) -> {
return BlockRegistry.MOSSY_GLOWSHROOM.log.getDefaultState();
return EndBlocks.MOSSY_GLOWSHROOM.log.getDefaultState();
});
Vector3f pos = spline.get(spline.size() - 1);
float scale = MHelper.randRange(2F, 3.5F, random);
@ -89,34 +89,34 @@ public class StructureGiantMossyGlowshroom extends SDFStructureFeature {
.setScale(scale)
.setSource(function))
.setPostProcess((info) -> {
if (BlockRegistry.MOSSY_GLOWSHROOM.isTreeLog(info.getState())) {
if (random.nextBoolean() && info.getStateUp().getBlock() == BlockRegistry.MOSSY_GLOWSHROOM_CAP) {
info.setState(BlockRegistry.MOSSY_GLOWSHROOM_CAP.getDefaultState().with(BlockMossyGlowshroomCap.TRANSITION, true));
if (EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getState())) {
if (random.nextBoolean() && info.getStateUp().getBlock() == EndBlocks.MOSSY_GLOWSHROOM_CAP) {
info.setState(EndBlocks.MOSSY_GLOWSHROOM_CAP.getDefaultState().with(BlockMossyGlowshroomCap.TRANSITION, true));
return info.getState();
}
else if (!BlockRegistry.MOSSY_GLOWSHROOM.isTreeLog(info.getStateUp()) || !BlockRegistry.MOSSY_GLOWSHROOM.isTreeLog(info.getStateDown())) {
info.setState(BlockRegistry.MOSSY_GLOWSHROOM.bark.getDefaultState());
else if (!EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getStateUp()) || !EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getStateDown())) {
info.setState(EndBlocks.MOSSY_GLOWSHROOM.bark.getDefaultState());
return info.getState();
}
}
else if (info.getState().getBlock() == BlockRegistry.MOSSY_GLOWSHROOM_CAP) {
if (BlockRegistry.MOSSY_GLOWSHROOM.isTreeLog(info.getStateDown().getBlock())) {
info.setState(BlockRegistry.MOSSY_GLOWSHROOM_CAP.getDefaultState().with(BlockMossyGlowshroomCap.TRANSITION, true));
else if (info.getState().getBlock() == EndBlocks.MOSSY_GLOWSHROOM_CAP) {
if (EndBlocks.MOSSY_GLOWSHROOM.isTreeLog(info.getStateDown().getBlock())) {
info.setState(EndBlocks.MOSSY_GLOWSHROOM_CAP.getDefaultState().with(BlockMossyGlowshroomCap.TRANSITION, true));
return info.getState();
}
info.setState(BlockRegistry.MOSSY_GLOWSHROOM_CAP.getDefaultState());
info.setState(EndBlocks.MOSSY_GLOWSHROOM_CAP.getDefaultState());
return info.getState();
}
else if (info.getState().getBlock() == BlockRegistry.MOSSY_GLOWSHROOM_HYMENOPHORE) {
else if (info.getState().getBlock() == EndBlocks.MOSSY_GLOWSHROOM_HYMENOPHORE) {
for (Direction dir: BlocksHelper.HORIZONTAL) {
if (info.getState(dir) == AIR) {
info.setBlockPos(info.getPos().offset(dir), BlockRegistry.MOSSY_GLOWSHROOM_FUR.getDefaultState().with(BlockGlowingFur.FACING, dir));
info.setBlockPos(info.getPos().offset(dir), EndBlocks.MOSSY_GLOWSHROOM_FUR.getDefaultState().with(BlockGlowingFur.FACING, dir));
}
}
if (info.getStateDown().getBlock() != BlockRegistry.MOSSY_GLOWSHROOM_HYMENOPHORE) {
info.setBlockPos(info.getPos().down(), BlockRegistry.MOSSY_GLOWSHROOM_FUR.getDefaultState().with(BlockGlowingFur.FACING, Direction.DOWN));
if (info.getStateDown().getBlock() != EndBlocks.MOSSY_GLOWSHROOM_HYMENOPHORE) {
info.setBlockPos(info.getPos().down(), EndBlocks.MOSSY_GLOWSHROOM_FUR.getDefaultState().with(BlockGlowingFur.FACING, Direction.DOWN));
}
}
return info.getState();

View file

@ -12,7 +12,7 @@ import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.StructureFeature;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.registry.EndBlocks;
import ru.betterend.util.MHelper;
import ru.betterend.world.structures.piece.PaintedMountainPiece;
@ -51,8 +51,8 @@ public class StructurePaintedMountain extends StructureFeatureBase {
static {
VARIANTS = new BlockState[] {
Blocks.END_STONE.getDefaultState(),
BlockRegistry.FLAVOLITE.stone.getDefaultState(),
BlockRegistry.VIOLECITE.stone.getDefaultState(),
EndBlocks.FLAVOLITE.stone.getDefaultState(),
EndBlocks.VIOLECITE.stone.getDefaultState(),
};
}
}

View file

@ -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);
}
}

View file

@ -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;
}

View file

@ -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);
}
}
}

View file

@ -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();

View file

@ -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();
}