mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 12:09:07 +00:00
God dammit lombok
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
package com.volmit.iris.gen.layer;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.gen.ContextualTerrainProvider;
|
||||
import com.volmit.iris.noise.CNG;
|
||||
import com.volmit.iris.object.InferredType;
|
||||
import com.volmit.iris.object.IrisBiome;
|
||||
import com.volmit.iris.object.IrisGeneratorStyle;
|
||||
import com.volmit.iris.object.IrisRegion;
|
||||
import com.volmit.iris.util.RNG;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
|
||||
@Data
|
||||
public class BiomeDataProvider
|
||||
@@ -16,11 +19,19 @@ public class BiomeDataProvider
|
||||
private CNG generator;
|
||||
private GenLayerBiome layer;
|
||||
|
||||
public BiomeDataProvider(GenLayerBiome layer, InferredType type, RNG rng)
|
||||
public BiomeDataProvider(@NonNull GenLayerBiome layer, @NonNull InferredType type, @NonNull RNG rng)
|
||||
{
|
||||
this.type = type;
|
||||
this.layer = layer;
|
||||
generator = layer.getIris().getDimension().getBiomeStyle(type).create(rng.nextParallelRNG(4645079 + (type.ordinal() * 23845)));
|
||||
|
||||
IrisGeneratorStyle b = layer.getIris().getDimension().getBiomeStyle(type);
|
||||
|
||||
if(b == null)
|
||||
{
|
||||
Iris.error("BIOME STYLE IS NULL FOR " + type);
|
||||
}
|
||||
|
||||
generator = b.create(rng.nextParallelRNG(4645079 + (type.ordinal() * 23845)));
|
||||
}
|
||||
|
||||
public IrisBiome generatePureData(ContextualTerrainProvider g, double bx, double bz, int rawX, int rawZ, IrisRegion regionData)
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.volmit.iris.util.RNG;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NonNull;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -32,7 +33,7 @@ public class GenLayerBiome extends GenLayer
|
||||
private BiomeDataProvider lakeProvider;
|
||||
private DimensionalTerrainProvider iris;
|
||||
|
||||
public GenLayerBiome(DimensionalTerrainProvider iris, RNG rng)
|
||||
public GenLayerBiome(@NonNull DimensionalTerrainProvider iris, @NonNull RNG rng)
|
||||
{
|
||||
super(iris, rng);
|
||||
this.iris = iris;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class GenLayerCave extends GenLayer
|
||||
|
||||
public GenLayerCave(DimensionalTerrainProvider iris, RNG rng)
|
||||
{
|
||||
//@builder
|
||||
//@NoArgsConstructor
|
||||
super(iris, rng);
|
||||
gg = new FastNoiseDouble(324895 * rng.nextParallelRNG(49678).imax());
|
||||
//@done
|
||||
|
||||
@@ -106,7 +106,7 @@ public class NMSCreator141
|
||||
}
|
||||
DimensionManager actualDimension = DimensionManager.a((int) creator.environment().getId());
|
||||
DimensionManager internalDimension = DimensionManager.register((String) name.toLowerCase(Locale.ENGLISH), (DimensionManager) new DimensionManager(dimension, actualDimension.getSuffix(), actualDimension.folder, (w, manager) -> (WorldProvider) manager.providerFactory.apply(w, manager), actualDimension.hasSkyLight(), actualDimension));
|
||||
//@builder
|
||||
//@NoArgsConstructor
|
||||
WorldServer internal = new WorldServer(
|
||||
(MinecraftServer)console,
|
||||
console.executorService,
|
||||
|
||||
@@ -106,7 +106,7 @@ public class NMSCreator151
|
||||
}
|
||||
DimensionManager actualDimension = DimensionManager.a((int) creator.environment().getId());
|
||||
DimensionManager internalDimension = DimensionManager.register((String) name.toLowerCase(Locale.ENGLISH), (DimensionManager) new DimensionManager(dimension, actualDimension.getSuffix(), actualDimension.folder, (w, manager) -> (WorldProvider) manager.providerFactory.apply(w, manager), actualDimension.hasSkyLight(), actualDimension.getGenLayerZoomer(), actualDimension));
|
||||
//@builder
|
||||
//@NoArgsConstructor
|
||||
WorldServer internal = new WorldServer(
|
||||
(MinecraftServer)console,
|
||||
console.executorService,
|
||||
|
||||
@@ -165,7 +165,7 @@ public class NMSCreator161
|
||||
ResourceKey typeKey = (ResourceKey) console.f.a().c(dimensionmanager).orElseThrow(() -> new IllegalStateException("Unregistered dimension type: " + (Object) dimensionmanager));
|
||||
ResourceKey worldKey = ResourceKey.a((ResourceKey) IRegistry.ae, (MinecraftKey) new MinecraftKey(name.toLowerCase(Locale.ENGLISH)));
|
||||
|
||||
//@builder
|
||||
//@NoArgsConstructor
|
||||
WorldServer internal = new WorldServer(
|
||||
(MinecraftServer)console,
|
||||
console.executorService,
|
||||
|
||||
@@ -160,7 +160,7 @@ public class NMSCreator162
|
||||
}
|
||||
|
||||
final ResourceKey<net.minecraft.server.v1_16_R2.World> worldKey = (ResourceKey<net.minecraft.server.v1_16_R2.World>) ResourceKey.a(IRegistry.L, new MinecraftKey(name.toLowerCase(Locale.ENGLISH)));
|
||||
//@builder
|
||||
//@NoArgsConstructor
|
||||
final WorldServer internal = new WorldServer((MinecraftServer) console,
|
||||
console.executorService, worldSession,
|
||||
(IWorldDataServer) worlddata,
|
||||
|
||||
@@ -163,7 +163,7 @@ public class PostMasterPatcher extends IrisPostBlockFilter
|
||||
// Slab
|
||||
if(gen.getDimension().isPostProcessingSlabs())
|
||||
{
|
||||
//@builder
|
||||
//@NoArgsConstructor
|
||||
if((ha == h + 1 && isSolidNonSlab(x + 1, ha, z, currentPostX, currentPostZ, currentData))
|
||||
|| (hb == h + 1 && isSolidNonSlab(x, hb, z + 1, currentPostX, currentPostZ, currentData))
|
||||
|| (hc == h + 1 && isSolidNonSlab(x - 1, hc, z, currentPostX, currentPostZ, currentData))
|
||||
@@ -323,7 +323,7 @@ public class PostMasterPatcher extends IrisPostBlockFilter
|
||||
|
||||
if(gen.getDimension().isPostProcessingSlabs())
|
||||
{
|
||||
//@builder
|
||||
//@NoArgsConstructor
|
||||
if((fa == f + 1 && isSolidNonSlab(x + 1, fa, z, currentPostX, currentPostZ, currentData))
|
||||
|| (fb == f + 1 && isSolidNonSlab(x, fb, z + 1, currentPostX, currentPostZ, currentData))
|
||||
|| (fc == f + 1 && isSolidNonSlab(x - 1, fc, z, currentPostX, currentPostZ, currentData))
|
||||
@@ -358,7 +358,7 @@ public class PostMasterPatcher extends IrisPostBlockFilter
|
||||
}
|
||||
}
|
||||
|
||||
//@builder
|
||||
//@NoArgsConstructor
|
||||
if((ca == c - 1 && isSolidNonSlab(x + 1, ca, z, currentPostX, currentPostZ, currentData))
|
||||
|| (cb == c - 1 && isSolidNonSlab(x, cb, z + 1, currentPostX, currentPostZ, currentData))
|
||||
|| (cc == c - 1 && isSolidNonSlab(x - 1, cc, z, currentPostX, currentPostZ, currentData))
|
||||
|
||||
@@ -37,14 +37,8 @@ public class TerrainTarget
|
||||
|
||||
public static TerrainTarget from(World world)
|
||||
{
|
||||
//@builder
|
||||
return new TerrainTargetBuilder()
|
||||
.environment(world.getEnvironment())
|
||||
.seed(world.getSeed())
|
||||
.folder(world.getWorldFolder())
|
||||
.name(world.getName())
|
||||
.realWorld(world)
|
||||
.build();
|
||||
// @NoArgsConstructor
|
||||
return new TerrainTargetBuilder().environment(world.getEnvironment()).seed(world.getSeed()).folder(world.getWorldFolder()).name(world.getName()).realWorld(world).build();
|
||||
//@done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user