Reformated
This commit is contained in:
parent
fc1da134e7
commit
60e8008cb7
416 changed files with 5772 additions and 4573 deletions
|
@ -1,14 +1,5 @@
|
|||
package org.betterx.betterend.world.biome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||
|
@ -22,6 +13,15 @@ import org.betterx.betterend.registry.EndFeatures;
|
|||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.registry.EndTags;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
|
||||
public class EndBiome extends BCLBiome implements SurfaceMaterialProvider {
|
||||
public static class DefaultSurfaceMaterialProvider implements SurfaceMaterialProvider {
|
||||
public static final BlockState END_STONE = Blocks.END_STONE.defaultBlockState();
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.world.biome.air;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.registry.EndStructures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
|
||||
public class BiomeIceStarfield extends EndBiome.Config {
|
||||
public BiomeIceStarfield() {
|
||||
super("ice_starfield");
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.cave;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeSettings;
|
||||
|
@ -9,6 +7,8 @@ import org.betterx.betterend.registry.EndFeatures;
|
|||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class EmptyAuroraCaveBiome extends EndCaveBiome.Config {
|
||||
public static class Biome extends EndCaveBiome {
|
||||
public Biome(ResourceLocation biomeID, net.minecraft.world.level.biome.Biome biome, BCLBiomeSettings settings) {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.world.biome.cave;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeSettings;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class EmptyEndCaveBiome extends EndCaveBiome.Config {
|
||||
public static class Biome extends EndCaveBiome {
|
||||
public Biome(ResourceLocation biomeID, net.minecraft.world.level.biome.Biome biome, BCLBiomeSettings settings) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.cave;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeSettings;
|
||||
|
@ -9,6 +7,8 @@ import org.betterx.betterend.registry.EndFeatures;
|
|||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class EmptySmaragdantCaveBiome extends EndCaveBiome.Config {
|
||||
public static class Biome extends EndCaveBiome {
|
||||
public Biome(ResourceLocation biomeID, net.minecraft.world.level.biome.Biome biome, BCLBiomeSettings settings) {
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.cave;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep;
|
||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeSettings;
|
||||
|
@ -20,6 +12,14 @@ import org.betterx.betterend.registry.EndSounds;
|
|||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
import org.betterx.betterend.world.features.terrain.caves.CaveChunkPopulatorFeature;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep;
|
||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||
|
||||
public class EndCaveBiome extends EndBiome {
|
||||
public static abstract class Config extends EndBiome.Config {
|
||||
protected Config(String name) {
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.cave;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeSettings;
|
||||
|
@ -12,6 +7,11 @@ import org.betterx.betterend.noise.OpenSimplexNoise;
|
|||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class JadeCaveBiome extends EndCaveBiome.Config {
|
||||
public static class Biome extends EndCaveBiome {
|
||||
private static final OpenSimplexNoise WALL_NOISE = new OpenSimplexNoise("jade_cave".hashCode());
|
||||
|
@ -29,8 +29,10 @@ public class JadeCaveBiome extends EndCaveBiome.Config {
|
|||
@Override
|
||||
public BlockState getWall(BlockPos pos) {
|
||||
double depth = DEPTH_NOISE.eval(pos.getX() * 0.02, pos.getZ() * 0.02) * 0.2 + 0.5;
|
||||
int index = Mth.floor((pos.getY() + WALL_NOISE.eval(pos.getX() * 0.2,
|
||||
pos.getZ() * 0.2) * 1.5) * depth + 0.5);
|
||||
int index = Mth.floor((pos.getY() + WALL_NOISE.eval(
|
||||
pos.getX() * 0.2,
|
||||
pos.getZ() * 0.2
|
||||
) * 1.5) * depth + 0.5);
|
||||
index = Mth.abs(index) % 3;
|
||||
return JADE[index];
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.cave;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeSettings;
|
||||
|
@ -14,6 +10,10 @@ import org.betterx.betterend.registry.EndFeatures;
|
|||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class LushAuroraCaveBiome extends EndCaveBiome.Config {
|
||||
public static class Biome extends EndCaveBiome {
|
||||
public Biome(ResourceLocation biomeID, net.minecraft.world.level.biome.Biome biome, BCLBiomeSettings settings) {
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.cave;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeSettings;
|
||||
|
@ -12,6 +9,9 @@ import org.betterx.betterend.registry.EndFeatures;
|
|||
import org.betterx.betterend.registry.EndParticles;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class LushSmaragdantCaveBiome extends EndCaveBiome.Config {
|
||||
public static class Biome extends EndCaveBiome {
|
||||
public Biome(ResourceLocation biomeID, net.minecraft.world.level.biome.Biome biome, BCLBiomeSettings settings) {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class AmberLandBiome extends EndBiome.Config {
|
||||
public AmberLandBiome() {
|
||||
super("amber_land");
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -11,6 +8,9 @@ import org.betterx.betterend.registry.EndFeatures;
|
|||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class BlossomingSpiresBiome extends EndBiome.Config {
|
||||
public BlossomingSpiresBiome() {
|
||||
super("blossoming_spires");
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.data.worldgen.placement.EndPlacements;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -15,6 +8,13 @@ import org.betterx.betterend.registry.EndFeatures;
|
|||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.data.worldgen.placement.EndPlacements;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||
|
||||
public class ChorusForestBiome extends EndBiome.Config {
|
||||
public ChorusForestBiome() {
|
||||
super("chorus_forest");
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -11,6 +8,9 @@ import org.betterx.betterend.registry.EndSounds;
|
|||
import org.betterx.betterend.registry.EndStructures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class CrystalMountainsBiome extends EndBiome.Config {
|
||||
public CrystalMountainsBiome() {
|
||||
super("crystal_mountains");
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -11,6 +8,9 @@ import org.betterx.betterend.registry.EndParticles;
|
|||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class DragonGraveyardsBiome extends EndBiome.Config {
|
||||
public DragonGraveyardsBiome() {
|
||||
super("dragon_graveyards");
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -11,6 +7,10 @@ import org.betterx.betterend.registry.EndFeatures;
|
|||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class DryShrublandBiome extends EndBiome.Config {
|
||||
public DryShrublandBiome() {
|
||||
super("dry_shrubland");
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
|
@ -8,13 +15,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
import net.minecraft.world.level.levelgen.placement.CaveSurface;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
public class DustWastelandsBiome extends EndBiome.Config {
|
||||
public DustWastelandsBiome() {
|
||||
super("dust_wastelands");
|
||||
|
@ -47,9 +47,10 @@ public class DustWastelandsBiome extends EndBiome.Config {
|
|||
return super
|
||||
.surface()
|
||||
.ceil(Blocks.END_STONE.defaultBlockState())
|
||||
.rule(4, SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(5, false, CaveSurface.FLOOR),
|
||||
SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState())
|
||||
));
|
||||
.rule(4, SurfaceRules.ifTrue(
|
||||
SurfaceRules.stoneDepthCheck(5, false, CaveSurface.FLOOR),
|
||||
SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState())
|
||||
));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class FoggyMushroomlandBiome extends EndBiome.Config {
|
||||
public FoggyMushroomlandBiome() {
|
||||
super("foggy_mushroomland");
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -12,6 +8,10 @@ import org.betterx.betterend.registry.EndParticles;
|
|||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class GlowingGrasslandsBiome extends EndBiome.Config {
|
||||
public GlowingGrasslandsBiome() {
|
||||
super("glowing_grasslands");
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -12,6 +8,10 @@ import org.betterx.betterend.registry.EndParticles;
|
|||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class LanternWoodsBiome extends EndBiome.Config {
|
||||
public LanternWoodsBiome() {
|
||||
super("lantern_woods");
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class MegalakeBiome extends EndBiome.Config {
|
||||
public MegalakeBiome() {
|
||||
super("megalake");
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class MegalakeGroveBiome extends EndBiome.Config {
|
||||
public MegalakeGroveBiome() {
|
||||
super("megalake_grove");
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules.RuleSource;
|
||||
import net.minecraft.world.level.levelgen.placement.CaveSurface;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.surface.rules.SwitchRuleSource;
|
||||
|
@ -19,6 +10,15 @@ import org.betterx.betterend.registry.EndSounds;
|
|||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
import org.betterx.betterend.world.surface.SplitNoiseCondition;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules.RuleSource;
|
||||
import net.minecraft.world.level.levelgen.placement.CaveSurface;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class NeonOasisBiome extends EndBiome.Config {
|
||||
|
@ -67,15 +67,16 @@ public class NeonOasisBiome extends EndBiome.Config {
|
|||
List.of(
|
||||
SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState()),
|
||||
SurfaceRules.state(EndBlocks.END_MOSS.defaultBlockState())
|
||||
)
|
||||
)
|
||||
);
|
||||
return super
|
||||
.surface()
|
||||
.ceil(Blocks.END_STONE.defaultBlockState())
|
||||
.rule(1, SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, surfaceBlockRule))
|
||||
.rule(4, SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(5, false, CaveSurface.FLOOR),
|
||||
SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState())
|
||||
));
|
||||
.rule(4, SurfaceRules.ifTrue(
|
||||
SurfaceRules.stoneDepthCheck(5, false, CaveSurface.FLOOR),
|
||||
SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState())
|
||||
));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -11,6 +7,10 @@ import org.betterx.betterend.registry.EndSounds;
|
|||
import org.betterx.betterend.registry.EndStructures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class PaintedMountainsBiome extends EndBiome.Config {
|
||||
public PaintedMountainsBiome() {
|
||||
super("painted_mountains");
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -13,6 +8,11 @@ import org.betterx.betterend.registry.EndFeatures;
|
|||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class ShadowForestBiome extends EndBiome.Config {
|
||||
public ShadowForestBiome() {
|
||||
super("shadow_forest");
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules.RuleSource;
|
||||
import net.minecraft.world.level.levelgen.placement.CaveSurface;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.surface.rules.SwitchRuleSource;
|
||||
|
@ -15,6 +8,13 @@ import org.betterx.betterend.registry.*;
|
|||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
import org.betterx.betterend.world.surface.SulphuricSurfaceNoiseCondition;
|
||||
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules.RuleSource;
|
||||
import net.minecraft.world.level.levelgen.placement.CaveSurface;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SulphurSpringsBiome extends EndBiome.Config {
|
||||
|
@ -78,14 +78,18 @@ public class SulphurSpringsBiome extends EndBiome.Config {
|
|||
SurfaceRules.state(surfaceMaterial().getTopMaterial()),
|
||||
SULPHURIC_ROCK,
|
||||
BRIMSTONE
|
||||
)
|
||||
)
|
||||
);
|
||||
return super
|
||||
.surface()
|
||||
.rule(2, SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, surfaceBlockRule))
|
||||
.rule(2,
|
||||
SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(5, false, CaveSurface.FLOOR),
|
||||
surfaceBlockRule));
|
||||
.rule(
|
||||
2,
|
||||
SurfaceRules.ifTrue(
|
||||
SurfaceRules.stoneDepthCheck(5, false, CaveSurface.FLOOR),
|
||||
surfaceBlockRule
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder;
|
||||
import org.betterx.bclib.api.v2.levelgen.surface.rules.SwitchRuleSource;
|
||||
|
@ -15,6 +11,10 @@ import org.betterx.betterend.registry.EndSounds;
|
|||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
import org.betterx.betterend.world.surface.UmbraSurfaceNoiseCondition;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UmbraValleyBiome extends EndBiome.Config {
|
||||
|
@ -71,18 +71,19 @@ public class UmbraValleyBiome extends EndBiome.Config {
|
|||
@Override
|
||||
public SurfaceRuleBuilder surface() {
|
||||
return super.surface()
|
||||
.rule(2, SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR,
|
||||
new SwitchRuleSource(
|
||||
new UmbraSurfaceNoiseCondition(),
|
||||
List.of(
|
||||
SurfaceRules.state(surfaceMaterial().getAltTopMaterial()),
|
||||
PALLIDIUM_HEAVY,
|
||||
PALLIDIUM_THIN,
|
||||
PALLIDIUM_TINY,
|
||||
SurfaceRules.state(surfaceMaterial().getTopMaterial())
|
||||
)
|
||||
)
|
||||
));
|
||||
.rule(2, SurfaceRules.ifTrue(
|
||||
SurfaceRules.ON_FLOOR,
|
||||
new SwitchRuleSource(
|
||||
new UmbraSurfaceNoiseCondition(),
|
||||
List.of(
|
||||
SurfaceRules.state(surfaceMaterial().getAltTopMaterial()),
|
||||
PALLIDIUM_HEAVY,
|
||||
PALLIDIUM_THIN,
|
||||
PALLIDIUM_TINY,
|
||||
SurfaceRules.state(surfaceMaterial().getTopMaterial())
|
||||
)
|
||||
)
|
||||
));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package org.betterx.betterend.world.biome.land;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
|
||||
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -12,6 +8,10 @@ import org.betterx.betterend.registry.EndParticles;
|
|||
import org.betterx.betterend.registry.EndSounds;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class UmbrellaJungleBiome extends EndBiome.Config {
|
||||
public UmbrellaJungleBiome() {
|
||||
super("umbrella_jungle");
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFDisplacement;
|
||||
|
@ -17,6 +9,14 @@ import org.betterx.bclib.util.BlocksHelper;
|
|||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
public class BiomeIslandFeature extends DefaultFeature {
|
||||
private static final MutableBlockPos CENTER = new MutableBlockPos();
|
||||
private static final SDF ISLAND;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
||||
public class BlueVineFeature extends ScatterFeature {
|
||||
private boolean small;
|
||||
|
||||
|
@ -18,15 +18,17 @@ public class BlueVineFeature extends ScatterFeature {
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource 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;
|
||||
) / radius * 0.6F + random.nextFloat() * 0.4F;
|
||||
small = d > 0.5F;
|
||||
return EndBlocks.BLUE_VINE_SEED.canSurvive(AIR, world, blockPos);
|
||||
}
|
||||
|
@ -38,7 +40,7 @@ public class BlueVineFeature extends ScatterFeature {
|
|||
world,
|
||||
blockPos,
|
||||
EndBlocks.BLUE_VINE_SEED.defaultBlockState().setValue(EndPlantWithAgeBlock.AGE, random.nextInt(4))
|
||||
);
|
||||
);
|
||||
} else {
|
||||
EndPlantWithAgeBlock seed = ((EndPlantWithAgeBlock) EndBlocks.BLUE_VINE_SEED);
|
||||
seed.growAdult(world, random, blockPos);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.betterend.util.LootTableUtil;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -15,9 +17,6 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureProc
|
|||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo;
|
||||
|
||||
|
||||
import org.betterx.betterend.util.LootTableUtil;
|
||||
|
||||
import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -35,12 +34,14 @@ public class BuildingListFeature extends ListFeature {
|
|||
class ChestProcessor extends StructureProcessor {
|
||||
@Nullable
|
||||
@Override
|
||||
public StructureTemplate.StructureBlockInfo processBlock(LevelReader levelReader,
|
||||
BlockPos blockPos,
|
||||
BlockPos blockPos2,
|
||||
StructureBlockInfo structureBlockInfo,
|
||||
StructureBlockInfo structureBlockInfo2,
|
||||
StructurePlaceSettings structurePlaceSettings) {
|
||||
public StructureTemplate.StructureBlockInfo processBlock(
|
||||
LevelReader levelReader,
|
||||
BlockPos blockPos,
|
||||
BlockPos blockPos2,
|
||||
StructureBlockInfo structureBlockInfo,
|
||||
StructureBlockInfo structureBlockInfo2,
|
||||
StructurePlaceSettings structurePlaceSettings
|
||||
) {
|
||||
BlockState blockState = structureBlockInfo2.state;
|
||||
if (blockState.getBlock() instanceof ChestBlock) {
|
||||
RandomSource random = structurePlaceSettings.getRandom(structureBlockInfo2.pos);
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
public class CavePumpkinFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.StructureHelper;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.util.StructureErode;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -16,13 +23,6 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.*;
|
|||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.StructureHelper;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.util.StructureErode;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
public class CrashedShipFeature extends NBTFeature {
|
||||
private static final StructureProcessor REPLACER;
|
||||
private static final String STRUCTURE_PATH = "/data/minecraft/structures/end_city/ship.nbt";
|
||||
|
@ -125,12 +125,14 @@ public class CrashedShipFeature extends NBTFeature {
|
|||
static {
|
||||
REPLACER = new StructureProcessor() {
|
||||
@Override
|
||||
public StructureBlockInfo processBlock(LevelReader worldView,
|
||||
BlockPos pos,
|
||||
BlockPos blockPos,
|
||||
StructureBlockInfo structureBlockInfo,
|
||||
StructureBlockInfo structureBlockInfo2,
|
||||
StructurePlaceSettings structurePlacementData) {
|
||||
public StructureBlockInfo processBlock(
|
||||
LevelReader worldView,
|
||||
BlockPos pos,
|
||||
BlockPos blockPos,
|
||||
StructureBlockInfo structureBlockInfo,
|
||||
StructureBlockInfo structureBlockInfo2,
|
||||
StructurePlaceSettings structurePlacementData
|
||||
) {
|
||||
BlockState state = structureBlockInfo2.state;
|
||||
if (state.is(Blocks.SPAWNER) || state.getMaterial().equals(Material.WOOL)) {
|
||||
return new StructureBlockInfo(structureBlockInfo2.pos, AIR, null);
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseDoublePlantBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseDoublePlantBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
public class DoublePlantFeature extends ScatterFeature {
|
||||
private final Block smallPlant;
|
||||
private final Block largePlant;
|
||||
|
@ -22,15 +22,17 @@ public class DoublePlantFeature extends ScatterFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource 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;
|
||||
) / radius * 0.6F + random.nextFloat() * 0.4F;
|
||||
plant = d < 0.5F ? largePlant : smallPlant;
|
||||
return plant.canSurvive(plant.defaultBlockState(), world, blockPos);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.betterend.blocks.EndLilySeedBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
||||
import org.betterx.betterend.blocks.EndLilySeedBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class EndLilyFeature extends UnderwaterPlantScatter {
|
||||
public EndLilyFeature(int radius) {
|
||||
super(radius);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.betterend.blocks.EndLotusSeedBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
||||
import org.betterx.betterend.blocks.EndLotusSeedBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class EndLotusFeature extends UnderwaterPlantScatter {
|
||||
public EndLotusFeature(int radius) {
|
||||
super(radius);
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.EndLotusLeafBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -8,11 +13,6 @@ import net.minecraft.world.level.WorldGenLevel;
|
|||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.EndLotusLeafBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class EndLotusLeafFeature extends ScatterFeature {
|
||||
public EndLotusLeafFeature(int radius) {
|
||||
super(radius);
|
||||
|
@ -45,7 +45,7 @@ public class EndLotusLeafFeature extends ScatterFeature {
|
|||
p.set(pos).move(move),
|
||||
leaf.setValue(EndLotusLeafBlock.HORIZONTAL_FACING, move)
|
||||
.setValue(EndLotusLeafBlock.SHAPE, TripleShape.MIDDLE)
|
||||
);
|
||||
);
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Direction d1 = BlocksHelper.HORIZONTAL[i];
|
||||
|
@ -55,7 +55,7 @@ public class EndLotusLeafFeature extends ScatterFeature {
|
|||
p.set(pos).move(d1).move(d2),
|
||||
leaf.setValue(EndLotusLeafBlock.HORIZONTAL_FACING, d1)
|
||||
.setValue(EndLotusLeafBlock.SHAPE, TripleShape.TOP)
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,11 +74,13 @@ public class EndLotusLeafFeature extends ScatterFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
) {
|
||||
return world.isEmptyBlock(blockPos) && world.getBlockState(blockPos.below()).is(Blocks.WATER);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -7,12 +13,6 @@ import net.minecraft.world.level.WorldGenLevel;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class FilaluxFeature extends SkyScatterFeature {
|
||||
public FilaluxFeature() {
|
||||
super(10);
|
||||
|
@ -27,13 +27,13 @@ public class FilaluxFeature extends SkyScatterFeature {
|
|||
world,
|
||||
blockPos.above(),
|
||||
wings.setValue(BlockStateProperties.FACING, Direction.UP)
|
||||
);
|
||||
);
|
||||
for (Direction dir : BlocksHelper.HORIZONTAL) {
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
blockPos.relative(dir),
|
||||
wings.setValue(BlockStateProperties.FACING, dir)
|
||||
);
|
||||
);
|
||||
}
|
||||
int length = MHelper.randRange(1, 3, random);
|
||||
for (int i = 1; i <= length; i++) {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -8,11 +13,6 @@ import net.minecraft.world.level.levelgen.Heightmap;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
public abstract class FullHeightScatterFeature extends DefaultFeature {
|
||||
private final int radius;
|
||||
|
||||
|
@ -20,11 +20,13 @@ public abstract class FullHeightScatterFeature extends DefaultFeature {
|
|||
this.radius = radius;
|
||||
}
|
||||
|
||||
public abstract boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius);
|
||||
public abstract boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
);
|
||||
|
||||
public abstract void generate(WorldGenLevel world, RandomSource random, BlockPos blockPos);
|
||||
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class GlowPillarFeature extends ScatterFeature {
|
||||
public GlowPillarFeature() {
|
||||
super(9);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
) {
|
||||
return EndBlocks.GLOWING_PILLAR_SEED.canSurvive(AIR, world, blockPos);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.betterend.blocks.HydraluxSaplingBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
||||
import org.betterx.betterend.blocks.HydraluxSaplingBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class HydraluxFeature extends UnderwaterPlantScatter {
|
||||
public HydraluxFeature(int radius) {
|
||||
super(radius);
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -8,11 +13,6 @@ import net.minecraft.world.level.levelgen.Heightmap;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
public abstract class InvertedScatterFeature extends DefaultFeature {
|
||||
private final int radius;
|
||||
|
||||
|
@ -20,11 +20,13 @@ public abstract class InvertedScatterFeature extends DefaultFeature {
|
|||
this.radius = radius;
|
||||
}
|
||||
|
||||
public abstract boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius);
|
||||
public abstract boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
);
|
||||
|
||||
public abstract void generate(WorldGenLevel world, RandomSource random, BlockPos blockPos);
|
||||
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class LanceleafFeature extends ScatterFeature {
|
||||
public LanceleafFeature() {
|
||||
super(7);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
) {
|
||||
return EndBlocks.LANCELEAF_SEED.canSurvive(AIR, world, blockPos);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
|
||||
import org.betterx.bclib.util.StructureHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
@ -10,8 +12,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
||||
|
||||
import org.betterx.bclib.util.StructureHelper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ListFeature extends NBTFeature {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
public class MengerSpongeFeature extends UnderwaterPlantScatter {
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.levelgen.structures.templatesystem.DestructionStructureProcessor;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -21,12 +27,6 @@ import net.minecraft.world.level.levelgen.structure.BoundingBox;
|
|||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.levelgen.structures.templatesystem.DestructionStructureProcessor;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
|
@ -48,10 +48,12 @@ public abstract class NBTFeature extends DefaultFeature {
|
|||
|
||||
protected abstract Mirror getMirror(WorldGenLevel world, BlockPos pos, RandomSource random);
|
||||
|
||||
protected abstract int getYOffset(StructureTemplate structure,
|
||||
WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
RandomSource random);
|
||||
protected abstract int getYOffset(
|
||||
StructureTemplate structure,
|
||||
WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
RandomSource random
|
||||
);
|
||||
|
||||
protected abstract TerrainMerge getTerrainMerge(WorldGenLevel world, BlockPos pos, RandomSource random);
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.betterend.blocks.NeonCactusPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
@ -7,10 +11,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.betterend.blocks.NeonCactusPlantBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class NeonCactusFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -7,12 +13,6 @@ import net.minecraft.world.level.WorldGenLevel;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
public abstract class ScatterFeature extends DefaultFeature {
|
||||
private final int radius;
|
||||
|
||||
|
@ -20,11 +20,13 @@ public abstract class ScatterFeature extends DefaultFeature {
|
|||
this.radius = radius;
|
||||
}
|
||||
|
||||
public abstract boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius);
|
||||
public abstract boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
);
|
||||
|
||||
public abstract void generate(WorldGenLevel world, RandomSource random, BlockPos blockPos);
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -12,12 +18,6 @@ import net.minecraft.world.level.levelgen.Heightmap;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
public class SilkMothNestFeature extends DefaultFeature {
|
||||
private boolean canGenerate(WorldGenLevel world, BlockPos pos) {
|
||||
BlockState state = world.getBlockState(pos.above());
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -8,9 +11,6 @@ import net.minecraft.world.level.block.Block;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
public class SingleInvertedScatterFeature extends InvertedScatterFeature {
|
||||
private final Block block;
|
||||
|
||||
|
@ -20,11 +20,13 @@ public class SingleInvertedScatterFeature extends InvertedScatterFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
) {
|
||||
if (!world.isEmptyBlock(blockPos)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseCropBlock;
|
||||
import org.betterx.bclib.blocks.BaseDoublePlantBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseCropBlock;
|
||||
import org.betterx.bclib.blocks.BaseDoublePlantBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
|
||||
public class SinglePlantFeature extends ScatterFeature {
|
||||
private final Block plant;
|
||||
private final boolean rawHeightmap;
|
||||
|
@ -45,11 +45,13 @@ public class SinglePlantFeature extends ScatterFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
) {
|
||||
return plant.canSurvive(plant.defaultBlockState(), world, blockPos);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
public abstract class SkyScatterFeature extends ScatterFeature {
|
||||
public SkyScatterFeature(int radius) {
|
||||
super(radius);
|
||||
|
@ -20,11 +20,13 @@ public abstract class SkyScatterFeature extends ScatterFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
) {
|
||||
if (!world.isEmptyBlock(blockPos)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseDoublePlantBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseDoublePlantBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
public class UnderwaterPlantFeature extends UnderwaterPlantScatter {
|
||||
private final Block plant;
|
||||
|
||||
|
@ -18,11 +18,13 @@ public class UnderwaterPlantFeature extends UnderwaterPlantScatter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
) {
|
||||
return super.canSpawn(world, blockPos) && plant.canSurvive(plant.defaultBlockState(), world, blockPos);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
public abstract class UnderwaterPlantScatter extends ScatterFeature {
|
||||
public UnderwaterPlantScatter(int radius) {
|
||||
super(radius);
|
||||
|
@ -23,11 +23,13 @@ public abstract class UnderwaterPlantScatter extends ScatterFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
) {
|
||||
return world.getBlockState(blockPos).is(Blocks.WATER);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseVineBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
public class VineFeature extends InvertedScatterFeature {
|
||||
private final Block vineBlock;
|
||||
private final int maxLength;
|
||||
|
@ -24,11 +24,13 @@ public class VineFeature extends InvertedScatterFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canGenerate(WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius) {
|
||||
public boolean canGenerate(
|
||||
WorldGenLevel world,
|
||||
RandomSource random,
|
||||
BlockPos center,
|
||||
BlockPos blockPos,
|
||||
float radius
|
||||
) {
|
||||
BlockState state = world.getBlockState(blockPos);
|
||||
return state.getMaterial().isReplaceable() && canPlaceBlock(state, world, blockPos);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.blocks.BaseWallPlantBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -8,10 +12,6 @@ import net.minecraft.world.level.block.Block;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.blocks.BaseWallPlantBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
public class WallPlantFeature extends WallScatterFeature {
|
||||
private final Block block;
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.world.features;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -9,10 +13,6 @@ import net.minecraft.world.level.levelgen.Heightmap;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
||||
public abstract class WallScatterFeature extends DefaultFeature {
|
||||
private static final Direction[] DIR = BlocksHelper.makeHorizontal();
|
||||
private final int radius;
|
||||
|
|
|
@ -1,16 +1,5 @@
|
|||
package org.betterx.betterend.world.features.bushes;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -23,6 +12,17 @@ import org.betterx.bclib.util.BlocksHelper;
|
|||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
public class BushFeature extends DefaultFeature {
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
package org.betterx.betterend.world.features.bushes;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -24,6 +12,18 @@ import org.betterx.bclib.util.BlocksHelper;
|
|||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
public class BushWithOuterFeature extends DefaultFeature {
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.world.features.bushes;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -9,14 +17,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class LargeAmaranitaFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package org.betterx.betterend.world.features.bushes;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties.LumecornShape;
|
||||
import org.betterx.betterend.blocks.LumecornBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -9,14 +17,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties.LumecornShape;
|
||||
import org.betterx.betterend.blocks.LumecornBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class Lumecorn extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
package org.betterx.betterend.world.features.bushes;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
|
@ -28,6 +16,19 @@ import org.betterx.betterend.blocks.basis.FurBlock;
|
|||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFDisplacement;
|
||||
import org.betterx.bclib.sdf.operator.SDFRotation;
|
||||
import org.betterx.bclib.sdf.primitive.SDFTorus;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
@ -11,14 +20,6 @@ import net.minecraft.world.phys.AABB;
|
|||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFDisplacement;
|
||||
import org.betterx.bclib.sdf.operator.SDFRotation;
|
||||
import org.betterx.bclib.sdf.primitive.SDFTorus;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
@ -57,7 +58,8 @@ public class ArchFeature extends DefaultFeature {
|
|||
final float smallRadiusF = smallRadius;
|
||||
OpenSimplexNoise noise = new OpenSimplexNoise(random.nextLong());
|
||||
arch = new SDFDisplacement().setFunction((vec) -> {
|
||||
return (float) (Math.abs(noise.eval(vec.x() * 0.1,
|
||||
return (float) (Math.abs(noise.eval(
|
||||
vec.x() * 0.1,
|
||||
vec.y() * 0.1,
|
||||
vec.z() * 0.1
|
||||
)) * 3F + Math.abs(noise.eval(
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -17,6 +9,14 @@ import org.betterx.bclib.util.BlocksHelper;
|
|||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
public class BigAuroraCrystalFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -11,16 +21,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.FluidState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
public class DesertLakeFeature extends DefaultFeature {
|
||||
private static final BlockState END_STONE = Blocks.END_STONE.defaultBlockState();
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(15152);
|
||||
|
@ -126,8 +126,10 @@ public class DesertLakeFeature extends DefaultFeature {
|
|||
}
|
||||
pos = POS.below();
|
||||
if (world.getBlockState(pos).is(CommonBlockTags.GEN_END_STONES)) {
|
||||
state = EndBiome.findTopMaterial(world,
|
||||
pos); //world.getBiome(pos).getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
||||
state = EndBiome.findTopMaterial(
|
||||
world,
|
||||
pos
|
||||
); //world.getBiome(pos).getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
||||
if (y > waterLevel + 1) BlocksHelper.setWithoutUpdate(world, pos, state);
|
||||
else if (y > waterLevel)
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
|
@ -200,8 +202,10 @@ public class DesertLakeFeature extends DefaultFeature {
|
|||
BlocksHelper.setWithoutUpdate(world, POS, EndBlocks.END_MOSS);
|
||||
} else if (y < waterLevel) {
|
||||
if (world.isEmptyBlock(POS.above())) {
|
||||
state = EndBiome.findTopMaterial(world,
|
||||
pos); //world.getBiome(POS).getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
||||
state = EndBiome.findTopMaterial(
|
||||
world,
|
||||
pos
|
||||
); //world.getBiome(POS).getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
POS,
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -11,16 +21,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.FluidState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
public class EndLakeFeature extends DefaultFeature {
|
||||
private static final BlockState END_STONE = Blocks.END_STONE.defaultBlockState();
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(15152);
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -21,6 +11,16 @@ import org.betterx.bclib.util.MHelper;
|
|||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
public class FallenPillarFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFDisplacement;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -10,15 +20,6 @@ import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
|||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFDisplacement;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
@ -35,7 +36,7 @@ public class FloatingSpireFeature extends SpireFeature {
|
|||
64,
|
||||
192,
|
||||
random
|
||||
);
|
||||
);
|
||||
pos = new BlockPos(pos.getX(), y, pos.getZ());
|
||||
|
||||
SDF sdf = new SDFSphere().setRadius(MHelper.randRange(2, 3, random)).setBlock(Blocks.END_STONE);
|
||||
|
@ -56,9 +57,11 @@ public class FloatingSpireFeature extends SpireFeature {
|
|||
vec.x() * 0.1,
|
||||
vec.y() * 0.1,
|
||||
vec.z() * 0.1
|
||||
)) * 3F + Math.abs(noise.eval(vec.x() * 0.3,
|
||||
vec.y() * 0.3 + 100,
|
||||
vec.z() * 0.3)) * 1.3F);
|
||||
)) * 3F + Math.abs(noise.eval(
|
||||
vec.x() * 0.3,
|
||||
vec.y() * 0.3 + 100,
|
||||
vec.z() * 0.3
|
||||
)) * 1.3F);
|
||||
}).setSource(sdf);
|
||||
final BlockPos center = pos;
|
||||
List<BlockPos> support = Lists.newArrayList();
|
||||
|
@ -67,8 +70,10 @@ public class FloatingSpireFeature extends SpireFeature {
|
|||
if (random.nextInt(16) == 0) {
|
||||
support.add(info.getPos().above());
|
||||
}
|
||||
return EndBiome.findTopMaterial(world,
|
||||
info.getPos());//world.getBiome(info.getPos()).getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
||||
return EndBiome.findTopMaterial(
|
||||
world,
|
||||
info.getPos()
|
||||
);//world.getBiome(info.getPos()).getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
||||
} else if (info.getState(Direction.UP, 3).isAir()) {
|
||||
return EndBiome.findUnderMaterial(world, info.getPos());
|
||||
// return world.getBiome(info.getPos())
|
||||
|
@ -83,12 +88,14 @@ public class FloatingSpireFeature extends SpireFeature {
|
|||
support.forEach((bpos) -> {
|
||||
if (BiomeAPI.getFromBiome(world.getBiome(bpos)) == EndBiomes.BLOSSOMING_SPIRES) {
|
||||
EndFeatures.TENANEA_BUSH.getFeature()
|
||||
.place(new FeaturePlaceContext<>(Optional.empty(),
|
||||
world,
|
||||
chunkGenerator,
|
||||
random,
|
||||
bpos,
|
||||
null));
|
||||
.place(new FeaturePlaceContext<>(
|
||||
Optional.empty(),
|
||||
world,
|
||||
chunkGenerator,
|
||||
random,
|
||||
bpos,
|
||||
null
|
||||
));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,20 +1,5 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -31,6 +16,21 @@ import org.betterx.betterend.registry.EndBlocks;
|
|||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
@ -176,7 +176,8 @@ public class GeyserFeature extends DefaultFeature {
|
|||
|
||||
for (int i = 0; i < 150; i++) {
|
||||
mut.set(pos)
|
||||
.move(MHelper.floor(random.nextGaussian() * 4 + 0.5),
|
||||
.move(
|
||||
MHelper.floor(random.nextGaussian() * 4 + 0.5),
|
||||
-halfHeight - 10,
|
||||
MHelper.floor(random.nextGaussian() * 4 + 0.5)
|
||||
);
|
||||
|
@ -222,7 +223,8 @@ public class GeyserFeature extends DefaultFeature {
|
|||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
mut.set(pos)
|
||||
.move(MHelper.floor(random.nextGaussian() * 0.7 + 0.5),
|
||||
.move(
|
||||
MHelper.floor(random.nextGaussian() * 0.7 + 0.5),
|
||||
-halfHeight - 10,
|
||||
MHelper.floor(random.nextGaussian() * 0.7 + 0.5)
|
||||
);
|
||||
|
@ -254,12 +256,14 @@ public class GeyserFeature extends DefaultFeature {
|
|||
}
|
||||
|
||||
EndFeatures.SULPHURIC_LAKE.getFeature()
|
||||
.place(new FeaturePlaceContext<>(Optional.empty(),
|
||||
.place(new FeaturePlaceContext<>(
|
||||
Optional.empty(),
|
||||
world,
|
||||
chunkGenerator,
|
||||
random,
|
||||
pos,
|
||||
null));
|
||||
null
|
||||
));
|
||||
|
||||
double distance = radius1 * 1.7;
|
||||
BlockPos start = pos.offset(-distance, -halfHeight - 15 - distance, -distance);
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFRotation;
|
||||
|
@ -17,6 +9,14 @@ import org.betterx.bclib.sdf.primitive.SDFCappedCone;
|
|||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -19,6 +10,15 @@ import org.betterx.bclib.util.MHelper;
|
|||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
public class ObsidianBoulderFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -23,6 +13,16 @@ import org.betterx.bclib.util.MHelper;
|
|||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
public class ObsidianPillarBasementFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFCoordModify;
|
||||
|
@ -16,6 +8,14 @@ import org.betterx.bclib.sdf.primitive.SDFSphere;
|
|||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
public class OreLayerFeature extends DefaultFeature {
|
||||
private static final SDFSphere SPHERE;
|
||||
private static final SDFCoordModify NOISE;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
@ -9,10 +13,6 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
public class SingleBlockFeature extends DefaultFeature {
|
||||
private final Block block;
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -9,12 +15,6 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class SmaragdantCrystalFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFDisplacement;
|
||||
import org.betterx.bclib.sdf.operator.SDFSmoothUnion;
|
||||
import org.betterx.bclib.sdf.operator.SDFTranslate;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -13,19 +27,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFDisplacement;
|
||||
import org.betterx.bclib.sdf.operator.SDFSmoothUnion;
|
||||
import org.betterx.bclib.sdf.operator.SDFTranslate;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.registry.EndFeatures;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
@ -59,9 +60,11 @@ public class SpireFeature extends DefaultFeature {
|
|||
vec.x() * 0.1,
|
||||
vec.y() * 0.1,
|
||||
vec.z() * 0.1
|
||||
)) * 3F + Math.abs(noise.eval(vec.x() * 0.3,
|
||||
)) * 3F + Math.abs(noise.eval(
|
||||
vec.x() * 0.3,
|
||||
vec.y() * 0.3 + 100,
|
||||
vec.z() * 0.3)) * 1.3F);
|
||||
vec.z() * 0.3
|
||||
)) * 1.3F);
|
||||
}).setSource(sdf);
|
||||
final BlockPos center = pos;
|
||||
List<BlockPos> support = Lists.newArrayList();
|
||||
|
@ -85,12 +88,14 @@ public class SpireFeature extends DefaultFeature {
|
|||
support.forEach((bpos) -> {
|
||||
if (BiomeAPI.getFromBiome(world.getBiome(bpos)) == EndBiomes.BLOSSOMING_SPIRES) {
|
||||
EndFeatures.TENANEA_BUSH.getFeature()
|
||||
.place(new FeaturePlaceContext<>(Optional.empty(),
|
||||
.place(new FeaturePlaceContext<>(
|
||||
Optional.empty(),
|
||||
world,
|
||||
chunkGenerator,
|
||||
random,
|
||||
bpos,
|
||||
null));
|
||||
null
|
||||
));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.StalactiteBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.Mth;
|
||||
|
@ -11,11 +16,6 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.StalactiteBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
|
||||
public class StalactiteFeature extends DefaultFeature {
|
||||
private final boolean ceiling;
|
||||
private final Block[] ground;
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -10,13 +17,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class SulphurHillFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties;
|
||||
import org.betterx.betterend.blocks.SulphurCrystalBlock;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -14,15 +24,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties;
|
||||
import org.betterx.betterend.blocks.SulphurCrystalBlock;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -129,7 +130,8 @@ public class SulphuricCaveFeature extends DefaultFeature {
|
|||
int count = MHelper.randRange(5, 20, random);
|
||||
for (int i = 0; i < count; i++) {
|
||||
mut.set(pos)
|
||||
.move(MHelper.floor(random.nextGaussian() * 2 + 0.5),
|
||||
.move(
|
||||
MHelper.floor(random.nextGaussian() * 2 + 0.5),
|
||||
0,
|
||||
MHelper.floor(random.nextGaussian() * 2 + 0.5)
|
||||
);
|
||||
|
@ -166,9 +168,11 @@ public class SulphuricCaveFeature extends DefaultFeature {
|
|||
state = world.getBlockState(mut);
|
||||
while (state.is(Blocks.WATER)) {
|
||||
BlocksHelper.setWithoutUpdate(world, mut, EndBlocks.VENT_BUBBLE_COLUMN.defaultBlockState());
|
||||
world.scheduleTick(mut.immutable(),
|
||||
world.scheduleTick(
|
||||
mut.immutable(),
|
||||
EndBlocks.VENT_BUBBLE_COLUMN,
|
||||
MHelper.randRange(8, 32, random));
|
||||
MHelper.randRange(8, 32, random)
|
||||
);
|
||||
mut.setY(mut.getY() + 1);
|
||||
state = world.getBlockState(mut);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties;
|
||||
import org.betterx.betterend.blocks.SulphurCrystalBlock;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -12,15 +22,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.EndBlockProperties;
|
||||
import org.betterx.betterend.blocks.SulphurCrystalBlock;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.util.GlobalState;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -172,7 +173,8 @@ public class SulphuricLakeFeature extends DefaultFeature {
|
|||
) < y || getYOnSurface(
|
||||
world,
|
||||
pos.getX() + dir.getStepX() * 3,
|
||||
pos.getZ() + dir.getStepZ() * 3) < y) {
|
||||
pos.getZ() + dir.getStepZ() * 3
|
||||
) < y) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.HydrothermalVentBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -8,13 +15,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.blocks.HydrothermalVentBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
public class SurfaceVentFeature extends DefaultFeature {
|
||||
@Override
|
||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||
|
|
|
@ -1,16 +1,5 @@
|
|||
package org.betterx.betterend.world.features.terrain;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -22,6 +11,17 @@ import org.betterx.bclib.sdf.primitive.SDFTorus;
|
|||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
public class ThinArchFeature extends DefaultFeature {
|
||||
private final Block block;
|
||||
|
||||
|
@ -35,10 +35,14 @@ public class ThinArchFeature extends DefaultFeature {
|
|||
BlockPos origin = featurePlaceContext.origin();
|
||||
RandomSource random = featurePlaceContext.random();
|
||||
|
||||
BlockPos pos = getPosOnSurfaceWG(world,
|
||||
new BlockPos((origin.getX() & 0xFFFFFFF0) | 7,
|
||||
BlockPos pos = getPosOnSurfaceWG(
|
||||
world,
|
||||
new BlockPos(
|
||||
(origin.getX() & 0xFFFFFFF0) | 7,
|
||||
0,
|
||||
(origin.getZ() & 0xFFFFFFF0) | 7));
|
||||
(origin.getZ() & 0xFFFFFFF0) | 7
|
||||
)
|
||||
);
|
||||
if (!world.getBlockState(pos.below(5)).is(CommonBlockTags.GEN_END_STONES)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.world.features.terrain.caves;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.world.biome.cave.EndCaveBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -12,11 +18,6 @@ import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
|||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.world.biome.cave.EndCaveBiome;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
@ -49,13 +50,15 @@ public class CaveChunkPopulatorFeature extends DefaultFeature {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected void fillSets(int sx,
|
||||
int sz,
|
||||
ChunkAccess chunk,
|
||||
Set<BlockPos> floorPositions,
|
||||
Set<BlockPos> ceilPositions,
|
||||
MutableBlockPos min,
|
||||
MutableBlockPos max) {
|
||||
protected void fillSets(
|
||||
int sx,
|
||||
int sz,
|
||||
ChunkAccess chunk,
|
||||
Set<BlockPos> floorPositions,
|
||||
Set<BlockPos> ceilPositions,
|
||||
MutableBlockPos min,
|
||||
MutableBlockPos max
|
||||
) {
|
||||
MutableBlockPos mut = new MutableBlockPos();
|
||||
MutableBlockPos mut2 = new MutableBlockPos();
|
||||
MutableBlockPos mut3 = new MutableBlockPos();
|
||||
|
@ -111,11 +114,13 @@ public class CaveChunkPopulatorFeature extends DefaultFeature {
|
|||
}
|
||||
}
|
||||
|
||||
protected void placeFloor(WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> floorPositions,
|
||||
RandomSource random,
|
||||
BlockState surfaceBlock) {
|
||||
protected void placeFloor(
|
||||
WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> floorPositions,
|
||||
RandomSource random,
|
||||
BlockState surfaceBlock
|
||||
) {
|
||||
float density = biome.getFloorDensity();
|
||||
floorPositions.forEach((pos) -> {
|
||||
BlocksHelper.setWithoutUpdate(world, pos, surfaceBlock);
|
||||
|
@ -128,10 +133,12 @@ public class CaveChunkPopulatorFeature extends DefaultFeature {
|
|||
});
|
||||
}
|
||||
|
||||
protected void placeCeil(WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> ceilPositions,
|
||||
RandomSource random) {
|
||||
protected void placeCeil(
|
||||
WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> ceilPositions,
|
||||
RandomSource random
|
||||
) {
|
||||
float density = biome.getCeilDensity();
|
||||
ceilPositions.forEach((pos) -> {
|
||||
BlockState ceilBlock = biome.getCeil(pos);
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
package org.betterx.betterend.world.features.terrain.caves;
|
||||
|
||||
import org.betterx.bclib.api.v2.generator.BiomePicker;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
import org.betterx.betterend.world.biome.cave.EndCaveBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -17,17 +29,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.api.v2.generator.BiomePicker;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.util.BlockFixer;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
import org.betterx.betterend.world.biome.cave.EndCaveBiome;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
@ -92,11 +93,13 @@ public abstract class EndCaveFeature extends DefaultFeature {
|
|||
|
||||
protected abstract Set<BlockPos> generate(WorldGenLevel world, BlockPos center, int radius, RandomSource random);
|
||||
|
||||
protected void placeFloor(WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> floorPositions,
|
||||
RandomSource random,
|
||||
BlockState surfaceBlock) {
|
||||
protected void placeFloor(
|
||||
WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> floorPositions,
|
||||
RandomSource random,
|
||||
BlockState surfaceBlock
|
||||
) {
|
||||
float density = biome.getFloorDensity();
|
||||
floorPositions.forEach((pos) -> {
|
||||
if (!surfaceBlock.is(Blocks.END_STONE)) {
|
||||
|
@ -111,10 +114,12 @@ public abstract class EndCaveFeature extends DefaultFeature {
|
|||
});
|
||||
}
|
||||
|
||||
protected void placeCeil(WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> ceilPositions,
|
||||
RandomSource random) {
|
||||
protected void placeCeil(
|
||||
WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> ceilPositions,
|
||||
RandomSource random
|
||||
) {
|
||||
float density = biome.getCeilDensity();
|
||||
ceilPositions.forEach((pos) -> {
|
||||
BlockState ceilBlock = biome.getCeil(pos);
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.world.features.terrain.caves;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -8,10 +13,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.stream.IntStream;
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.betterx.betterend.world.features.terrain.caves;
|
||||
|
||||
import org.betterx.bclib.api.v2.generator.BiomePicker;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
import org.betterx.betterend.world.biome.cave.EndCaveBiome;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -19,15 +29,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.betterx.bclib.api.v2.generator.BiomePicker;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBiomes;
|
||||
import org.betterx.betterend.world.biome.EndBiome;
|
||||
import org.betterx.betterend.world.biome.cave.EndCaveBiome;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
@ -86,8 +87,10 @@ public class TunelCaveFeature extends EndCaveFeature {
|
|||
) * 20) * 0.1F) * 0.9F;
|
||||
float dist = (float) noiseD.eval(pos.getX() * 0.1, y * 0.1, pos.getZ() * 0.1) * 0.12F;
|
||||
val = (val + vert * vert + dist) + density + gradient;
|
||||
if (val < 0.15 && world.getBlockState(pos).is(CommonBlockTags.GEN_END_STONES) && noWaterNear(world,
|
||||
pos)) {
|
||||
if (val < 0.15 && world.getBlockState(pos).is(CommonBlockTags.GEN_END_STONES) && noWaterNear(
|
||||
world,
|
||||
pos
|
||||
)) {
|
||||
positions.add(pos.immutable());
|
||||
}
|
||||
}
|
||||
|
@ -191,11 +194,13 @@ public class TunelCaveFeature extends EndCaveFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void placeFloor(WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> floorPositions,
|
||||
RandomSource random,
|
||||
BlockState surfaceBlock) {
|
||||
protected void placeFloor(
|
||||
WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> floorPositions,
|
||||
RandomSource random,
|
||||
BlockState surfaceBlock
|
||||
) {
|
||||
float density = biome.getFloorDensity() * 0.2F;
|
||||
floorPositions.forEach((pos) -> {
|
||||
if (!surfaceBlock.is(Blocks.END_STONE)) {
|
||||
|
@ -211,10 +216,12 @@ public class TunelCaveFeature extends EndCaveFeature {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void placeCeil(WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> ceilPositions,
|
||||
RandomSource random) {
|
||||
protected void placeCeil(
|
||||
WorldGenLevel world,
|
||||
EndCaveBiome biome,
|
||||
Set<BlockPos> ceilPositions,
|
||||
RandomSource random
|
||||
) {
|
||||
float density = biome.getCeilDensity() * 0.2F;
|
||||
ceilPositions.forEach((pos) -> {
|
||||
BlockState ceilBlock = biome.getCeil(pos);
|
||||
|
@ -234,12 +241,17 @@ public class TunelCaveFeature extends EndCaveFeature {
|
|||
return hasCavesInBiome(world, pos.offset(-8, 0, -8)) && hasCavesInBiome(
|
||||
world,
|
||||
pos.offset(8, 0, -8)
|
||||
) && hasCavesInBiome(world,
|
||||
pos.offset(-8,
|
||||
0,
|
||||
8)) && hasCavesInBiome(
|
||||
) && hasCavesInBiome(
|
||||
world,
|
||||
pos.offset(8, 0, 8));
|
||||
pos.offset(
|
||||
-8,
|
||||
0,
|
||||
8
|
||||
)
|
||||
) && hasCavesInBiome(
|
||||
world,
|
||||
pos.offset(8, 0, 8)
|
||||
);
|
||||
}
|
||||
|
||||
protected boolean hasCavesInBiome(WorldGenLevel world, BlockPos pos) {
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -13,18 +26,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
@ -110,20 +111,24 @@ public class DragonTreeFeature extends DefaultFeature {
|
|||
SplineHelper.scale(branch, scale);
|
||||
Vector3f last = branch.get(branch.size() - 1);
|
||||
if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(CommonBlockTags.GEN_END_STONES)) {
|
||||
SplineHelper.fillSpline(branch,
|
||||
SplineHelper.fillSpline(
|
||||
branch,
|
||||
world,
|
||||
EndBlocks.DRAGON_TREE.getBark().defaultBlockState(),
|
||||
pos,
|
||||
REPLACE);
|
||||
REPLACE
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void leavesBall(WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
OpenSimplexNoise noise) {
|
||||
private void leavesBall(
|
||||
WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
OpenSimplexNoise noise
|
||||
) {
|
||||
SDF sphere = new SDFSphere().setRadius(radius)
|
||||
.setBlock(EndBlocks.DRAGON_TREE_LEAVES.defaultBlockState()
|
||||
.setValue(LeavesBlock.DISTANCE, 6));
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -14,16 +24,6 @@ import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
|||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.blocks.BaseAttachedBlock;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.blocks.HelixTreeLeavesBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
|
@ -11,17 +22,6 @@ import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
|||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.blocks.HelixTreeLeavesBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
@ -70,21 +70,25 @@ public class HelixTreeFeature extends DefaultFeature {
|
|||
float dy2 = 100 * scale;
|
||||
sdf.addPostProcess(POST).fillArea(world, pos, new AABB(pos.offset(-dx, dy1, -dx), pos.offset(dx, dy2, dx)));
|
||||
SplineHelper.scale(spline, scale);
|
||||
SplineHelper.fillSplineForce(spline,
|
||||
SplineHelper.fillSplineForce(
|
||||
spline,
|
||||
world,
|
||||
EndBlocks.HELIX_TREE.getBark().defaultBlockState(),
|
||||
pos,
|
||||
(state) -> {
|
||||
return state.getMaterial().isReplaceable();
|
||||
});
|
||||
}
|
||||
);
|
||||
SplineHelper.rotateSpline(spline, (float) Math.PI);
|
||||
SplineHelper.fillSplineForce(spline,
|
||||
SplineHelper.fillSplineForce(
|
||||
spline,
|
||||
world,
|
||||
EndBlocks.HELIX_TREE.getBark().defaultBlockState(),
|
||||
pos,
|
||||
(state) -> {
|
||||
return state.getMaterial().isReplaceable();
|
||||
});
|
||||
}
|
||||
);
|
||||
SplineHelper.scale(spline2, scale);
|
||||
BlockPos leafStart = pos.offset(lastPoint.x() + 0.5, lastPoint.y() + 0.5, lastPoint.z() + 0.5);
|
||||
SplineHelper.fillSplineForce(
|
||||
|
@ -159,12 +163,14 @@ public class HelixTreeFeature extends DefaultFeature {
|
|||
return true;
|
||||
}
|
||||
|
||||
private void fillLine(Vector3f start,
|
||||
Vector3f end,
|
||||
WorldGenLevel world,
|
||||
BlockState state,
|
||||
BlockPos pos,
|
||||
int offset) {
|
||||
private void fillLine(
|
||||
Vector3f start,
|
||||
Vector3f end,
|
||||
WorldGenLevel world,
|
||||
BlockState state,
|
||||
BlockPos pos,
|
||||
int offset
|
||||
) {
|
||||
float dx = end.x() - start.x();
|
||||
float dy = end.y() - start.y();
|
||||
float dz = end.z() - start.z();
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.blocks.JellyshroomCapBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.util.Mth;
|
||||
|
@ -11,16 +22,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.blocks.JellyshroomCapBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
|
|
@ -1,18 +1,5 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
|
@ -27,6 +14,19 @@ import org.betterx.bclib.util.SplineHelper;
|
|||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
@ -114,11 +114,13 @@ public class LacugroveFeature extends DefaultFeature {
|
|||
return true;
|
||||
}
|
||||
|
||||
private void leavesBall(WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
OpenSimplexNoise noise) {
|
||||
private void leavesBall(
|
||||
WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
OpenSimplexNoise noise
|
||||
) {
|
||||
SDF sphere = new SDFSphere().setRadius(radius)
|
||||
.setBlock(EndBlocks.LACUGROVE_LEAVES.defaultBlockState()
|
||||
.setValue(LeavesBlock.DISTANCE, 6));
|
||||
|
|
|
@ -1,19 +1,5 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
|
@ -28,6 +14,21 @@ import org.betterx.betterend.blocks.basis.FurBlock;
|
|||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
@ -68,12 +69,14 @@ public class LucerniaFeature extends DefaultFeature {
|
|||
return true;
|
||||
}
|
||||
|
||||
private void leavesBall(WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
OpenSimplexNoise noise,
|
||||
boolean natural) {
|
||||
private void leavesBall(
|
||||
WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
OpenSimplexNoise noise,
|
||||
boolean natural
|
||||
) {
|
||||
SDF sphere = new SDFSphere().setRadius(radius)
|
||||
.setBlock(EndBlocks.LUCERNIA_LEAVES.defaultBlockState()
|
||||
.setValue(LeavesBlock.DISTANCE, 6));
|
||||
|
@ -189,11 +192,13 @@ public class LucerniaFeature extends DefaultFeature {
|
|||
SplineHelper.scale(branch, scale);
|
||||
Vector3f last = branch.get(branch.size() - 1);
|
||||
if (world.getBlockState(pos.offset(last.x(), last.y(), last.z())).is(CommonBlockTags.GEN_END_STONES)) {
|
||||
SplineHelper.fillSplineForce(branch,
|
||||
SplineHelper.fillSplineForce(
|
||||
branch,
|
||||
world,
|
||||
EndBlocks.LUCERNIA.getBark().defaultBlockState(),
|
||||
pos,
|
||||
REPLACE);
|
||||
REPLACE
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
|
@ -24,6 +14,16 @@ import org.betterx.betterend.blocks.basis.FurBlock;
|
|||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.sdf.PosInfo;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
|
@ -26,6 +14,18 @@ import org.betterx.bclib.util.SplineHelper;
|
|||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
@ -73,15 +73,17 @@ public class PythadendronTreeFeature extends DefaultFeature {
|
|||
return true;
|
||||
}
|
||||
|
||||
private void branch(float x,
|
||||
float y,
|
||||
float z,
|
||||
float size,
|
||||
float angle,
|
||||
RandomSource random,
|
||||
int depth,
|
||||
WorldGenLevel world,
|
||||
BlockPos pos) {
|
||||
private void branch(
|
||||
float x,
|
||||
float y,
|
||||
float z,
|
||||
float size,
|
||||
float angle,
|
||||
RandomSource random,
|
||||
int depth,
|
||||
WorldGenLevel world,
|
||||
BlockPos pos
|
||||
) {
|
||||
if (depth == 0) return;
|
||||
|
||||
float dx = (float) Math.cos(angle) * size * 0.15F;
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.blocks.basis.FurBlock;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -13,19 +27,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.blocks.basis.FurBlock;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
@ -63,11 +64,13 @@ public class TenaneaFeature extends DefaultFeature {
|
|||
return true;
|
||||
}
|
||||
|
||||
private void leavesBall(WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
OpenSimplexNoise noise) {
|
||||
private void leavesBall(
|
||||
WorldGenLevel world,
|
||||
BlockPos pos,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
OpenSimplexNoise noise
|
||||
) {
|
||||
SDF sphere = new SDFSphere().setRadius(radius)
|
||||
.setBlock(EndBlocks.TENANEA_LEAVES.defaultBlockState()
|
||||
.setValue(LeavesBlock.DISTANCE, 6));
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
package org.betterx.betterend.world.features.trees;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.blocks.UmbrellaTreeClusterBlock;
|
||||
import org.betterx.betterend.blocks.UmbrellaTreeMembraneBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -13,18 +26,6 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
|||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.math.Vector3f;
|
||||
import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.*;
|
||||
import org.betterx.bclib.sdf.primitive.SDFSphere;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.bclib.util.SplineHelper;
|
||||
import org.betterx.betterend.blocks.UmbrellaTreeClusterBlock;
|
||||
import org.betterx.betterend.blocks.UmbrellaTreeMembraneBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
@ -162,11 +163,13 @@ public class UmbrellaTreeFeature extends DefaultFeature {
|
|||
}
|
||||
}
|
||||
|
||||
private SDF makeMembrane(WorldGenLevel world,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
BlockState membrane,
|
||||
BlockState center) {
|
||||
private SDF makeMembrane(
|
||||
WorldGenLevel world,
|
||||
float radius,
|
||||
RandomSource random,
|
||||
BlockState membrane,
|
||||
BlockState center
|
||||
) {
|
||||
SDF sphere = new SDFSphere().setRadius(radius).setBlock(membrane);
|
||||
SDF sub = new SDFTranslate().setTranslate(0, -4, 0).setSource(sphere);
|
||||
sphere = new SDFSubtraction().setSourceA(sphere).setSourceB(sub);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.betterx.betterend.world.generator;
|
||||
|
||||
import org.betterx.betterend.config.Configs;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
import org.betterx.betterend.config.Configs;
|
||||
|
||||
public class GeneratorOptions {
|
||||
private static int biomeSizeCaves;
|
||||
private static boolean hasPortal;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
package org.betterx.betterend.world.generator;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.levelgen.LegacyRandomSource;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.sdf.SDF;
|
||||
import org.betterx.bclib.sdf.operator.SDFRadialNoiseMap;
|
||||
import org.betterx.bclib.sdf.operator.SDFScale;
|
||||
|
@ -14,6 +9,12 @@ import org.betterx.bclib.sdf.primitive.SDFCappedCone;
|
|||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.levelgen.LegacyRandomSource;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.betterx.betterend.world.generator;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
import org.betterx.bclib.config.PathConfig;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public class LayerOptions {
|
||||
public final float distance;
|
||||
public final float scale;
|
||||
|
@ -15,13 +15,15 @@ public class LayerOptions {
|
|||
public final long centerDist;
|
||||
public final boolean hasCentralIsland;
|
||||
|
||||
public LayerOptions(String name,
|
||||
PathConfig config,
|
||||
float distance,
|
||||
float scale,
|
||||
int center,
|
||||
int heightVariation,
|
||||
boolean hasCentral) {
|
||||
public LayerOptions(
|
||||
String name,
|
||||
PathConfig config,
|
||||
float distance,
|
||||
float scale,
|
||||
int center,
|
||||
int heightVariation,
|
||||
boolean hasCentral
|
||||
) {
|
||||
this.distance = clampDistance(config.getFloat(name, "distance[1-8192]", distance));
|
||||
this.scale = clampScale(config.getFloat(name, "scale[0.1-1024]", scale));
|
||||
this.center = clampCenter(config.getInt(name, "averageHeight[0-255]", center));
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package org.betterx.betterend.world.generator;
|
||||
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.biome.BiomeSource;
|
||||
|
@ -8,10 +13,6 @@ import net.minecraft.world.level.levelgen.LegacyRandomSource;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiome;
|
||||
import org.betterx.bclib.api.v2.levelgen.biomes.BiomeAPI;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
import org.betterx.betterend.noise.OpenSimplexNoise;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
|
@ -59,11 +60,11 @@ public class TerrainGenerator {
|
|||
double distortion1 = noise1.eval(x * 0.1, z * 0.1) * 20 + noise2.eval(
|
||||
x * 0.2,
|
||||
z * 0.2
|
||||
) * 10 + noise1.eval(x * 0.4, z * 0.4) * 5;
|
||||
) * 10 + noise1.eval(x * 0.4, z * 0.4) * 5;
|
||||
double distortion2 = noise2.eval(x * 0.1, z * 0.1) * 20 + noise1.eval(
|
||||
x * 0.2,
|
||||
z * 0.2
|
||||
) * 10 + noise2.eval(x * 0.4, z * 0.4) * 5;
|
||||
) * 10 + noise2.eval(x * 0.4, z * 0.4) * 5;
|
||||
double px = (double) x * scaleXZ + distortion1;
|
||||
double pz = (double) z * scaleXZ + distortion2;
|
||||
|
||||
|
@ -160,11 +161,11 @@ public class TerrainGenerator {
|
|||
double distortion1 = noise1.eval(px * 0.1, pz * 0.1) * 20 + noise2.eval(px * 0.2, pz * 0.2) * 10 + noise1.eval(
|
||||
px * 0.4,
|
||||
pz * 0.4
|
||||
) * 5;
|
||||
) * 5;
|
||||
double distortion2 = noise2.eval(px * 0.1, pz * 0.1) * 20 + noise1.eval(px * 0.2, pz * 0.2) * 10 + noise2.eval(
|
||||
px * 0.4,
|
||||
pz * 0.4
|
||||
) * 5;
|
||||
) * 5;
|
||||
px = px * SCALE_XZ + distortion1;
|
||||
pz = pz * SCALE_XZ + distortion2;
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.world.structures.features;
|
||||
|
||||
import org.betterx.bclib.util.StructureHelper;
|
||||
import org.betterx.bclib.world.structures.BCLStructure;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.registry.EndStructures;
|
||||
import org.betterx.betterend.world.structures.piece.NBTPiece;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -12,12 +18,6 @@ import net.minecraft.world.level.levelgen.structure.StructureType;
|
|||
import net.minecraft.world.level.levelgen.structure.pieces.StructurePiecesBuilder;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
||||
|
||||
import org.betterx.bclib.util.StructureHelper;
|
||||
import org.betterx.bclib.world.structures.BCLStructure;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.registry.EndStructures;
|
||||
import org.betterx.betterend.world.structures.piece.NBTPiece;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class EternalPortalStructure extends FeatureBaseStructure {
|
||||
|
@ -47,7 +47,7 @@ public class EternalPortalStructure extends FeatureBaseStructure {
|
|||
Heightmap.Types.WORLD_SURFACE_WG,
|
||||
levelHeightAccessor,
|
||||
context.randomState()
|
||||
) < 5) {
|
||||
) < 5) {
|
||||
return Optional.empty();
|
||||
}
|
||||
return super.findGenerationPoint(context);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue