Recipe fixes, replaced spaces with tabs
This commit is contained in:
parent
5ca6a92dd0
commit
d8de624fd1
60 changed files with 1816 additions and 1851 deletions
|
@ -102,7 +102,7 @@ public class BCLFeature {
|
|||
* @param veins iterations per chunk.
|
||||
* @param veinSize size of ore vein.
|
||||
* @param minY A {@link VerticalAnchor} for the minimum height, for example
|
||||
* {@code VerticalAnchor.bottom()}, {@code VerticalAnchor.absolute(10)}, {@code VerticalAnchor.aboveBottom(10)}
|
||||
* {@code VerticalAnchor.bottom()}, {@code VerticalAnchor.absolute(10)}, {@code VerticalAnchor.aboveBottom(10)}
|
||||
* @param maxY A {@link VerticalAnchor} for the maximum height.
|
||||
* @return new BCLFeature instance.
|
||||
*/
|
||||
|
@ -113,15 +113,15 @@ public class BCLFeature {
|
|||
/**
|
||||
* Will create a basic ore feature.
|
||||
*
|
||||
* @param id {@link ResourceLocation} feature ID.
|
||||
* @param id {@link ResourceLocation} feature ID.
|
||||
* @param blockOre {@link Decoration} feature step.
|
||||
* @param hostBlock {@link Block} to generate feature in.
|
||||
* @param veins iterations per chunk.
|
||||
* @param veins iterations per chunk.
|
||||
* @param veinSize size of ore vein.
|
||||
* @param minY A {@link VerticalAnchor} for the minimum height, for example
|
||||
* {@code VerticalAnchor.bottom()}, {@code VerticalAnchor.absolute(10)}, {@code VerticalAnchor.aboveBottom(10)}
|
||||
* {@code VerticalAnchor.bottom()}, {@code VerticalAnchor.absolute(10)}, {@code VerticalAnchor.aboveBottom(10)}
|
||||
* @param maxY A {@link VerticalAnchor} for the maximum height.
|
||||
* @param rare when true, this is placed as a rare resource
|
||||
* @param rare when true, this is placed as a rare resource
|
||||
* @return new BCLFeature instance.
|
||||
*/
|
||||
public static BCLFeature makeOreFeature(ResourceLocation id, Block blockOre, Block hostBlock, int veins, int veinSize, VerticalAnchor minY, VerticalAnchor maxY, boolean rare) {
|
||||
|
@ -131,14 +131,14 @@ public class BCLFeature {
|
|||
/**
|
||||
* Will create a basic ore feature.
|
||||
*
|
||||
* @param id {@link ResourceLocation} feature ID.
|
||||
* @param id {@link ResourceLocation} feature ID.
|
||||
* @param blockOre {@link Decoration} feature step.
|
||||
* @param hostBlock {@link Block} to generate feature in.
|
||||
* @param veins iterations per chunk.
|
||||
* @param veins iterations per chunk.
|
||||
* @param veinSize size of ore vein.
|
||||
* @param placement {@link net.minecraft.world.level.levelgen.placement.PlacementModifier} for the ore distribution,
|
||||
* for example {@code PlacementUtils.FULL_RANGE}, {@code PlacementUtils.RANGE_10_10}
|
||||
* @param rare when true, this is placed as a rare resource
|
||||
* for example {@code PlacementUtils.FULL_RANGE}, {@code PlacementUtils.RANGE_10_10}
|
||||
* @param rare when true, this is placed as a rare resource
|
||||
* @return new BCLFeature instance.
|
||||
*/
|
||||
public static BCLFeature makeOreFeature(ResourceLocation id, Block blockOre, Block hostBlock, int veins, int veinSize, PlacementModifier placement, boolean rare) {
|
||||
|
|
|
@ -8,20 +8,20 @@ import ru.bclib.api.biomes.BiomeAPI;
|
|||
import java.util.List;
|
||||
|
||||
public abstract class BCLBiomeSource extends BiomeSource {
|
||||
protected final Registry<Biome> biomeRegistry;
|
||||
protected final long seed;
|
||||
protected final Registry<Biome> biomeRegistry;
|
||||
protected final long seed;
|
||||
|
||||
private static List<Biome> preInit(Registry<Biome> biomeRegistry, List<Biome> biomes){
|
||||
biomes.forEach(biome -> BiomeAPI.sortBiomeFeatures(biome));
|
||||
return biomes;
|
||||
}
|
||||
private static List<Biome> preInit(Registry<Biome> biomeRegistry, List<Biome> biomes){
|
||||
biomes.forEach(biome -> BiomeAPI.sortBiomeFeatures(biome));
|
||||
return biomes;
|
||||
}
|
||||
|
||||
protected BCLBiomeSource(Registry<Biome> biomeRegistry, long seed, List<Biome> list) {
|
||||
super(preInit(biomeRegistry, list));
|
||||
protected BCLBiomeSource(Registry<Biome> biomeRegistry, long seed, List<Biome> list) {
|
||||
super(preInit(biomeRegistry, list));
|
||||
|
||||
this.seed = seed;
|
||||
this.biomeRegistry = biomeRegistry;
|
||||
this.seed = seed;
|
||||
this.biomeRegistry = biomeRegistry;
|
||||
|
||||
BiomeAPI.initRegistry(biomeRegistry);
|
||||
}
|
||||
BiomeAPI.initRegistry(biomeRegistry);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,20 +32,20 @@ public class BCLibNetherBiomeSource extends BCLBiomeSource {
|
|||
});
|
||||
private BiomeMap biomeMap;
|
||||
|
||||
private static boolean forceLegacyGenerator = false;
|
||||
private static boolean forceLegacyGenerator = false;
|
||||
private static int lastWorldHeight;
|
||||
private static int worldHeight;
|
||||
|
||||
/**
|
||||
* When true, the older square generator is used for the nether.
|
||||
/**
|
||||
* When true, the older square generator is used for the nether.
|
||||
*
|
||||
* This override is used (for example) by BetterNether to force the legacy generation for worlds
|
||||
* that were created before 1.18
|
||||
* @param val wether or not you want to force the old generatore.
|
||||
*/
|
||||
public static void setForceLegacyGeneration(boolean val){
|
||||
forceLegacyGenerator = val;
|
||||
}
|
||||
* @param val wether or not you want to force the old generatore.
|
||||
*/
|
||||
public static void setForceLegacyGeneration(boolean val){
|
||||
forceLegacyGenerator = val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set world height, used when Nether is larger than vanilla 128 blocks tall.
|
||||
|
|
|
@ -6,29 +6,29 @@ import ru.bclib.noise.OpenSimplexNoise;
|
|||
import ru.bclib.util.MHelper;
|
||||
|
||||
public class DoubleBlockSurfaceNoiseCondition extends SurfaceNoiseCondition {
|
||||
public static final DoubleBlockSurfaceNoiseCondition CONDITION = new DoubleBlockSurfaceNoiseCondition(0);
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(4141);
|
||||
public static final DoubleBlockSurfaceNoiseCondition CONDITION = new DoubleBlockSurfaceNoiseCondition(0);
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(4141);
|
||||
|
||||
private final double threshold;
|
||||
public DoubleBlockSurfaceNoiseCondition(double threshold){
|
||||
this.threshold = threshold;
|
||||
}
|
||||
private final double threshold;
|
||||
public DoubleBlockSurfaceNoiseCondition(double threshold){
|
||||
this.threshold = threshold;
|
||||
}
|
||||
|
||||
private static int lastX = Integer.MIN_VALUE;
|
||||
private static int lastZ = Integer.MIN_VALUE;
|
||||
private static double lastValue = 0;
|
||||
private static int lastX = Integer.MIN_VALUE;
|
||||
private static int lastZ = Integer.MIN_VALUE;
|
||||
private static double lastValue = 0;
|
||||
|
||||
@Override
|
||||
public boolean test(SurfaceRulesContextAccessor context) {
|
||||
final int x = context.getBlockX();
|
||||
final int z = context.getBlockZ();
|
||||
if (lastX==x && lastZ==z) return lastValue > threshold;
|
||||
@Override
|
||||
public boolean test(SurfaceRulesContextAccessor context) {
|
||||
final int x = context.getBlockX();
|
||||
final int z = context.getBlockZ();
|
||||
if (lastX==x && lastZ==z) return lastValue > threshold;
|
||||
|
||||
double value = NOISE.eval(x * 0.1, z * 0.1) + MHelper.randRange(-0.4, 0.4, MHelper.RANDOM);
|
||||
double value = NOISE.eval(x * 0.1, z * 0.1) + MHelper.randRange(-0.4, 0.4, MHelper.RANDOM);
|
||||
|
||||
lastX=x;
|
||||
lastZ=z;
|
||||
lastValue=value;
|
||||
return value > threshold;
|
||||
}
|
||||
lastX=x;
|
||||
lastZ=z;
|
||||
lastValue=value;
|
||||
return value > threshold;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue