mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-02 07:56:48 +00:00
God dammit lombok
This commit is contained in:
parent
087ab3815f
commit
5bd22f25b8
File diff suppressed because one or more lines are too long
@ -207,17 +207,8 @@ public class Iris extends MortarPlugin
|
|||||||
@Override
|
@Override
|
||||||
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id)
|
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id)
|
||||||
{
|
{
|
||||||
//@builder
|
// @NoArgsConstructor
|
||||||
return createProvisionBukkit(IrisGenConfiguration.builder()
|
return createProvisionBukkit(IrisGenConfiguration.builder().threads(IrisSettings.get().threads).target(TerrainTarget.builder().environment(Environment.NORMAL).folder(new File(worldName)).name(worldName).seed(worldName.hashCode()).build()).build());
|
||||||
.threads(IrisSettings.get().threads)
|
|
||||||
.target(TerrainTarget
|
|
||||||
.builder()
|
|
||||||
.environment(Environment.NORMAL)
|
|
||||||
.folder(new File(worldName))
|
|
||||||
.name(worldName)
|
|
||||||
.seed(worldName.hashCode())
|
|
||||||
.build()
|
|
||||||
).build());
|
|
||||||
//@done
|
//@done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,32 +338,13 @@ public class Iris extends MortarPlugin
|
|||||||
|
|
||||||
public void splash()
|
public void splash()
|
||||||
{
|
{
|
||||||
//@builder
|
// @NoArgsConstructor
|
||||||
String padd = Form.repeat(" ", 8);
|
String padd = Form.repeat(" ", 8);
|
||||||
String padd2 = Form.repeat(" ", 4);
|
String padd2 = Form.repeat(" ", 4);
|
||||||
String[] info = {
|
String[] info = {"", "", "", "", "", padd2 + C.GREEN + " Iris", padd2 + C.GRAY + " by " + C.randomColor() + "V" + C.randomColor() + "o" + C.randomColor() + "l" + C.randomColor() + "m" + C.randomColor() + "i" + C.randomColor() + "t" + C.randomColor() + "S" + C.randomColor() + "o" + C.randomColor() + "f" + C.randomColor() + "t" + C.randomColor() + "w" + C.randomColor() + "a" + C.randomColor() + "r" + C.randomColor() + "e", padd2 + C.GRAY + " v" + getDescription().getVersion(),
|
||||||
"",
|
};
|
||||||
"",
|
String[] splash = {padd + C.GRAY + " @@@@@@@@@@@@@@" + C.DARK_GRAY + "@@@", padd + C.GRAY + " @@&&&&&&&&&" + C.DARK_GRAY + "&&&&&&" + C.GREEN + " .(((()))). ", padd + C.GRAY + "@@@&&&&&&&&" + C.DARK_GRAY + "&&&&&" + C.GREEN + " .((((((())))))). ", padd + C.GRAY + "@@@&&&&&" + C.DARK_GRAY + "&&&&&&&" + C.GREEN + " ((((((((())))))))) " + C.GRAY + " @", padd + C.GRAY + "@@@&&&&" + C.DARK_GRAY + "@@@@@&" + C.GREEN + " ((((((((-))))))))) " + C.GRAY + " @@", padd + C.GRAY + "@@@&&" + C.GREEN + " ((((((({ })))))))) " + C.GRAY + " &&@@@", padd + C.GRAY + "@@" + C.GREEN + " ((((((((-))))))))) " + C.DARK_GRAY + "&@@@@@" + C.GRAY + "&&&&@@@", padd + C.GRAY + "@" + C.GREEN + " ((((((((())))))))) " + C.DARK_GRAY + "&&&&&" + C.GRAY + "&&&&&&&@@@", padd + C.GRAY + "" + C.GREEN + " '((((((()))))))' " + C.DARK_GRAY + "&&&&&" + C.GRAY + "&&&&&&&&@@@", padd + C.GRAY + "" + C.GREEN + " '(((())))' " + C.DARK_GRAY + "%%&&&&&&" + C.GRAY + "&&&&&&&@@", padd + C.GRAY + " " + C.DARK_GRAY + "@@@" + C.GRAY + "@@@@@@@@@@@@@@"
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
padd2 + C.GREEN + " Iris",
|
|
||||||
padd2 + C.GRAY + " by "+C.randomColor()+"V"+C.randomColor()+"o"+C.randomColor()+"l"+C.randomColor()+"m"+C.randomColor()+"i"+C.randomColor()+"t"+C.randomColor()+"S"+C.randomColor()+"o"+C.randomColor()+"f"+C.randomColor()+"t"+C.randomColor()+"w"+C.randomColor()+"a"+C.randomColor()+"r"+C.randomColor()+"e",
|
|
||||||
padd2 + C.GRAY + " v" + getDescription().getVersion(),
|
|
||||||
};
|
};
|
||||||
String[] splash = {
|
|
||||||
padd + C.GRAY + " @@@@@@@@@@@@@@"+ C.DARK_GRAY +"@@@",
|
|
||||||
padd + C.GRAY + " @@&&&&&&&&&"+ C.DARK_GRAY +"&&&&&&" + C.GREEN + " .(((()))). ",
|
|
||||||
padd + C.GRAY + "@@@&&&&&&&&"+ C.DARK_GRAY +"&&&&&" + C.GREEN + " .((((((())))))). ",
|
|
||||||
padd + C.GRAY + "@@@&&&&&"+ C.DARK_GRAY +"&&&&&&&" + C.GREEN + " ((((((((())))))))) " + C.GRAY + " @",
|
|
||||||
padd + C.GRAY + "@@@&&&&"+ C.DARK_GRAY +"@@@@@&" + C.GREEN + " ((((((((-))))))))) " + C.GRAY + " @@",
|
|
||||||
padd + C.GRAY + "@@@&&" + C.GREEN + " ((((((({ })))))))) " + C.GRAY + " &&@@@",
|
|
||||||
padd + C.GRAY + "@@" + C.GREEN + " ((((((((-))))))))) " + C.DARK_GRAY + "&@@@@@"+ C.GRAY +"&&&&@@@",
|
|
||||||
padd + C.GRAY + "@" + C.GREEN + " ((((((((())))))))) " + C.DARK_GRAY + "&&&&&"+ C.GRAY +"&&&&&&&@@@",
|
|
||||||
padd + C.GRAY + "" + C.GREEN + " '((((((()))))))' " + C.DARK_GRAY + "&&&&&"+ C.GRAY +"&&&&&&&&@@@",
|
|
||||||
padd + C.GRAY + "" + C.GREEN + " '(((())))' " + C.DARK_GRAY + "%%&&&&&&"+ C.GRAY +"&&&&&&&@@",
|
|
||||||
padd + C.GRAY + " "+C.DARK_GRAY+"@@@"+C.GRAY+"@@@@@@@@@@@@@@"
|
|
||||||
};
|
|
||||||
//@done
|
//@done
|
||||||
Iris.info(Bukkit.getVersion());
|
Iris.info(Bukkit.getVersion());
|
||||||
Iris.info(Bukkit.getBukkitVersion() + " bk");
|
Iris.info(Bukkit.getBukkitVersion() + " bk");
|
||||||
|
@ -142,7 +142,7 @@ public class CommandIrisCreate extends MortarCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(worldName + " type installed. Generating Spawn Area...");
|
sender.sendMessage(worldName + " type installed. Generating Spawn Area...");
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
ProvisionBukkit gen = Iris.instance.createProvisionBukkit(
|
ProvisionBukkit gen = Iris.instance.createProvisionBukkit(
|
||||||
IrisGenConfiguration.builder()
|
IrisGenConfiguration.builder()
|
||||||
.threads(IrisSettings.get().threads)
|
.threads(IrisSettings.get().threads)
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
package com.volmit.iris.gen.layer;
|
package com.volmit.iris.gen.layer;
|
||||||
|
|
||||||
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.gen.ContextualTerrainProvider;
|
import com.volmit.iris.gen.ContextualTerrainProvider;
|
||||||
import com.volmit.iris.noise.CNG;
|
import com.volmit.iris.noise.CNG;
|
||||||
import com.volmit.iris.object.InferredType;
|
import com.volmit.iris.object.InferredType;
|
||||||
import com.volmit.iris.object.IrisBiome;
|
import com.volmit.iris.object.IrisBiome;
|
||||||
|
import com.volmit.iris.object.IrisGeneratorStyle;
|
||||||
import com.volmit.iris.object.IrisRegion;
|
import com.volmit.iris.object.IrisRegion;
|
||||||
import com.volmit.iris.util.RNG;
|
import com.volmit.iris.util.RNG;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NonNull;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class BiomeDataProvider
|
public class BiomeDataProvider
|
||||||
@ -16,11 +19,19 @@ public class BiomeDataProvider
|
|||||||
private CNG generator;
|
private CNG generator;
|
||||||
private GenLayerBiome layer;
|
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.type = type;
|
||||||
this.layer = layer;
|
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)
|
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.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NonNull;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ -32,7 +33,7 @@ public class GenLayerBiome extends GenLayer
|
|||||||
private BiomeDataProvider lakeProvider;
|
private BiomeDataProvider lakeProvider;
|
||||||
private DimensionalTerrainProvider iris;
|
private DimensionalTerrainProvider iris;
|
||||||
|
|
||||||
public GenLayerBiome(DimensionalTerrainProvider iris, RNG rng)
|
public GenLayerBiome(@NonNull DimensionalTerrainProvider iris, @NonNull RNG rng)
|
||||||
{
|
{
|
||||||
super(iris, rng);
|
super(iris, rng);
|
||||||
this.iris = iris;
|
this.iris = iris;
|
||||||
|
@ -29,7 +29,7 @@ public class GenLayerCave extends GenLayer
|
|||||||
|
|
||||||
public GenLayerCave(DimensionalTerrainProvider iris, RNG rng)
|
public GenLayerCave(DimensionalTerrainProvider iris, RNG rng)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
super(iris, rng);
|
super(iris, rng);
|
||||||
gg = new FastNoiseDouble(324895 * rng.nextParallelRNG(49678).imax());
|
gg = new FastNoiseDouble(324895 * rng.nextParallelRNG(49678).imax());
|
||||||
//@done
|
//@done
|
||||||
|
@ -106,7 +106,7 @@ public class NMSCreator141
|
|||||||
}
|
}
|
||||||
DimensionManager actualDimension = DimensionManager.a((int) creator.environment().getId());
|
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));
|
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(
|
WorldServer internal = new WorldServer(
|
||||||
(MinecraftServer)console,
|
(MinecraftServer)console,
|
||||||
console.executorService,
|
console.executorService,
|
||||||
|
@ -106,7 +106,7 @@ public class NMSCreator151
|
|||||||
}
|
}
|
||||||
DimensionManager actualDimension = DimensionManager.a((int) creator.environment().getId());
|
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));
|
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(
|
WorldServer internal = new WorldServer(
|
||||||
(MinecraftServer)console,
|
(MinecraftServer)console,
|
||||||
console.executorService,
|
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 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)));
|
ResourceKey worldKey = ResourceKey.a((ResourceKey) IRegistry.ae, (MinecraftKey) new MinecraftKey(name.toLowerCase(Locale.ENGLISH)));
|
||||||
|
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
WorldServer internal = new WorldServer(
|
WorldServer internal = new WorldServer(
|
||||||
(MinecraftServer)console,
|
(MinecraftServer)console,
|
||||||
console.executorService,
|
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)));
|
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,
|
final WorldServer internal = new WorldServer((MinecraftServer) console,
|
||||||
console.executorService, worldSession,
|
console.executorService, worldSession,
|
||||||
(IWorldDataServer) worlddata,
|
(IWorldDataServer) worlddata,
|
||||||
|
@ -163,7 +163,7 @@ public class PostMasterPatcher extends IrisPostBlockFilter
|
|||||||
// Slab
|
// Slab
|
||||||
if(gen.getDimension().isPostProcessingSlabs())
|
if(gen.getDimension().isPostProcessingSlabs())
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
if((ha == h + 1 && isSolidNonSlab(x + 1, ha, z, currentPostX, currentPostZ, currentData))
|
if((ha == h + 1 && isSolidNonSlab(x + 1, ha, z, currentPostX, currentPostZ, currentData))
|
||||||
|| (hb == h + 1 && isSolidNonSlab(x, hb, z + 1, 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))
|
|| (hc == h + 1 && isSolidNonSlab(x - 1, hc, z, currentPostX, currentPostZ, currentData))
|
||||||
@ -323,7 +323,7 @@ public class PostMasterPatcher extends IrisPostBlockFilter
|
|||||||
|
|
||||||
if(gen.getDimension().isPostProcessingSlabs())
|
if(gen.getDimension().isPostProcessingSlabs())
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
if((fa == f + 1 && isSolidNonSlab(x + 1, fa, z, currentPostX, currentPostZ, currentData))
|
if((fa == f + 1 && isSolidNonSlab(x + 1, fa, z, currentPostX, currentPostZ, currentData))
|
||||||
|| (fb == f + 1 && isSolidNonSlab(x, fb, z + 1, 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))
|
|| (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))
|
if((ca == c - 1 && isSolidNonSlab(x + 1, ca, z, currentPostX, currentPostZ, currentData))
|
||||||
|| (cb == c - 1 && isSolidNonSlab(x, cb, z + 1, 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))
|
|| (cc == c - 1 && isSolidNonSlab(x - 1, cc, z, currentPostX, currentPostZ, currentData))
|
||||||
|
@ -37,14 +37,8 @@ public class TerrainTarget
|
|||||||
|
|
||||||
public static TerrainTarget from(World world)
|
public static TerrainTarget from(World world)
|
||||||
{
|
{
|
||||||
//@builder
|
// @NoArgsConstructor
|
||||||
return new TerrainTargetBuilder()
|
return new TerrainTargetBuilder().environment(world.getEnvironment()).seed(world.getSeed()).folder(world.getWorldFolder()).name(world.getName()).realWorld(world).build();
|
||||||
.environment(world.getEnvironment())
|
|
||||||
.seed(world.getSeed())
|
|
||||||
.folder(world.getWorldFolder())
|
|
||||||
.name(world.getName())
|
|
||||||
.realWorld(world)
|
|
||||||
.build();
|
|
||||||
//@done
|
//@done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ public class IrisBoardManager implements BoardProvider, Listener
|
|||||||
public IrisBoardManager()
|
public IrisBoardManager()
|
||||||
{
|
{
|
||||||
Iris.instance.registerListener(this);
|
Iris.instance.registerListener(this);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
manager = new BoardManager(Iris.instance, BoardSettings.builder()
|
manager = new BoardManager(Iris.instance, BoardSettings.builder()
|
||||||
.boardProvider(this)
|
.boardProvider(this)
|
||||||
.scoreDirection(ScoreDirection.DOWN)
|
.scoreDirection(ScoreDirection.DOWN)
|
||||||
|
@ -52,6 +52,7 @@ import com.volmit.iris.object.IrisStructureTile;
|
|||||||
import com.volmit.iris.object.NoiseStyle;
|
import com.volmit.iris.object.NoiseStyle;
|
||||||
import com.volmit.iris.object.StructureTileCondition;
|
import com.volmit.iris.object.StructureTileCondition;
|
||||||
import com.volmit.iris.util.ArrayType;
|
import com.volmit.iris.util.ArrayType;
|
||||||
|
import com.volmit.iris.util.B;
|
||||||
import com.volmit.iris.util.C;
|
import com.volmit.iris.util.C;
|
||||||
import com.volmit.iris.util.ChronoLatch;
|
import com.volmit.iris.util.ChronoLatch;
|
||||||
import com.volmit.iris.util.DependsOn;
|
import com.volmit.iris.util.DependsOn;
|
||||||
@ -71,6 +72,7 @@ import com.volmit.iris.util.MinNumber;
|
|||||||
import com.volmit.iris.util.MortarSender;
|
import com.volmit.iris.util.MortarSender;
|
||||||
import com.volmit.iris.util.O;
|
import com.volmit.iris.util.O;
|
||||||
import com.volmit.iris.util.RegistryListBiome;
|
import com.volmit.iris.util.RegistryListBiome;
|
||||||
|
import com.volmit.iris.util.RegistryListBlockType;
|
||||||
import com.volmit.iris.util.RegistryListDimension;
|
import com.volmit.iris.util.RegistryListDimension;
|
||||||
import com.volmit.iris.util.RegistryListEntity;
|
import com.volmit.iris.util.RegistryListEntity;
|
||||||
import com.volmit.iris.util.RegistryListFont;
|
import com.volmit.iris.util.RegistryListFont;
|
||||||
@ -372,7 +374,7 @@ public class ProjectManager
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
World world = NMSCreator.createWorld(new WorldCreator(wfp)
|
World world = NMSCreator.createWorld(new WorldCreator(wfp)
|
||||||
.seed(1337)
|
.seed(1337)
|
||||||
.generator(gen)
|
.generator(gen)
|
||||||
@ -1124,6 +1126,11 @@ public class ProjectManager
|
|||||||
prop.put("enum", new JSONArray(getBiomeList(dat)));
|
prop.put("enum", new JSONArray(getBiomeList(dat)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(k.isAnnotationPresent(RegistryListBlockType.class))
|
||||||
|
{
|
||||||
|
prop.put("enum", new JSONArray(getBlockTypeList(dat)));
|
||||||
|
}
|
||||||
|
|
||||||
if(k.isAnnotationPresent(RegistryListEntity.class))
|
if(k.isAnnotationPresent(RegistryListEntity.class))
|
||||||
{
|
{
|
||||||
prop.put("enum", new JSONArray(getEntityList(dat)));
|
prop.put("enum", new JSONArray(getEntityList(dat)));
|
||||||
@ -1290,6 +1297,26 @@ public class ProjectManager
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(k.isAnnotationPresent(RegistryListBlockType.class))
|
||||||
|
{
|
||||||
|
String name = "enblk" + t.type().getSimpleName().toLowerCase();
|
||||||
|
if(!def.containsKey(name))
|
||||||
|
{
|
||||||
|
JSONObject deff = new JSONObject();
|
||||||
|
deff.put("type", tx);
|
||||||
|
deff.put("enum", new JSONArray(getBlockTypeList(dat)));
|
||||||
|
def.put(name, deff);
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject items = new JSONObject();
|
||||||
|
items.put("$ref", "#/definitions/" + name);
|
||||||
|
prop.put("items", items);
|
||||||
|
prop.put("description", tp + "\n\n" + k.getAnnotation(Desc.class).value());
|
||||||
|
prop.put("type", tp);
|
||||||
|
properties.put(k.getName(), prop);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(k.isAnnotationPresent(RegistryListEntity.class))
|
if(k.isAnnotationPresent(RegistryListEntity.class))
|
||||||
{
|
{
|
||||||
String name = "enent" + t.type().getSimpleName().toLowerCase();
|
String name = "enent" + t.type().getSimpleName().toLowerCase();
|
||||||
@ -1627,6 +1654,11 @@ public class ProjectManager
|
|||||||
return data.getBiomeLoader().getPossibleKeys();
|
return data.getBiomeLoader().getPossibleKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String[] getBlockTypeList(IrisDataManager data)
|
||||||
|
{
|
||||||
|
return B.getBlockTypes();
|
||||||
|
}
|
||||||
|
|
||||||
private String[] getEntityList(IrisDataManager data)
|
private String[] getEntityList(IrisDataManager data)
|
||||||
{
|
{
|
||||||
return data.getEntityLoader().getPossibleKeys();
|
return data.getEntityLoader().getPossibleKeys();
|
||||||
|
@ -71,7 +71,7 @@ public class CNG
|
|||||||
|
|
||||||
public static CNG signature(RNG rng, NoiseType t)
|
public static CNG signature(RNG rng, NoiseType t)
|
||||||
{
|
{
|
||||||
// @builder
|
// @NoArgsConstructor
|
||||||
return new CNG(rng.nextParallelRNG(17), t, 1D, 1)
|
return new CNG(rng.nextParallelRNG(17), t, 1D, 1)
|
||||||
.fractureWith(
|
.fractureWith(
|
||||||
new CNG(rng.nextParallelRNG(18), 1, 1).scale(0.9)
|
new CNG(rng.nextParallelRNG(18), 1, 1).scale(0.9)
|
||||||
@ -84,7 +84,7 @@ public class CNG
|
|||||||
|
|
||||||
public static CNG signatureThick(RNG rng, NoiseType t)
|
public static CNG signatureThick(RNG rng, NoiseType t)
|
||||||
{
|
{
|
||||||
// @builder
|
// @NoArgsConstructor
|
||||||
return new CNG(rng.nextParallelRNG(133), t, 1D, 1)
|
return new CNG(rng.nextParallelRNG(133), t, 1D, 1)
|
||||||
.fractureWith(
|
.fractureWith(
|
||||||
new CNG(rng.nextParallelRNG(18), 1, 1).scale(0.5)
|
new CNG(rng.nextParallelRNG(18), 1, 1).scale(0.5)
|
||||||
@ -97,7 +97,7 @@ public class CNG
|
|||||||
|
|
||||||
public static CNG signatureHalf(RNG rng, NoiseType t)
|
public static CNG signatureHalf(RNG rng, NoiseType t)
|
||||||
{
|
{
|
||||||
// @builder
|
// @NoArgsConstructor
|
||||||
return new CNG(rng.nextParallelRNG(127), t, 1D, 1)
|
return new CNG(rng.nextParallelRNG(127), t, 1D, 1)
|
||||||
.fractureWith(
|
.fractureWith(
|
||||||
new CNG(rng.nextParallelRNG(18), 1, 1).scale(0.9)
|
new CNG(rng.nextParallelRNG(18), 1, 1).scale(0.9)
|
||||||
|
@ -14,57 +14,52 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@Desc("Represents an attribute modifier for an item or an entity. This allows you to create modifications to basic game attributes such as MAX_HEALTH or ARMOR_VALUE.")
|
@Desc("Represents an attribute modifier for an item or an entity. This allows you to create modifications to basic game attributes such as MAX_HEALTH or ARMOR_VALUE.")
|
||||||
@Data
|
@Data
|
||||||
public class IrisAttributeModifier
|
public class IrisAttributeModifier
|
||||||
{
|
{
|
||||||
@Required
|
@Required
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The Attribute type. This type is pulled from the game attributes. Zombie & Horse attributes will not work on non-zombie/horse entities.\nUsing an attribute on an item will have affects when held, or worn. There is no way to specify further granularity as the game picks this depending on the item type.")
|
@Desc("The Attribute type. This type is pulled from the game attributes. Zombie & Horse attributes will not work on non-zombie/horse entities.\nUsing an attribute on an item will have affects when held, or worn. There is no way to specify further granularity as the game picks this depending on the item type.")
|
||||||
private Attribute attribute = null;
|
private Attribute attribute = null;
|
||||||
|
|
||||||
@MinNumber(2)
|
@MinNumber(2)
|
||||||
@Required
|
@Required
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The Attribute Name is used internally only for the game. This value should be unique to all other attributes applied to this item/entity. It is not shown in game.")
|
@Desc("The Attribute Name is used internally only for the game. This value should be unique to all other attributes applied to this item/entity. It is not shown in game.")
|
||||||
private String name = "";
|
private String name = "";
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("The application operation (add number is default). Add Number adds to the default value. \nAdd scalar_1 will multiply by 1 for example if the health is 20 and you multiply_scalar_1 by 0.5, the health will result in 30, not 10. Use negative values to achieve that.")
|
@Desc("The application operation (add number is default). Add Number adds to the default value. \nAdd scalar_1 will multiply by 1 for example if the health is 20 and you multiply_scalar_1 by 0.5, the health will result in 30, not 10. Use negative values to achieve that.")
|
||||||
private Operation operation = Operation.ADD_NUMBER;
|
private Operation operation = Operation.ADD_NUMBER;
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Minimum amount for this modifier. Iris randomly chooses an amount, this is the minimum it can choose randomly for this attribute.")
|
@Desc("Minimum amount for this modifier. Iris randomly chooses an amount, this is the minimum it can choose randomly for this attribute.")
|
||||||
private double minAmount = 1;
|
private double minAmount = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Maximum amount for this modifier Iris randomly chooses an amount, this is the maximum it can choose randomly for this attribute.")
|
@Desc("Maximum amount for this modifier Iris randomly chooses an amount, this is the maximum it can choose randomly for this attribute.")
|
||||||
private double maxAmount = 1;
|
private double maxAmount = 1;
|
||||||
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The chance that this attribute is applied (0 to 1). If the chance is 0.5 (50%), then Iris will only apply this attribute 50% of the time.")
|
@Desc("The chance that this attribute is applied (0 to 1). If the chance is 0.5 (50%), then Iris will only apply this attribute 50% of the time.")
|
||||||
private double chance = 1;
|
private double chance = 1;
|
||||||
|
|
||||||
public IrisAttributeModifier()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void apply(RNG rng, ItemMeta meta)
|
public void apply(RNG rng, ItemMeta meta)
|
||||||
{
|
{
|
||||||
if(rng.nextDouble() < getChance())
|
if(rng.nextDouble() < getChance())
|
||||||
|
@ -9,19 +9,19 @@ import com.volmit.iris.util.MinNumber;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@Desc("Represents a rotation axis with intervals and maxes. The x and z axis values are defaulted to disabled. The Y axis defaults to on, rotating by 90 degree increments.")
|
@Desc("Represents a rotation axis with intervals and maxes. The x and z axis values are defaulted to disabled. The Y axis defaults to on, rotating by 90 degree increments.")
|
||||||
@Data
|
@Data
|
||||||
public class IrisAxisRotationClamp
|
public class IrisAxisRotationClamp
|
||||||
{
|
{
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Should this axis be rotated at all?")
|
@Desc("Should this axis be rotated at all?")
|
||||||
private boolean enabled = false;
|
private boolean enabled = false;
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ public class IrisAxisRotationClamp
|
|||||||
@DependsOn({"max"})
|
@DependsOn({"max"})
|
||||||
@MinNumber(-360)
|
@MinNumber(-360)
|
||||||
@MaxNumber(360)
|
@MaxNumber(360)
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The minimum angle (from) or set this and max to zero for any angle degrees. Set both to the same non-zero value to force it to that angle only")
|
@Desc("The minimum angle (from) or set this and max to zero for any angle degrees. Set both to the same non-zero value to force it to that angle only")
|
||||||
private double min = 0;
|
private double min = 0;
|
||||||
@ -38,7 +38,7 @@ public class IrisAxisRotationClamp
|
|||||||
@DependsOn({"min"})
|
@DependsOn({"min"})
|
||||||
@MinNumber(-360)
|
@MinNumber(-360)
|
||||||
@MaxNumber(360)
|
@MaxNumber(360)
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The maximum angle (to) or set this and min to zero for any angle degrees. Set both to the same non-zero value to force it to that angle only")
|
@Desc("The maximum angle (to) or set this and min to zero for any angle degrees. Set both to the same non-zero value to force it to that angle only")
|
||||||
private double max = 0;
|
private double max = 0;
|
||||||
@ -48,15 +48,10 @@ public class IrisAxisRotationClamp
|
|||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(360)
|
@MaxNumber(360)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Iris spins the axis but not freely. For example an interval of 90 would mean 4 possible angles (right angles) degrees. \nSetting this to 0 means totally free rotation.\n\nNote that a lot of structures can have issues with non 90 degree intervals because the minecraft block resolution is so low.")
|
@Desc("Iris spins the axis but not freely. For example an interval of 90 would mean 4 possible angles (right angles) degrees. \nSetting this to 0 means totally free rotation.\n\nNote that a lot of structures can have issues with non 90 degree intervals because the minecraft block resolution is so low.")
|
||||||
private double interval = 0;
|
private double interval = 0;
|
||||||
|
|
||||||
public IrisAxisRotationClamp()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isUnlimited()
|
public boolean isUnlimited()
|
||||||
{
|
{
|
||||||
return min == max && min == 0;
|
return min == max && min == 0;
|
||||||
|
@ -23,13 +23,13 @@ import com.volmit.iris.util.RegistryListBiome;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Represents a biome in iris. Biomes are placed inside of regions and hold objects.\nA biome consists of layers (block palletes), decorations, objects & generators.")
|
@Desc("Represents a biome in iris. Biomes are placed inside of regions and hold objects.\nA biome consists of layers (block palletes), decorations, objects & generators.")
|
||||||
@ -39,174 +39,174 @@ public class IrisBiome extends IrisRegistrant implements IRare
|
|||||||
{
|
{
|
||||||
@MinNumber(2)
|
@MinNumber(2)
|
||||||
@Required
|
@Required
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("This is the human readable name for this biome. This can and should be different than the file name. This is not used for loading biomes in other objects.")
|
@Desc("This is the human readable name for this biome. This can and should be different than the file name. This is not used for loading biomes in other objects.")
|
||||||
private String name = "A Biome";
|
private String name = "A Biome";
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Place text on terrain. Iris will render text into block schematics and randomly place them in this biome.")
|
@Desc("Place text on terrain. Iris will render text into block schematics and randomly place them in this biome.")
|
||||||
@ArrayType(min = 1, type = IrisTextPlacement.class)
|
@ArrayType(min = 1, type = IrisTextPlacement.class)
|
||||||
private KList<IrisTextPlacement> text = new KList<>();
|
private KList<IrisTextPlacement> text = new KList<>();
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("The type of fluid if this biome is underwater. To 'defer' this value to whatever the parent dimension fluid type is, use an emtpy string.")
|
@Desc("The type of fluid if this biome is underwater. To 'defer' this value to whatever the parent dimension fluid type is, use an emtpy string.")
|
||||||
private String fluidType = "";
|
private String fluidType = "";
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Entity spawns to override or add to this biome. Anytime an entity spawns, it has a chance to be replaced as one of these overrides.")
|
@Desc("Entity spawns to override or add to this biome. Anytime an entity spawns, it has a chance to be replaced as one of these overrides.")
|
||||||
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
||||||
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Entity spawns during generation")
|
@Desc("Entity spawns during generation")
|
||||||
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
||||||
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
||||||
|
|
||||||
@ArrayType(min = 1, type = IrisEffect.class)
|
@ArrayType(min = 1, type = IrisEffect.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Effects are ambient effects such as potion effects, random sounds, or even particles around each player. All of these effects are played via packets so two players won't see/hear each others effects.\nDue to performance reasons, effects will play arround the player even if where the effect was played is no longer in the biome the player is in.")
|
@Desc("Effects are ambient effects such as potion effects, random sounds, or even particles around each player. All of these effects are played via packets so two players won't see/hear each others effects.\nDue to performance reasons, effects will play arround the player even if where the effect was played is no longer in the biome the player is in.")
|
||||||
private KList<IrisEffect> effects = new KList<>();
|
private KList<IrisEffect> effects = new KList<>();
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"biomeStyle", "biomeZoom", "biomeScatter"})
|
@DependsOn({"biomeStyle", "biomeZoom", "biomeScatter"})
|
||||||
@Desc("This changes the dispersion of the biome colors if multiple derivatives are chosen.")
|
@Desc("This changes the dispersion of the biome colors if multiple derivatives are chosen.")
|
||||||
private IrisGeneratorStyle biomeStyle = NoiseStyle.SIMPLEX.style();
|
private IrisGeneratorStyle biomeStyle = NoiseStyle.SIMPLEX.style();
|
||||||
|
|
||||||
@ArrayType(min = 1, type = IrisBlockDrops.class)
|
@ArrayType(min = 1, type = IrisBlockDrops.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Define custom block drops for this biome")
|
@Desc("Define custom block drops for this biome")
|
||||||
private KList<IrisBlockDrops> blockDrops = new KList<>();
|
private KList<IrisBlockDrops> blockDrops = new KList<>();
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Reference loot tables in this area")
|
@Desc("Reference loot tables in this area")
|
||||||
private IrisLootReference loot = new IrisLootReference();
|
private IrisLootReference loot = new IrisLootReference();
|
||||||
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"biomeStyle", "biomeZoom", "biomeScatter"})
|
@DependsOn({"biomeStyle", "biomeZoom", "biomeScatter"})
|
||||||
@Desc("This zooms in the biome colors if multiple derivatives are chosen")
|
@Desc("This zooms in the biome colors if multiple derivatives are chosen")
|
||||||
private double biomeZoom = 1;
|
private double biomeZoom = 1;
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Layers no longer descend from the surface block, they descend from the max possible height the biome can produce (constant) creating mesa like layers.")
|
@Desc("Layers no longer descend from the surface block, they descend from the max possible height the biome can produce (constant) creating mesa like layers.")
|
||||||
private boolean lockLayers = false;
|
private boolean lockLayers = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The max layers to iterate below the surface for locked layer biomes (mesa).")
|
@Desc("The max layers to iterate below the surface for locked layer biomes (mesa).")
|
||||||
private int lockLayersMax = 7;
|
private int lockLayersMax = 7;
|
||||||
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@Builder.Default
|
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The rarity of this biome (integer)")
|
@Desc("The rarity of this biome (integer)")
|
||||||
private int rarity = 1;
|
private int rarity = 1;
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("A debug color for visualizing this biome with a color. I.e. #F13AF5")
|
@Desc("A debug color for visualizing this biome with a color. I.e. #F13AF5")
|
||||||
private String debugColor = "";
|
private String debugColor = "";
|
||||||
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("The raw derivative of this biome. This is required or the terrain will not properly generate. Use any vanilla biome type. Look in examples/biome-list.txt")
|
@Desc("The raw derivative of this biome. This is required or the terrain will not properly generate. Use any vanilla biome type. Look in examples/biome-list.txt")
|
||||||
private Biome derivative = Biome.THE_VOID;
|
private Biome derivative = Biome.THE_VOID;
|
||||||
|
|
||||||
@ArrayType(min = 1, type = Biome.class)
|
@ArrayType(min = 1, type = Biome.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("You can instead specify multiple biome derivatives to randomly scatter colors in this biome")
|
@Desc("You can instead specify multiple biome derivatives to randomly scatter colors in this biome")
|
||||||
private KList<Biome> biomeScatter = new KList<>();
|
private KList<Biome> biomeScatter = new KList<>();
|
||||||
|
|
||||||
@ArrayType(min = 1, type = Biome.class)
|
@ArrayType(min = 1, type = Biome.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Since 1.13 supports 3D biomes, you can add different derivative colors for anything above the terrain. (Think swampy tree leaves with a desert looking grass surface)")
|
@Desc("Since 1.13 supports 3D biomes, you can add different derivative colors for anything above the terrain. (Think swampy tree leaves with a desert looking grass surface)")
|
||||||
private KList<Biome> biomeSkyScatter = new KList<>();
|
private KList<Biome> biomeSkyScatter = new KList<>();
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"children"})
|
@DependsOn({"children"})
|
||||||
@Desc("If this biome has children biomes, and the gen layer chooses one of this biomes children, how much smaller will it be (inside of this biome). Higher values means a smaller biome relative to this biome's size. Set higher than 1.0 and below 3.0 for best results.")
|
@Desc("If this biome has children biomes, and the gen layer chooses one of this biomes children, how much smaller will it be (inside of this biome). Higher values means a smaller biome relative to this biome's size. Set higher than 1.0 and below 3.0 for best results.")
|
||||||
private double childShrinkFactor = 1.5;
|
private double childShrinkFactor = 1.5;
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"children"})
|
@DependsOn({"children"})
|
||||||
@Desc("If this biome has children biomes, and the gen layer chooses one of this biomes children, How will it be shaped?")
|
@Desc("If this biome has children biomes, and the gen layer chooses one of this biomes children, How will it be shaped?")
|
||||||
private IrisGeneratorStyle childStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle childStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("List any biome names (file names without.json) here as children. Portions of this biome can sometimes morph into their children. Iris supports cyclic relationships such as A > B > A > B. Iris will stop checking 9 biomes down the tree.")
|
@Desc("List any biome names (file names without.json) here as children. Portions of this biome can sometimes morph into their children. Iris supports cyclic relationships such as A > B > A > B. Iris will stop checking 9 biomes down the tree.")
|
||||||
private KList<String> children = new KList<>();
|
private KList<String> children = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The default slab if iris decides to place a slab in this biome. Default is no slab.")
|
@Desc("The default slab if iris decides to place a slab in this biome. Default is no slab.")
|
||||||
private IrisBiomePaletteLayer slab = new IrisBiomePaletteLayer().zero();
|
private IrisBiomePaletteLayer slab = new IrisBiomePaletteLayer().zero();
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("The default wall if iris decides to place a wall higher than 2 blocks (steep hills or possibly cliffs)")
|
@Desc("The default wall if iris decides to place a wall higher than 2 blocks (steep hills or possibly cliffs)")
|
||||||
private IrisBiomePaletteLayer wall = new IrisBiomePaletteLayer().zero();
|
private IrisBiomePaletteLayer wall = new IrisBiomePaletteLayer().zero();
|
||||||
|
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = IrisBiomePaletteLayer.class)
|
@ArrayType(min = 1, type = IrisBiomePaletteLayer.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("This defines the layers of materials in this biome. Each layer has a palette and min/max height and some other properties. Usually a grassy/sandy layer then a dirt layer then a stone layer. Iris will fill in the remaining blocks below your layers with stone.")
|
@Desc("This defines the layers of materials in this biome. Each layer has a palette and min/max height and some other properties. Usually a grassy/sandy layer then a dirt layer then a stone layer. Iris will fill in the remaining blocks below your layers with stone.")
|
||||||
private KList<IrisBiomePaletteLayer> layers = new KList<IrisBiomePaletteLayer>().qadd(new IrisBiomePaletteLayer());
|
private KList<IrisBiomePaletteLayer> layers = new KList<IrisBiomePaletteLayer>().qadd(new IrisBiomePaletteLayer());
|
||||||
|
|
||||||
@ArrayType(min = 1, type = IrisBiomePaletteLayer.class)
|
@ArrayType(min = 1, type = IrisBiomePaletteLayer.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("This defines the layers of materials in this biome. Each layer has a palette and min/max height and some other properties. Usually a grassy/sandy layer then a dirt layer then a stone layer. Iris will fill in the remaining blocks below your layers with stone.")
|
@Desc("This defines the layers of materials in this biome. Each layer has a palette and min/max height and some other properties. Usually a grassy/sandy layer then a dirt layer then a stone layer. Iris will fill in the remaining blocks below your layers with stone.")
|
||||||
private KList<IrisBiomePaletteLayer> seaLayers = new KList<IrisBiomePaletteLayer>();
|
private KList<IrisBiomePaletteLayer> seaLayers = new KList<IrisBiomePaletteLayer>();
|
||||||
|
|
||||||
@ArrayType(min = 1, type = IrisBiomeDecorator.class)
|
@ArrayType(min = 1, type = IrisBiomeDecorator.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Decorators are used for things like tall grass, bisected flowers, and even kelp or cactus (random heights)")
|
@Desc("Decorators are used for things like tall grass, bisected flowers, and even kelp or cactus (random heights)")
|
||||||
private KList<IrisBiomeDecorator> decorators = new KList<IrisBiomeDecorator>();
|
private KList<IrisBiomeDecorator> decorators = new KList<IrisBiomeDecorator>();
|
||||||
|
|
||||||
@ArrayType(min = 1, type = IrisObjectPlacement.class)
|
@ArrayType(min = 1, type = IrisObjectPlacement.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Objects define what schematics (iob files) iris will place in this biome")
|
@Desc("Objects define what schematics (iob files) iris will place in this biome")
|
||||||
private KList<IrisObjectPlacement> objects = new KList<IrisObjectPlacement>();
|
private KList<IrisObjectPlacement> objects = new KList<IrisObjectPlacement>();
|
||||||
|
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = IrisBiomeGeneratorLink.class)
|
@ArrayType(min = 1, type = IrisBiomeGeneratorLink.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Generators for this biome. Multiple generators with different interpolation sizes will mix with other biomes how you would expect. This defines your biome height relative to the fluid height. Use negative for oceans.")
|
@Desc("Generators for this biome. Multiple generators with different interpolation sizes will mix with other biomes how you would expect. This defines your biome height relative to the fluid height. Use negative for oceans.")
|
||||||
private KList<IrisBiomeGeneratorLink> generators = new KList<IrisBiomeGeneratorLink>().qadd(new IrisBiomeGeneratorLink());
|
private KList<IrisBiomeGeneratorLink> generators = new KList<IrisBiomeGeneratorLink>().qadd(new IrisBiomeGeneratorLink());
|
||||||
|
|
||||||
@ArrayType(min = 1, type = IrisStructurePlacement.class)
|
@ArrayType(min = 1, type = IrisStructurePlacement.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("A list of structure tilesets")
|
@Desc("A list of structure tilesets")
|
||||||
private KList<IrisStructurePlacement> structures = new KList<>();
|
private KList<IrisStructurePlacement> structures = new KList<>();
|
||||||
|
|
||||||
@ArrayType(min = 1, type = IrisDepositGenerator.class)
|
@ArrayType(min = 1, type = IrisDepositGenerator.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Define biome deposit generators that add onto the existing regional and global deposit generators")
|
@Desc("Define biome deposit generators that add onto the existing regional and global deposit generators")
|
||||||
private KList<IrisDepositGenerator> deposits = new KList<>();
|
private KList<IrisDepositGenerator> deposits = new KList<>();
|
||||||
|
|
||||||
@ -220,11 +220,6 @@ public class IrisBiome extends IrisRegistrant implements IRare
|
|||||||
private final transient AtomicCache<KList<CNG>> layerHeightGenerators = new AtomicCache<>();
|
private final transient AtomicCache<KList<CNG>> layerHeightGenerators = new AtomicCache<>();
|
||||||
private final transient AtomicCache<KList<CNG>> layerSeaHeightGenerators = new AtomicCache<>();
|
private final transient AtomicCache<KList<CNG>> layerSeaHeightGenerators = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisBiome()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public Color getCachedColor()
|
public Color getCachedColor()
|
||||||
{
|
{
|
||||||
return cacheColor.aquire(() ->
|
return cacheColor.aquire(() ->
|
||||||
|
@ -17,42 +17,42 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A biome decorator is used for placing flowers, grass, cacti and so on")
|
@Desc("A biome decorator is used for placing flowers, grass, cacti and so on")
|
||||||
@Data
|
@Data
|
||||||
public class IrisBiomeDecorator
|
public class IrisBiomeDecorator
|
||||||
{
|
{
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("The varience dispersion is used when multiple blocks are put in the palette. Scatter scrambles them, Wispy shows streak-looking varience")
|
@Desc("The varience dispersion is used when multiple blocks are put in the palette. Scatter scrambles them, Wispy shows streak-looking varience")
|
||||||
private IrisGeneratorStyle variance = NoiseStyle.STATIC.style();
|
private IrisGeneratorStyle variance = NoiseStyle.STATIC.style();
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Dispersion is used to pick places to spawn. Scatter randomly places them (vanilla) or Wispy for a streak like patch system.")
|
@Desc("Dispersion is used to pick places to spawn. Scatter randomly places them (vanilla) or Wispy for a streak like patch system.")
|
||||||
private IrisGeneratorStyle style = NoiseStyle.STATIC.style();
|
private IrisGeneratorStyle style = NoiseStyle.STATIC.style();
|
||||||
|
|
||||||
@DependsOn({"stackMin", "stackMax"})
|
@DependsOn({"stackMin", "stackMax"})
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("If this decorator has a height more than 1 this changes how it picks the height between your maxes. Scatter = random, Wispy = wavy heights")
|
@Desc("If this decorator has a height more than 1 this changes how it picks the height between your maxes. Scatter = random, Wispy = wavy heights")
|
||||||
private IrisGeneratorStyle heightVariance = NoiseStyle.STATIC.style();
|
private IrisGeneratorStyle heightVariance = NoiseStyle.STATIC.style();
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("Tells iris where this decoration is a part of. I.e. SHORE_LINE or SEA_SURFACE")
|
@Desc("Tells iris where this decoration is a part of. I.e. SHORE_LINE or SEA_SURFACE")
|
||||||
private DecorationPart partOf = DecorationPart.NONE;
|
private DecorationPart partOf = DecorationPart.NONE;
|
||||||
|
|
||||||
@DependsOn({"stackMin", "stackMax"})
|
@DependsOn({"stackMin", "stackMax"})
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The minimum repeat stack height (setting to 3 would stack 3 of <block> on top of each other")
|
@Desc("The minimum repeat stack height (setting to 3 would stack 3 of <block> on top of each other")
|
||||||
private int stackMin = 1;
|
private int stackMin = 1;
|
||||||
@ -60,27 +60,27 @@ public class IrisBiomeDecorator
|
|||||||
@DependsOn({"stackMin", "stackMax"})
|
@DependsOn({"stackMin", "stackMax"})
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The maximum repeat stack height")
|
@Desc("The maximum repeat stack height")
|
||||||
private int stackMax = 1;
|
private int stackMax = 1;
|
||||||
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The zoom is for zooming in or out wispy dispersions. Makes patches bigger the higher this zoom value is")
|
@Desc("The zoom is for zooming in or out wispy dispersions. Makes patches bigger the higher this zoom value is")
|
||||||
private double zoom = 1;
|
private double zoom = 1;
|
||||||
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("The zoom is for zooming in or out variance. Makes patches have more or less of one type.")
|
@Desc("The zoom is for zooming in or out variance. Makes patches have more or less of one type.")
|
||||||
private double varianceZoom = 1;
|
private double varianceZoom = 1;
|
||||||
|
|
||||||
@DependsOn({"stackMin", "stackMax"})
|
@DependsOn({"stackMin", "stackMax"})
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("The vertical zoom is for wispy stack heights. Zooming this in makes stack heights more slowly change over a distance")
|
@Desc("The vertical zoom is for wispy stack heights. Zooming this in makes stack heights more slowly change over a distance")
|
||||||
private double verticalZoom = 1;
|
private double verticalZoom = 1;
|
||||||
|
|
||||||
@ -88,14 +88,14 @@ public class IrisBiomeDecorator
|
|||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("The chance for this decorator to decorate at a given X,Y coordinate. This is hit 256 times per chunk (per surface block)")
|
@Desc("The chance for this decorator to decorate at a given X,Y coordinate. This is hit 256 times per chunk (per surface block)")
|
||||||
private double chance = 0.1;
|
private double chance = 0.1;
|
||||||
|
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Builder.Default
|
|
||||||
@Desc("The palette of blocks to pick from when this decorator needs to place.")
|
@Desc("The palette of blocks to pick from when this decorator needs to place.")
|
||||||
private KList<String> palette = new KList<String>().qadd("GRASS");
|
private KList<String> palette = new KList<String>().qadd("GRASS");
|
||||||
|
|
||||||
@ -104,11 +104,6 @@ public class IrisBiomeDecorator
|
|||||||
private final transient AtomicCache<CNG> heightGenerator = new AtomicCache<>();
|
private final transient AtomicCache<CNG> heightGenerator = new AtomicCache<>();
|
||||||
private final transient AtomicCache<KList<BlockData>> blockData = new AtomicCache<>();
|
private final transient AtomicCache<KList<BlockData>> blockData = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisBiomeDecorator()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getHeight(RNG rng, double x, double z)
|
public int getHeight(RNG rng, double x, double z)
|
||||||
{
|
{
|
||||||
if(stackMin == stackMax)
|
if(stackMin == stackMax)
|
||||||
|
@ -13,24 +13,23 @@ import com.volmit.iris.util.RegistryListGenerator;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("This represents a link to a generator for a biome")
|
@Desc("This represents a link to a generator for a biome")
|
||||||
@Data
|
@Data
|
||||||
public class IrisBiomeGeneratorLink
|
public class IrisBiomeGeneratorLink
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@RegistryListGenerator
|
@RegistryListGenerator
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The generator id")
|
@Desc("The generator id")
|
||||||
private String generator = "default";
|
private String generator = "default";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"min", "max"})
|
@DependsOn({"min", "max"})
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(-256)
|
@MinNumber(-256)
|
||||||
@ -39,7 +38,6 @@ public class IrisBiomeGeneratorLink
|
|||||||
@Desc("The min block value (value + fluidHeight)")
|
@Desc("The min block value (value + fluidHeight)")
|
||||||
private int min = 0;
|
private int min = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"min", "max"})
|
@DependsOn({"min", "max"})
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(-256)
|
@MinNumber(-256)
|
||||||
@ -50,11 +48,6 @@ public class IrisBiomeGeneratorLink
|
|||||||
|
|
||||||
private final transient AtomicCache<IrisGenerator> gen = new AtomicCache<>();
|
private final transient AtomicCache<IrisGenerator> gen = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisBiomeGeneratorLink()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public IrisGenerator getCachedGenerator(ContextualTerrainProvider g)
|
public IrisGenerator getCachedGenerator(ContextualTerrainProvider g)
|
||||||
{
|
{
|
||||||
return gen.aquire(() ->
|
return gen.aquire(() ->
|
||||||
|
@ -14,18 +14,18 @@ import com.volmit.iris.util.RegistryListObject;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A biome mutation if a condition is met")
|
@Desc("A biome mutation if a condition is met")
|
||||||
@Data
|
@Data
|
||||||
public class IrisBiomeMutation
|
public class IrisBiomeMutation
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@ -33,7 +33,6 @@ public class IrisBiomeMutation
|
|||||||
@Desc("One of The following biomes or regions must show up")
|
@Desc("One of The following biomes or regions must show up")
|
||||||
private KList<String> sideA = new KList<>();
|
private KList<String> sideA = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@ -41,7 +40,6 @@ public class IrisBiomeMutation
|
|||||||
@Desc("One of The following biomes or regions must show up")
|
@Desc("One of The following biomes or regions must show up")
|
||||||
private KList<String> sideB = new KList<>();
|
private KList<String> sideB = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(1024)
|
@MaxNumber(1024)
|
||||||
@ -49,7 +47,6 @@ public class IrisBiomeMutation
|
|||||||
@Desc("The scan radius for placing this mutator")
|
@Desc("The scan radius for placing this mutator")
|
||||||
private int radius = 16;
|
private int radius = 16;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(32)
|
@MaxNumber(32)
|
||||||
@ -57,7 +54,6 @@ public class IrisBiomeMutation
|
|||||||
@Desc("How many tries per chunk to check for this mutation")
|
@Desc("How many tries per chunk to check for this mutation")
|
||||||
private int checks = 2;
|
private int checks = 2;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListObject
|
@RegistryListObject
|
||||||
@ArrayType(min = 1, type = IrisObjectPlacement.class)
|
@ArrayType(min = 1, type = IrisObjectPlacement.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
|
@ -16,23 +16,22 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A layer of surface / subsurface material in biomes")
|
@Desc("A layer of surface / subsurface material in biomes")
|
||||||
@Data
|
@Data
|
||||||
public class IrisBiomePaletteLayer
|
public class IrisBiomePaletteLayer
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The style of noise")
|
@Desc("The style of noise")
|
||||||
private IrisGeneratorStyle style = NoiseStyle.STATIC.style();
|
private IrisGeneratorStyle style = NoiseStyle.STATIC.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"minHeight", "maxHeight"})
|
@DependsOn({"minHeight", "maxHeight"})
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@ -40,7 +39,6 @@ public class IrisBiomePaletteLayer
|
|||||||
@Desc("The min thickness of this layer")
|
@Desc("The min thickness of this layer")
|
||||||
private int minHeight = 1;
|
private int minHeight = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"minHeight", "maxHeight"})
|
@DependsOn({"minHeight", "maxHeight"})
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@ -48,13 +46,11 @@ public class IrisBiomePaletteLayer
|
|||||||
@Desc("The max thickness of this layer")
|
@Desc("The max thickness of this layer")
|
||||||
private int maxHeight = 1;
|
private int maxHeight = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The terrain zoom mostly for zooming in on a wispy palette")
|
@Desc("The terrain zoom mostly for zooming in on a wispy palette")
|
||||||
private double zoom = 5;
|
private double zoom = 5;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@ -65,15 +61,6 @@ public class IrisBiomePaletteLayer
|
|||||||
private final transient AtomicCache<CNG> layerGenerator = new AtomicCache<>();
|
private final transient AtomicCache<CNG> layerGenerator = new AtomicCache<>();
|
||||||
private final transient AtomicCache<CNG> heightGenerator = new AtomicCache<>();
|
private final transient AtomicCache<CNG> heightGenerator = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisBiomePaletteLayer()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public CNG getHeightGenerator(RNG rng)
|
public CNG getHeightGenerator(RNG rng)
|
||||||
{
|
{
|
||||||
return heightGenerator.aquire(() -> CNG.signature(rng.nextParallelRNG(minHeight * maxHeight + getBlockData().size())));
|
return heightGenerator.aquire(() -> CNG.signature(rng.nextParallelRNG(minHeight * maxHeight + getBlockData().size())));
|
||||||
|
75
src/main/java/com/volmit/iris/object/IrisBlockData.java
Normal file
75
src/main/java/com/volmit/iris/object/IrisBlockData.java
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
package com.volmit.iris.object;
|
||||||
|
|
||||||
|
import org.bukkit.block.data.BlockData;
|
||||||
|
|
||||||
|
import com.volmit.iris.gen.atomics.AtomicCache;
|
||||||
|
import com.volmit.iris.util.B;
|
||||||
|
import com.volmit.iris.util.Desc;
|
||||||
|
import com.volmit.iris.util.DontObfuscate;
|
||||||
|
import com.volmit.iris.util.KList;
|
||||||
|
import com.volmit.iris.util.KMap;
|
||||||
|
import com.volmit.iris.util.RegistryListBlockType;
|
||||||
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Desc("Represents Block Data")
|
||||||
|
@Data
|
||||||
|
public class IrisBlockData
|
||||||
|
{
|
||||||
|
@RegistryListBlockType
|
||||||
|
|
||||||
|
@Required
|
||||||
|
@DontObfuscate
|
||||||
|
@Desc("The cave zoom. Higher values makes caves spread out further and branch less often, but are thicker.")
|
||||||
|
private String block = "air";
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
|
@Desc("The resource key. Typically Minecraft")
|
||||||
|
private String key = "minecraft";
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
|
@Desc("Optional properties for this block data such as 'waterlogged': true")
|
||||||
|
private KMap<String, Object> data = new KMap<>();
|
||||||
|
|
||||||
|
private final transient AtomicCache<BlockData> blockdata = new AtomicCache<>();
|
||||||
|
private final transient AtomicCache<String> realProperties = new AtomicCache<>();
|
||||||
|
|
||||||
|
public String computeProperties()
|
||||||
|
{
|
||||||
|
if(getData().isEmpty())
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
KList<String> r = new KList<>();
|
||||||
|
|
||||||
|
for(String i : getData().keySet())
|
||||||
|
{
|
||||||
|
r.add(i + "=" + getData().get(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
return "[" + r.toString(",") + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlockData getBlockData()
|
||||||
|
{
|
||||||
|
return blockdata.aquire(() ->
|
||||||
|
{
|
||||||
|
BlockData b = B.get(getKey() + ":" + getBlock() + computeProperties());
|
||||||
|
|
||||||
|
if(b != null)
|
||||||
|
{
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
|
return B.get("AIR");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,6 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
|
|
||||||
import com.volmit.iris.gen.atomics.AtomicCache;
|
import com.volmit.iris.gen.atomics.AtomicCache;
|
||||||
import com.volmit.iris.util.ArrayType;
|
import com.volmit.iris.util.ArrayType;
|
||||||
import com.volmit.iris.util.B;
|
|
||||||
import com.volmit.iris.util.Desc;
|
import com.volmit.iris.util.Desc;
|
||||||
import com.volmit.iris.util.DontObfuscate;
|
import com.volmit.iris.util.DontObfuscate;
|
||||||
import com.volmit.iris.util.KList;
|
import com.volmit.iris.util.KList;
|
||||||
@ -13,60 +12,51 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents a block drop list")
|
@Desc("Represents a block drop list")
|
||||||
@Data
|
@Data
|
||||||
public class IrisBlockDrops
|
public class IrisBlockDrops
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
|
||||||
@ArrayType(min = 1, type = String.class)
|
|
||||||
@Desc("The blocks that drop loot")
|
|
||||||
private KList<String> blocks = new KList<String>();
|
|
||||||
|
|
||||||
@Builder.Default
|
@Required
|
||||||
|
@ArrayType(min = 1, type = IrisBlockData.class)
|
||||||
|
@Desc("The blocks that drop loot")
|
||||||
|
private KList<IrisBlockData> blocks = new KList<IrisBlockData>();
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If exact blocks is set to true, minecraft:barrel[axis=x] will only drop for that axis. When exact is false (default) any barrel will drop the defined drops.")
|
@Desc("If exact blocks is set to true, minecraft:barrel[axis=x] will only drop for that axis. When exact is false (default) any barrel will drop the defined drops.")
|
||||||
private boolean exactBlocks = false;
|
private boolean exactBlocks = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Add in specific items to drop")
|
@Desc("Add in specific items to drop")
|
||||||
@ArrayType(min = 1, type = IrisLoot.class)
|
@ArrayType(min = 1, type = IrisLoot.class)
|
||||||
private KList<IrisLoot> drops = new KList<>();
|
private KList<IrisLoot> drops = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If this is in a biome, setting skipParents to true will ignore the drops in the region and dimension for this block type. The default (false) will allow all three nodes to fire and add to a list of drops.")
|
@Desc("If this is in a biome, setting skipParents to true will ignore the drops in the region and dimension for this block type. The default (false) will allow all three nodes to fire and add to a list of drops.")
|
||||||
private boolean skipParents = false;
|
private boolean skipParents = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Removes the default vanilla block drops and only drops the given items & any parent loot tables specified for this block type.")
|
@Desc("Removes the default vanilla block drops and only drops the given items & any parent loot tables specified for this block type.")
|
||||||
private boolean replaceVanillaDrops = false;
|
private boolean replaceVanillaDrops = false;
|
||||||
|
|
||||||
private final transient AtomicCache<KList<BlockData>> data = new AtomicCache<>();
|
private final transient AtomicCache<KList<BlockData>> data = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisBlockDrops()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean shouldDropFor(BlockData data)
|
public boolean shouldDropFor(BlockData data)
|
||||||
{
|
{
|
||||||
KList<BlockData> list = this.data.aquire(() ->
|
KList<BlockData> list = this.data.aquire(() ->
|
||||||
{
|
{
|
||||||
KList<BlockData> b = new KList<>();
|
KList<BlockData> b = new KList<>();
|
||||||
|
|
||||||
for(String i : getBlocks())
|
for(IrisBlockData i : getBlocks())
|
||||||
{
|
{
|
||||||
BlockData dd = B.get(i);
|
BlockData dd = i.getBlockData();
|
||||||
|
|
||||||
if(dd != null)
|
if(dd != null)
|
||||||
{
|
{
|
||||||
|
@ -12,38 +12,35 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Translate objects")
|
@Desc("Translate objects")
|
||||||
@Data
|
@Data
|
||||||
public class IrisCarveLayer
|
public class IrisCarveLayer
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The 4d slope this carve layer follows")
|
@Desc("The 4d slope this carve layer follows")
|
||||||
private IrisGeneratorStyle style = new IrisGeneratorStyle();
|
private IrisGeneratorStyle style = new IrisGeneratorStyle();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@MinNumber(-128)
|
@MinNumber(-128)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The max height")
|
@Desc("The max height")
|
||||||
private int maxHeight = 220;
|
private int maxHeight = 220;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@MinNumber(-128)
|
@MinNumber(-128)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The min height")
|
@Desc("The min height")
|
||||||
private int minHeight = 147;
|
private int minHeight = 147;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@ -52,11 +49,6 @@ public class IrisCarveLayer
|
|||||||
|
|
||||||
private final transient AtomicCache<CNG> cng = new AtomicCache<>();
|
private final transient AtomicCache<CNG> cng = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisCarveLayer()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCarved(RNG rng, double x, double y, double z)
|
public boolean isCarved(RNG rng, double x, double y, double z)
|
||||||
{
|
{
|
||||||
if(y > getMaxHeight() || y < getMinHeight())
|
if(y > getMaxHeight() || y < getMinHeight())
|
||||||
|
@ -11,18 +11,18 @@ import com.volmit.iris.util.MinNumber;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Translate objects")
|
@Desc("Translate objects")
|
||||||
@Data
|
@Data
|
||||||
public class IrisCaveFluid
|
public class IrisCaveFluid
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MaxNumber(255)
|
@MaxNumber(255)
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@ -30,12 +30,10 @@ public class IrisCaveFluid
|
|||||||
@Desc("The cave zoom. Higher values makes caves spread out further and branch less often, but are thicker.")
|
@Desc("The cave zoom. Higher values makes caves spread out further and branch less often, but are thicker.")
|
||||||
private int fluidHeight = 35;
|
private int fluidHeight = 35;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Insead of fluidHeight & below being fluid, turning inverse height on will simply spawn fluid in this cave layer from min(max_height, cave_height) to the fluid height. Basically, fluid will spawn above the fluidHeight value instead of below the fluidHeight.")
|
@Desc("Insead of fluidHeight & below being fluid, turning inverse height on will simply spawn fluid in this cave layer from min(max_height, cave_height) to the fluid height. Basically, fluid will spawn above the fluidHeight value instead of below the fluidHeight.")
|
||||||
private boolean inverseHeight = false;
|
private boolean inverseHeight = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The fluid type that should spawn here")
|
@Desc("The fluid type that should spawn here")
|
||||||
@ -43,11 +41,6 @@ public class IrisCaveFluid
|
|||||||
|
|
||||||
private final transient AtomicCache<BlockData> fluidData = new AtomicCache<>();
|
private final transient AtomicCache<BlockData> fluidData = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisCaveFluid()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean hasFluid()
|
public boolean hasFluid()
|
||||||
{
|
{
|
||||||
return !B.isAir(getFluid());
|
return !B.isAir(getFluid());
|
||||||
|
@ -6,53 +6,44 @@ import com.volmit.iris.util.MinNumber;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Translate objects")
|
@Desc("Translate objects")
|
||||||
@Data
|
@Data
|
||||||
public class IrisCaveLayer
|
public class IrisCaveLayer
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The vertical slope this cave layer follows")
|
@Desc("The vertical slope this cave layer follows")
|
||||||
private IrisShapedGeneratorStyle verticalSlope = new IrisShapedGeneratorStyle();
|
private IrisShapedGeneratorStyle verticalSlope = new IrisShapedGeneratorStyle();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The horizontal slope this cave layer follows")
|
@Desc("The horizontal slope this cave layer follows")
|
||||||
private IrisShapedGeneratorStyle horizontalSlope = new IrisShapedGeneratorStyle();
|
private IrisShapedGeneratorStyle horizontalSlope = new IrisShapedGeneratorStyle();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If defined, a cave fluid will fill this cave below (or above) the specified fluidHeight in this object.")
|
@Desc("If defined, a cave fluid will fill this cave below (or above) the specified fluidHeight in this object.")
|
||||||
private IrisCaveFluid fluid = new IrisCaveFluid();
|
private IrisCaveFluid fluid = new IrisCaveFluid();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.001)
|
@MinNumber(0.001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The cave zoom. Higher values makes caves spread out further and branch less often, but are thicker.")
|
@Desc("The cave zoom. Higher values makes caves spread out further and branch less often, but are thicker.")
|
||||||
private double caveZoom = 1D;
|
private double caveZoom = 1D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.001)
|
@MinNumber(0.001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The cave thickness.")
|
@Desc("The cave thickness.")
|
||||||
private double caveThickness = 1D;
|
private double caveThickness = 1D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, this cave layer can break the surface")
|
@Desc("If set to true, this cave layer can break the surface")
|
||||||
private boolean canBreakSurface = false;
|
private boolean canBreakSurface = false;
|
||||||
|
|
||||||
public IrisCaveLayer()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -10,30 +10,28 @@ import com.volmit.iris.util.DontObfuscate;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Find and replace object materials for compatability")
|
@Desc("Find and replace object materials for compatability")
|
||||||
@Data
|
@Data
|
||||||
public class IrisCompatabilityFilter
|
public class IrisCompatabilityFilter
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("When iris sees this block, and it's not reconized")
|
@Desc("When iris sees this block, and it's not reconized")
|
||||||
private String when = "";
|
private String when = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Replace it with this block. Dont worry if this block is also not reconized, iris repeat this compat check.")
|
@Desc("Replace it with this block. Dont worry if this block is also not reconized, iris repeat this compat check.")
|
||||||
private String supplement = "";
|
private String supplement = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If exact is true, it compares block data for example minecraft:some_log[axis=x]")
|
@Desc("If exact is true, it compares block data for example minecraft:some_log[axis=x]")
|
||||||
private boolean exact = false;
|
private boolean exact = false;
|
||||||
@ -46,10 +44,6 @@ public class IrisCompatabilityFilter
|
|||||||
this(when, supplement, false);
|
this(when, supplement, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IrisCompatabilityFilter()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockData getFind()
|
public BlockData getFind()
|
||||||
{
|
{
|
||||||
|
@ -17,18 +17,18 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Creates ore & other block deposits underground")
|
@Desc("Creates ore & other block deposits underground")
|
||||||
@Data
|
@Data
|
||||||
public class IrisDepositGenerator
|
public class IrisDepositGenerator
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@ -36,7 +36,6 @@ public class IrisDepositGenerator
|
|||||||
@Desc("The minimum height this deposit can generate at")
|
@Desc("The minimum height this deposit can generate at")
|
||||||
private int minHeight = 7;
|
private int minHeight = 7;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@ -44,7 +43,6 @@ public class IrisDepositGenerator
|
|||||||
@Desc("The maximum height this deposit can generate at")
|
@Desc("The maximum height this deposit can generate at")
|
||||||
private int maxHeight = 55;
|
private int maxHeight = 55;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(32)
|
@MaxNumber(32)
|
||||||
@ -52,7 +50,6 @@ public class IrisDepositGenerator
|
|||||||
@Desc("The minimum amount of deposit blocks per clump")
|
@Desc("The minimum amount of deposit blocks per clump")
|
||||||
private int minSize = 3;
|
private int minSize = 3;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(32)
|
@MaxNumber(32)
|
||||||
@ -60,7 +57,6 @@ public class IrisDepositGenerator
|
|||||||
@Desc("The maximum amount of deposit blocks per clump")
|
@Desc("The maximum amount of deposit blocks per clump")
|
||||||
private int maxSize = 5;
|
private int maxSize = 5;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(128)
|
@MaxNumber(128)
|
||||||
@ -68,7 +64,6 @@ public class IrisDepositGenerator
|
|||||||
@Desc("The maximum amount of clumps per chunk")
|
@Desc("The maximum amount of clumps per chunk")
|
||||||
private int maxPerChunk = 3;
|
private int maxPerChunk = 3;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(128)
|
@MaxNumber(128)
|
||||||
@ -76,14 +71,12 @@ public class IrisDepositGenerator
|
|||||||
@Desc("The minimum amount of clumps per chunk")
|
@Desc("The minimum amount of clumps per chunk")
|
||||||
private int minPerChunk = 1;
|
private int minPerChunk = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The palette of blocks to be used in this deposit generator")
|
@Desc("The palette of blocks to be used in this deposit generator")
|
||||||
private KList<String> palette = new KList<String>();
|
private KList<String> palette = new KList<String>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(64)
|
@MaxNumber(64)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@ -93,11 +86,6 @@ public class IrisDepositGenerator
|
|||||||
private final transient AtomicCache<KList<IrisObject>> objects = new AtomicCache<>();
|
private final transient AtomicCache<KList<IrisObject>> objects = new AtomicCache<>();
|
||||||
private final transient AtomicCache<KList<BlockData>> blockData = new AtomicCache<>();
|
private final transient AtomicCache<KList<BlockData>> blockData = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisDepositGenerator()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public IrisObject getClump(RNG rng)
|
public IrisObject getClump(RNG rng)
|
||||||
{
|
{
|
||||||
KList<IrisObject> objects = this.objects.aquire(() ->
|
KList<IrisObject> objects = this.objects.aquire(() ->
|
||||||
|
@ -29,15 +29,14 @@ import com.volmit.iris.util.RegistryListRegion;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
@Desc("Represents a dimension")
|
@Desc("Represents a dimension")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ -46,180 +45,147 @@ public class IrisDimension extends IrisRegistrant
|
|||||||
public static final BlockData STONE = Material.STONE.createBlockData();
|
public static final BlockData STONE = Material.STONE.createBlockData();
|
||||||
public static final BlockData WATER = Material.WATER.createBlockData();
|
public static final BlockData WATER = Material.WATER.createBlockData();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(2)
|
@MinNumber(2)
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The human readable name of this dimension")
|
@Desc("The human readable name of this dimension")
|
||||||
private String name = "A Dimension";
|
private String name = "A Dimension";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Place text on terrain")
|
@Desc("Place text on terrain")
|
||||||
@ArrayType(min = 1, type = IrisTextPlacement.class)
|
@ArrayType(min = 1, type = IrisTextPlacement.class)
|
||||||
private KList<IrisTextPlacement> text = new KList<>();
|
private KList<IrisTextPlacement> text = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity spawns to override or add to this dimension")
|
@Desc("Entity spawns to override or add to this dimension")
|
||||||
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
||||||
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity spawns during generation")
|
@Desc("Entity spawns during generation")
|
||||||
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
||||||
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Reference loot tables in this area")
|
@Desc("Reference loot tables in this area")
|
||||||
private IrisLootReference loot = new IrisLootReference();
|
private IrisLootReference loot = new IrisLootReference();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@Desc("Try to fill a container with loot up to this many times to avoid too many empty chests.")
|
@Desc("Try to fill a container with loot up to this many times to avoid too many empty chests.")
|
||||||
private int lootTries = 5;
|
private int lootTries = 5;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The version of this dimension. Changing this will stop users from accidentally upgrading (and breaking their worlds).")
|
@Desc("The version of this dimension. Changing this will stop users from accidentally upgrading (and breaking their worlds).")
|
||||||
private int version = 1;
|
private int version = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisBlockDrops.class)
|
@ArrayType(min = 1, type = IrisBlockDrops.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Define custom block drops for this dimension")
|
@Desc("Define custom block drops for this dimension")
|
||||||
private KList<IrisBlockDrops> blockDrops = new KList<>();
|
private KList<IrisBlockDrops> blockDrops = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The land chance. Up to 1.0 for total land or 0.0 for total sea")
|
@Desc("The land chance. Up to 1.0 for total land or 0.0 for total sea")
|
||||||
private double landChance = 0.625;
|
private double landChance = 0.625;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of regions")
|
@Desc("The placement style of regions")
|
||||||
private IrisGeneratorStyle regionStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle regionStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of land/sea")
|
@Desc("The placement style of land/sea")
|
||||||
private IrisGeneratorStyle continentalStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle continentalStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of biomes")
|
@Desc("The placement style of biomes")
|
||||||
private IrisGeneratorStyle landBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle landBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of biomes")
|
@Desc("The placement style of biomes")
|
||||||
private IrisGeneratorStyle shoreBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle shoreBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of biomes")
|
@Desc("The placement style of biomes")
|
||||||
private IrisGeneratorStyle seaBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle seaBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of biomes")
|
@Desc("The placement style of biomes")
|
||||||
private IrisGeneratorStyle caveBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle caveBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of biomes")
|
@Desc("The placement style of biomes")
|
||||||
private IrisGeneratorStyle riverBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle riverBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of biomes")
|
@Desc("The placement style of biomes")
|
||||||
private IrisGeneratorStyle lakeBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle lakeBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of biomes")
|
@Desc("The placement style of biomes")
|
||||||
private IrisGeneratorStyle islandBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle islandBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of biomes")
|
@Desc("The placement style of biomes")
|
||||||
private IrisGeneratorStyle islandBiomeChanceStyle = NoiseStyle.CELLULAR_HEIGHT_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle islandBiomeChanceStyle = NoiseStyle.CELLULAR_HEIGHT_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement style of biomes")
|
@Desc("The placement style of biomes")
|
||||||
private IrisGeneratorStyle skylandBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
private IrisGeneratorStyle skylandBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Generate caves or not.")
|
@Desc("Generate caves or not.")
|
||||||
private boolean caves = true;
|
private boolean caves = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Instead of filling objects with air, fills them with cobweb so you can see them")
|
@Desc("Instead of filling objects with air, fills them with cobweb so you can see them")
|
||||||
private boolean debugSmartBore = false;
|
private boolean debugSmartBore = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Carve terrain or not")
|
@Desc("Carve terrain or not")
|
||||||
private boolean carving = true;
|
private boolean carving = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Generate vanilla caves")
|
@Desc("Generate vanilla caves")
|
||||||
private boolean vanillaCaves = false;
|
private boolean vanillaCaves = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Generate vanilla structures")
|
@Desc("Generate vanilla structures")
|
||||||
private boolean vanillaStructures = false;
|
private boolean vanillaStructures = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Generate decorations or not")
|
@Desc("Generate decorations or not")
|
||||||
private boolean decorate = true;
|
private boolean decorate = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Use post processing or not")
|
@Desc("Use post processing or not")
|
||||||
private boolean postProcessing = true;
|
private boolean postProcessing = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Add slabs in post processing")
|
@Desc("Add slabs in post processing")
|
||||||
private boolean postProcessingSlabs = true;
|
private boolean postProcessingSlabs = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Add painted walls in post processing")
|
@Desc("Add painted walls in post processing")
|
||||||
private boolean postProcessingWalls = true;
|
private boolean postProcessingWalls = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Use post processing for caves or not")
|
@Desc("Use post processing for caves or not")
|
||||||
private boolean postProcessCaves = true;
|
private boolean postProcessCaves = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisCompatabilityFilter.class)
|
@ArrayType(min = 1, type = IrisCompatabilityFilter.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Compatability filters")
|
@Desc("Compatability filters")
|
||||||
private KList<IrisCompatabilityFilter> compatability = getDefaultCompatability();
|
private KList<IrisCompatabilityFilter> compatability = getDefaultCompatability();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The world environment")
|
@Desc("The world environment")
|
||||||
private Environment environment = Environment.NORMAL;
|
private Environment environment = Environment.NORMAL;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListRegion
|
@RegistryListRegion
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@ -227,7 +193,6 @@ public class IrisDimension extends IrisRegistrant
|
|||||||
@Desc("Define all of the regions to include in this dimension. Dimensions -> Regions -> Biomes -> Objects etc")
|
@Desc("Define all of the regions to include in this dimension. Dimensions -> Regions -> Biomes -> Objects etc")
|
||||||
private KList<String> regions = new KList<>();
|
private KList<String> regions = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(255)
|
@MaxNumber(255)
|
||||||
@ -235,139 +200,117 @@ public class IrisDimension extends IrisRegistrant
|
|||||||
@Desc("The fluid height for this dimension")
|
@Desc("The fluid height for this dimension")
|
||||||
private int fluidHeight = 63;
|
private int fluidHeight = 63;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Keep this either undefined or empty. Setting any biome name into this will force iris to only generate the specified biome. Great for testing.")
|
@Desc("Keep this either undefined or empty. Setting any biome name into this will force iris to only generate the specified biome. Great for testing.")
|
||||||
private String focus = "";
|
private String focus = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Zoom in or out the biome size. Higher = bigger biomes")
|
@Desc("Zoom in or out the biome size. Higher = bigger biomes")
|
||||||
private double biomeZoom = 5D;
|
private double biomeZoom = 5D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Zoom in or out the terrain. This stretches the terrain. Due to performance improvements, Higher than 2.0 may cause weird rounding artifacts. Lower = more terrain changes per block. Its a true zoom-out.")
|
@Desc("Zoom in or out the terrain. This stretches the terrain. Due to performance improvements, Higher than 2.0 may cause weird rounding artifacts. Lower = more terrain changes per block. Its a true zoom-out.")
|
||||||
private double terrainZoom = 2D;
|
private double terrainZoom = 2D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(360)
|
@MaxNumber(360)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("You can rotate the input coordinates by an angle. This can make terrain appear more natural (less sharp corners and lines). This literally rotates the entire dimension by an angle. Hint: Try 12 degrees or something not on a 90 or 45 degree angle.")
|
@Desc("You can rotate the input coordinates by an angle. This can make terrain appear more natural (less sharp corners and lines). This literally rotates the entire dimension by an angle. Hint: Try 12 degrees or something not on a 90 or 45 degree angle.")
|
||||||
private double dimensionAngleDeg = 0;
|
private double dimensionAngleDeg = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(8192)
|
@MaxNumber(8192)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Coordinate fracturing applies noise to the input coordinates. This creates the 'iris swirls' and wavy features. The distance pushes these waves further into places they shouldnt be. This is a block value multiplier.")
|
@Desc("Coordinate fracturing applies noise to the input coordinates. This creates the 'iris swirls' and wavy features. The distance pushes these waves further into places they shouldnt be. This is a block value multiplier.")
|
||||||
private double coordFractureDistance = 20;
|
private double coordFractureDistance = 20;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Coordinate fracturing zoom. Higher = less frequent warping, Lower = more frequent and rapid warping / swirls.")
|
@Desc("Coordinate fracturing zoom. Higher = less frequent warping, Lower = more frequent and rapid warping / swirls.")
|
||||||
private double coordFractureZoom = 8;
|
private double coordFractureZoom = 8;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("This zooms in the land space")
|
@Desc("This zooms in the land space")
|
||||||
private double landZoom = 1;
|
private double landZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("This zooms oceanic biomes")
|
@Desc("This zooms oceanic biomes")
|
||||||
private double seaZoom = 1;
|
private double seaZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Zoom in continents")
|
@Desc("Zoom in continents")
|
||||||
private double continentZoom = 1;
|
private double continentZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Change the size of regions")
|
@Desc("Change the size of regions")
|
||||||
private double regionZoom = 1;
|
private double regionZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Disable this to stop placing schematics in biomes")
|
@Desc("Disable this to stop placing schematics in biomes")
|
||||||
private boolean placeObjects = true;
|
private boolean placeObjects = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Prevent Leaf decay as if placed in creative mode")
|
@Desc("Prevent Leaf decay as if placed in creative mode")
|
||||||
private boolean preventLeafDecay = false;
|
private boolean preventLeafDecay = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisDepositGenerator.class)
|
@ArrayType(min = 1, type = IrisDepositGenerator.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Define global deposit generators")
|
@Desc("Define global deposit generators")
|
||||||
private KList<IrisDepositGenerator> deposits = new KList<>();
|
private KList<IrisDepositGenerator> deposits = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisShapedGeneratorStyle.class)
|
@ArrayType(min = 1, type = IrisShapedGeneratorStyle.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Overlay additional noise on top of the interoplated terrain.")
|
@Desc("Overlay additional noise on top of the interoplated terrain.")
|
||||||
private KList<IrisShapedGeneratorStyle> overlayNoise = new KList<>();
|
private KList<IrisShapedGeneratorStyle> overlayNoise = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The noise style for rock types")
|
@Desc("The noise style for rock types")
|
||||||
private IrisGeneratorStyle rockStyle = NoiseStyle.STATIC.style();
|
private IrisGeneratorStyle rockStyle = NoiseStyle.STATIC.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisCaveLayer.class)
|
@ArrayType(min = 1, type = IrisCaveLayer.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Define cave layers")
|
@Desc("Define cave layers")
|
||||||
private KList<IrisCaveLayer> caveLayers = new KList<>();
|
private KList<IrisCaveLayer> caveLayers = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisCarveLayer.class)
|
@ArrayType(min = 1, type = IrisCarveLayer.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Define carve layers")
|
@Desc("Define carve layers")
|
||||||
private KList<IrisCarveLayer> carveLayers = new KList<>();
|
private KList<IrisCarveLayer> carveLayers = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The noise style for fluid types")
|
@Desc("The noise style for fluid types")
|
||||||
private IrisGeneratorStyle fluidStyle = NoiseStyle.STATIC.style();
|
private IrisGeneratorStyle fluidStyle = NoiseStyle.STATIC.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The rock zoom mostly for zooming in on a wispy palette")
|
@Desc("The rock zoom mostly for zooming in on a wispy palette")
|
||||||
private double rockZoom = 5;
|
private double rockZoom = 5;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The palette of blocks for 'stone'")
|
@Desc("The palette of blocks for 'stone'")
|
||||||
private KList<String> rockPalette = new KList<String>().qadd("STONE");
|
private KList<String> rockPalette = new KList<String>().qadd("STONE");
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The palette of blocks for 'water'")
|
@Desc("The palette of blocks for 'water'")
|
||||||
private KList<String> fluidPalette = new KList<String>().qadd("WATER");
|
private KList<String> fluidPalette = new KList<String>().qadd("WATER");
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisBiomeMutation.class)
|
@ArrayType(min = 1, type = IrisBiomeMutation.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Define biome mutations for this dimension")
|
@Desc("Define biome mutations for this dimension")
|
||||||
@ -384,11 +327,6 @@ public class IrisDimension extends IrisRegistrant
|
|||||||
private final transient AtomicCache<Double> cosr = new AtomicCache<>();
|
private final transient AtomicCache<Double> cosr = new AtomicCache<>();
|
||||||
private final transient AtomicCache<Double> rad = new AtomicCache<>();
|
private final transient AtomicCache<Double> rad = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisDimension()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static KList<IrisCompatabilityFilter> getDefaultCompatability()
|
public static KList<IrisCompatabilityFilter> getDefaultCompatability()
|
||||||
{
|
{
|
||||||
KList<IrisCompatabilityFilter> filters = new KList<>();
|
KList<IrisCompatabilityFilter> filters = new KList<>();
|
||||||
|
@ -20,29 +20,26 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("An iris effect")
|
@Desc("An iris effect")
|
||||||
@Data
|
@Data
|
||||||
public class IrisEffect
|
public class IrisEffect
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The potion effect to apply in this area")
|
@Desc("The potion effect to apply in this area")
|
||||||
private String potionEffect = "";
|
private String potionEffect = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The particle effect to apply in the area")
|
@Desc("The particle effect to apply in the area")
|
||||||
private Particle particleEffect = null;
|
private Particle particleEffect = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@MinNumber(-32)
|
@MinNumber(-32)
|
||||||
@MaxNumber(32)
|
@MaxNumber(32)
|
||||||
@ -50,7 +47,6 @@ public class IrisEffect
|
|||||||
@Desc("Randomly offset from the surface to this surface+value")
|
@Desc("Randomly offset from the surface to this surface+value")
|
||||||
private int particleOffset = 0;
|
private int particleOffset = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@MinNumber(-8)
|
@MinNumber(-8)
|
||||||
@MaxNumber(8)
|
@MaxNumber(8)
|
||||||
@ -58,7 +54,6 @@ public class IrisEffect
|
|||||||
@Desc("The alt x, usually represents motion if the particle count is zero. Otherwise an offset.")
|
@Desc("The alt x, usually represents motion if the particle count is zero. Otherwise an offset.")
|
||||||
private double particleAltX = 0;
|
private double particleAltX = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@MinNumber(-8)
|
@MinNumber(-8)
|
||||||
@MaxNumber(8)
|
@MaxNumber(8)
|
||||||
@ -66,7 +61,6 @@ public class IrisEffect
|
|||||||
@Desc("The alt y, usually represents motion if the particle count is zero. Otherwise an offset.")
|
@Desc("The alt y, usually represents motion if the particle count is zero. Otherwise an offset.")
|
||||||
private double particleAltY = 0;
|
private double particleAltY = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@MinNumber(-8)
|
@MinNumber(-8)
|
||||||
@MaxNumber(8)
|
@MaxNumber(8)
|
||||||
@ -74,30 +68,25 @@ public class IrisEffect
|
|||||||
@Desc("The alt z, usually represents motion if the particle count is zero. Otherwise an offset.")
|
@Desc("The alt z, usually represents motion if the particle count is zero. Otherwise an offset.")
|
||||||
private double particleAltZ = 0;
|
private double particleAltZ = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Randomize the altX by -altX to altX")
|
@Desc("Randomize the altX by -altX to altX")
|
||||||
private boolean randomAltX = true;
|
private boolean randomAltX = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Randomize the altY by -altY to altY")
|
@Desc("Randomize the altY by -altY to altY")
|
||||||
private boolean randomAltY = false;
|
private boolean randomAltY = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Randomize the altZ by -altZ to altZ")
|
@Desc("Randomize the altZ by -altZ to altZ")
|
||||||
private boolean randomAltZ = true;
|
private boolean randomAltZ = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The sound to play")
|
@Desc("The sound to play")
|
||||||
private Sound sound = null;
|
private Sound sound = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"sound"})
|
@DependsOn({"sound"})
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@ -105,7 +94,6 @@ public class IrisEffect
|
|||||||
@Desc("The max distance from the player the sound will play")
|
@Desc("The max distance from the player the sound will play")
|
||||||
private int soundDistance = 12;
|
private int soundDistance = 12;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"sound", "maxPitch"})
|
@DependsOn({"sound", "maxPitch"})
|
||||||
@MinNumber(0.01)
|
@MinNumber(0.01)
|
||||||
@MaxNumber(1.99)
|
@MaxNumber(1.99)
|
||||||
@ -113,7 +101,6 @@ public class IrisEffect
|
|||||||
@Desc("The minimum sound pitch")
|
@Desc("The minimum sound pitch")
|
||||||
private double minPitch = 0.5D;
|
private double minPitch = 0.5D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"sound", "minVolume"})
|
@DependsOn({"sound", "minVolume"})
|
||||||
@MinNumber(0.01)
|
@MinNumber(0.01)
|
||||||
@MaxNumber(1.99)
|
@MaxNumber(1.99)
|
||||||
@ -121,7 +108,6 @@ public class IrisEffect
|
|||||||
@Desc("The max sound pitch")
|
@Desc("The max sound pitch")
|
||||||
private double maxPitch = 1.5D;
|
private double maxPitch = 1.5D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"sound"})
|
@DependsOn({"sound"})
|
||||||
@MinNumber(0.001)
|
@MinNumber(0.001)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@ -129,7 +115,6 @@ public class IrisEffect
|
|||||||
@Desc("The sound volume.")
|
@Desc("The sound volume.")
|
||||||
private double volume = 1.5D;
|
private double volume = 1.5D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(512)
|
@MaxNumber(512)
|
||||||
@ -137,7 +122,6 @@ public class IrisEffect
|
|||||||
@Desc("The particle count. Try setting to zero for using the alt xyz to a motion value instead of an offset")
|
@Desc("The particle count. Try setting to zero for using the alt xyz to a motion value instead of an offset")
|
||||||
private int particleCount = 0;
|
private int particleCount = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(64)
|
@MaxNumber(64)
|
||||||
@ -145,7 +129,6 @@ public class IrisEffect
|
|||||||
@Desc("How far away from the player particles can play")
|
@Desc("How far away from the player particles can play")
|
||||||
private int particleDistance = 20;
|
private int particleDistance = 20;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(128)
|
@MaxNumber(128)
|
||||||
@ -153,13 +136,11 @@ public class IrisEffect
|
|||||||
@Desc("How wide the particles can play (player's view left and right) RADIUS")
|
@Desc("How wide the particles can play (player's view left and right) RADIUS")
|
||||||
private int particleDistanceWidth = 24;
|
private int particleDistanceWidth = 24;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("An extra value for some particles... Which bukkit doesn't even document.")
|
@Desc("An extra value for some particles... Which bukkit doesn't even document.")
|
||||||
private double extra = 0;
|
private double extra = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"potionEffect"})
|
@DependsOn({"potionEffect"})
|
||||||
@MinNumber(-1)
|
@MinNumber(-1)
|
||||||
@MaxNumber(1024)
|
@MaxNumber(1024)
|
||||||
@ -167,28 +148,24 @@ public class IrisEffect
|
|||||||
@Desc("The Potion Strength or -1 to disable")
|
@Desc("The Potion Strength or -1 to disable")
|
||||||
private int potionStrength = -1;
|
private int potionStrength = -1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"potionEffect", "potionTicksMin"})
|
@DependsOn({"potionEffect", "potionTicksMin"})
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The max time the potion will last for")
|
@Desc("The max time the potion will last for")
|
||||||
private int potionTicksMax = 155;
|
private int potionTicksMax = 155;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"potionEffect", "potionTicksMax"})
|
@DependsOn({"potionEffect", "potionTicksMax"})
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The min time the potion will last for")
|
@Desc("The min time the potion will last for")
|
||||||
private int potionTicksMin = 75;
|
private int potionTicksMin = 75;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The effect interval in milliseconds")
|
@Desc("The effect interval in milliseconds")
|
||||||
private int interval = 150;
|
private int interval = 150;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DependsOn({"particleEffect"})
|
@DependsOn({"particleEffect"})
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(16)
|
@MaxNumber(16)
|
||||||
@ -196,7 +173,6 @@ public class IrisEffect
|
|||||||
@Desc("The effect distance start away")
|
@Desc("The effect distance start away")
|
||||||
private int particleAway = 5;
|
private int particleAway = 5;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@ -206,10 +182,6 @@ public class IrisEffect
|
|||||||
private final transient AtomicCache<PotionEffectType> pt = new AtomicCache<>();
|
private final transient AtomicCache<PotionEffectType> pt = new AtomicCache<>();
|
||||||
private final transient AtomicCache<ChronoLatch> latch = new AtomicCache<>();
|
private final transient AtomicCache<ChronoLatch> latch = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisEffect()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean canTick()
|
public boolean canTick()
|
||||||
{
|
{
|
||||||
|
@ -13,48 +13,39 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents an enchantment & level")
|
@Desc("Represents an enchantment & level")
|
||||||
@Data
|
@Data
|
||||||
public class IrisEnchantment
|
public class IrisEnchantment
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The enchantment")
|
@Desc("The enchantment")
|
||||||
private String enchantment = "";
|
private String enchantment = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Minimum amount of this loot")
|
@Desc("Minimum amount of this loot")
|
||||||
private int minLevel = 1;
|
private int minLevel = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Maximum amount of this loot")
|
@Desc("Maximum amount of this loot")
|
||||||
private int maxLevel = 1;
|
private int maxLevel = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The chance that this enchantment is applied (0 to 1)")
|
@Desc("The chance that this enchantment is applied (0 to 1)")
|
||||||
private double chance = 1;
|
private double chance = 1;
|
||||||
|
|
||||||
public IrisEnchantment()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void apply(RNG rng, ItemMeta meta)
|
public void apply(RNG rng, ItemMeta meta)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -27,14 +27,13 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Represents an iris entity.")
|
@Desc("Represents an iris entity.")
|
||||||
@ -42,119 +41,94 @@ import lombok.experimental.Accessors;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class IrisEntity extends IrisRegistrant
|
public class IrisEntity extends IrisRegistrant
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The type of entity to spawn")
|
@Desc("The type of entity to spawn")
|
||||||
private EntityType type = EntityType.PIG;
|
private EntityType type = EntityType.PIG;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The custom name of this entity")
|
@Desc("The custom name of this entity")
|
||||||
private String customName = "";
|
private String customName = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Should the name on this entity be visible even if you arent looking at it.")
|
@Desc("Should the name on this entity be visible even if you arent looking at it.")
|
||||||
private boolean customNameVisible = false;
|
private boolean customNameVisible = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If this entity type is a mob, should it be aware of it's surroundings & interact with the world.")
|
@Desc("If this entity type is a mob, should it be aware of it's surroundings & interact with the world.")
|
||||||
private boolean aware = true;
|
private boolean aware = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If this entity type is a creature, should it have ai goals.")
|
@Desc("If this entity type is a creature, should it have ai goals.")
|
||||||
private boolean ai = true;
|
private boolean ai = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Should this entity be glowing")
|
@Desc("Should this entity be glowing")
|
||||||
private boolean glowing = false;
|
private boolean glowing = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Should gravity apply to this entity")
|
@Desc("Should gravity apply to this entity")
|
||||||
private boolean gravity = true;
|
private boolean gravity = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("When an entity is invulnerable it can only be damaged by players increative mode.")
|
@Desc("When an entity is invulnerable it can only be damaged by players increative mode.")
|
||||||
private boolean invulnerable = false;
|
private boolean invulnerable = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("When an entity is silent it will not produce any sound.")
|
@Desc("When an entity is silent it will not produce any sound.")
|
||||||
private boolean silent = false;
|
private boolean silent = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Should this entity be allowed to pickup items")
|
@Desc("Should this entity be allowed to pickup items")
|
||||||
private boolean pickupItems = false;
|
private boolean pickupItems = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Should this entity be removed when far away")
|
@Desc("Should this entity be removed when far away")
|
||||||
private boolean removable = true;
|
private boolean removable = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity helmet equipment")
|
@Desc("Entity helmet equipment")
|
||||||
private IrisLoot helmet = null;
|
private IrisLoot helmet = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity chestplate equipment")
|
@Desc("Entity chestplate equipment")
|
||||||
private IrisLoot chestplate = null;
|
private IrisLoot chestplate = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity boots equipment")
|
@Desc("Entity boots equipment")
|
||||||
private IrisLoot boots = null;
|
private IrisLoot boots = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity leggings equipment")
|
@Desc("Entity leggings equipment")
|
||||||
private IrisLoot leggings = null;
|
private IrisLoot leggings = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity main hand equipment")
|
@Desc("Entity main hand equipment")
|
||||||
private IrisLoot mainHand = null;
|
private IrisLoot mainHand = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity off hand equipment")
|
@Desc("Entity off hand equipment")
|
||||||
private IrisLoot offHand = null;
|
private IrisLoot offHand = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Make other entities ride this entity")
|
@Desc("Make other entities ride this entity")
|
||||||
@ArrayType(min = 1, type = IrisEntity.class)
|
@ArrayType(min = 1, type = IrisEntity.class)
|
||||||
private KList<IrisEntity> passengers = new KList<>();
|
private KList<IrisEntity> passengers = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Attribute modifiers for this entity")
|
@Desc("Attribute modifiers for this entity")
|
||||||
@ArrayType(min = 1, type = IrisAttributeModifier.class)
|
@ArrayType(min = 1, type = IrisAttributeModifier.class)
|
||||||
private KList<IrisAttributeModifier> attributes = new KList<>();
|
private KList<IrisAttributeModifier> attributes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Loot tables for drops")
|
@Desc("Loot tables for drops")
|
||||||
private IrisLootReference loot = new IrisLootReference();
|
private IrisLootReference loot = new IrisLootReference();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If specified, this entity will be leashed by this entity. I.e. THIS ENTITY Leashed by SPECIFIED. This has no effect on EnderDragons, Withers, Players, or Bats.Non-living entities excluding leashes will not persist as leashholders.")
|
@Desc("If specified, this entity will be leashed by this entity. I.e. THIS ENTITY Leashed by SPECIFIED. This has no effect on EnderDragons, Withers, Players, or Bats.Non-living entities excluding leashes will not persist as leashholders.")
|
||||||
private IrisEntity leashHolder = null;
|
private IrisEntity leashHolder = null;
|
||||||
|
|
||||||
public IrisEntity()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public Entity spawn(ParallaxTerrainProvider gen, Location at)
|
public Entity spawn(ParallaxTerrainProvider gen, Location at)
|
||||||
{
|
{
|
||||||
return spawn(gen, at, new RNG(at.hashCode()));
|
return spawn(gen, at, new RNG(at.hashCode()));
|
||||||
|
@ -14,38 +14,34 @@ import com.volmit.iris.util.RegistryListEntity;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents an entity spawn during initial chunk generation")
|
@Desc("Represents an entity spawn during initial chunk generation")
|
||||||
@Data
|
@Data
|
||||||
public class IrisEntityInitialSpawn
|
public class IrisEntityInitialSpawn
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@RegistryListEntity
|
@RegistryListEntity
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The entity")
|
@Desc("The entity")
|
||||||
private String entity = "";
|
private String entity = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The 1 in RARITY chance for this entity to spawn")
|
@Desc("The 1 in RARITY chance for this entity to spawn")
|
||||||
private int rarity = 1;
|
private int rarity = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The minumum of this entity to spawn")
|
@Desc("The minumum of this entity to spawn")
|
||||||
private int minSpawns = 1;
|
private int minSpawns = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The max of this entity to spawn")
|
@Desc("The max of this entity to spawn")
|
||||||
@ -54,11 +50,6 @@ public class IrisEntityInitialSpawn
|
|||||||
private final transient AtomicCache<RNG> rng = new AtomicCache<>();
|
private final transient AtomicCache<RNG> rng = new AtomicCache<>();
|
||||||
private final transient AtomicCache<IrisEntity> ent = new AtomicCache<>();
|
private final transient AtomicCache<IrisEntity> ent = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisEntityInitialSpawn()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void spawn(ParallaxTerrainProvider gen, Chunk c, RNG rng)
|
public void spawn(ParallaxTerrainProvider gen, Chunk c, RNG rng)
|
||||||
{
|
{
|
||||||
int spawns = rng.i(1, rarity) == 1 ? rng.i(minSpawns, maxSpawns) : 0;
|
int spawns = rng.i(1, rarity) == 1 ? rng.i(minSpawns, maxSpawns) : 0;
|
||||||
|
@ -15,37 +15,36 @@ import com.volmit.iris.util.RegistryListEntity;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents an entity spawn")
|
@Desc("Represents an entity spawn")
|
||||||
@Data
|
@Data
|
||||||
public class IrisEntitySpawnOverride
|
public class IrisEntitySpawnOverride
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@RegistryListEntity
|
@RegistryListEntity
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The entity")
|
@Desc("The entity")
|
||||||
private String entity = "";
|
private String entity = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If the following entity type spawns, spawn this entity. Set to unknown for any entity spawn")
|
@Desc("If the following entity type spawns, spawn this entity. Set to unknown for any entity spawn")
|
||||||
private EntityType trigger = EntityType.UNKNOWN;
|
private EntityType trigger = EntityType.UNKNOWN;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If the source is triggered, cancel spawning the original entity instead of ADDING a new entity.")
|
@Desc("If the source is triggered, cancel spawning the original entity instead of ADDING a new entity.")
|
||||||
private boolean cancelSourceSpawn = false;
|
private boolean cancelSourceSpawn = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The 1 in RARITY chance for this entity to spawn")
|
@Desc("The 1 in RARITY chance for this entity to spawn")
|
||||||
@ -54,10 +53,6 @@ public class IrisEntitySpawnOverride
|
|||||||
private final transient AtomicCache<RNG> rng = new AtomicCache<>();
|
private final transient AtomicCache<RNG> rng = new AtomicCache<>();
|
||||||
private final transient AtomicCache<IrisEntity> ent = new AtomicCache<>();
|
private final transient AtomicCache<IrisEntity> ent = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisEntitySpawnOverride()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public Entity on(IrisTerrainProvider g, Location at, EntityType t, EntitySpawnEvent ee)
|
public Entity on(IrisTerrainProvider g, Location at, EntityType t, EntitySpawnEvent ee)
|
||||||
{
|
{
|
||||||
|
@ -17,110 +17,91 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents a composite generator of noise gens")
|
@Desc("Represents a composite generator of noise gens")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class IrisGenerator extends IrisRegistrant
|
public class IrisGenerator extends IrisRegistrant
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.001)
|
@MinNumber(0.001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The zoom or frequency.")
|
@Desc("The zoom or frequency.")
|
||||||
private double zoom = 1;
|
private double zoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The opacity, essentially a multiplier on the output.")
|
@Desc("The opacity, essentially a multiplier on the output.")
|
||||||
private double opacity = 1;
|
private double opacity = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.001)
|
@MinNumber(0.001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The size of the cell fractures")
|
@Desc("The size of the cell fractures")
|
||||||
private double cellFractureZoom = 1D;
|
private double cellFractureZoom = 1D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Cell Fracture Coordinate Shuffling")
|
@Desc("Cell Fracture Coordinate Shuffling")
|
||||||
private double cellFractureShuffle = 12D;
|
private double cellFractureShuffle = 12D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The height of fracture cells. Set to 0 to disable")
|
@Desc("The height of fracture cells. Set to 0 to disable")
|
||||||
private double cellFractureHeight = 0D;
|
private double cellFractureHeight = 0D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("How big are the cells (X,Z) relative to the veins that touch them. Between 0 and 1. 0.1 means thick veins, small cells.")
|
@Desc("How big are the cells (X,Z) relative to the veins that touch them. Between 0 and 1. 0.1 means thick veins, small cells.")
|
||||||
private double cellPercentSize = 0.75D;
|
private double cellPercentSize = 0.75D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The offset to shift this noise x")
|
@Desc("The offset to shift this noise x")
|
||||||
private double offsetX = 0;
|
private double offsetX = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The offset to shift this noise z")
|
@Desc("The offset to shift this noise z")
|
||||||
private double offsetZ = 0;
|
private double offsetZ = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The seed for this generator")
|
@Desc("The seed for this generator")
|
||||||
private long seed = 1;
|
private long seed = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The interpolator to use when smoothing this generator into other regions & generators")
|
@Desc("The interpolator to use when smoothing this generator into other regions & generators")
|
||||||
private IrisInterpolator interpolator = new IrisInterpolator();
|
private IrisInterpolator interpolator = new IrisInterpolator();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(8192)
|
@MaxNumber(8192)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Cliff Height Max. Disable with 0 for min and max")
|
@Desc("Cliff Height Max. Disable with 0 for min and max")
|
||||||
private double cliffHeightMax = 0;
|
private double cliffHeightMax = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(8192)
|
@MaxNumber(8192)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Cliff Height Min. Disable with 0 for min and max")
|
@Desc("Cliff Height Min. Disable with 0 for min and max")
|
||||||
private double cliffHeightMin = 0;
|
private double cliffHeightMin = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisNoiseGenerator.class)
|
@ArrayType(min = 1, type = IrisNoiseGenerator.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The list of noise gens this gen contains.")
|
@Desc("The list of noise gens this gen contains.")
|
||||||
private KList<IrisNoiseGenerator> composite = new KList<IrisNoiseGenerator>();
|
private KList<IrisNoiseGenerator> composite = new KList<IrisNoiseGenerator>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The noise gen for cliff height.")
|
@Desc("The noise gen for cliff height.")
|
||||||
private IrisNoiseGenerator cliffHeightGenerator = new IrisNoiseGenerator();
|
private IrisNoiseGenerator cliffHeightGenerator = new IrisNoiseGenerator();
|
||||||
|
|
||||||
private final transient AtomicCache<CellGenerator> cellGen = new AtomicCache<>();
|
private final transient AtomicCache<CellGenerator> cellGen = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisGenerator()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getMax()
|
public double getMax()
|
||||||
{
|
{
|
||||||
return opacity;
|
return opacity;
|
||||||
|
@ -10,42 +10,37 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A gen style")
|
@Desc("A gen style")
|
||||||
@Data
|
@Data
|
||||||
public class IrisGeneratorStyle
|
public class IrisGeneratorStyle
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The chance is 1 in CHANCE per interval")
|
@Desc("The chance is 1 in CHANCE per interval")
|
||||||
private NoiseStyle style = NoiseStyle.IRIS;
|
private NoiseStyle style = NoiseStyle.IRIS;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@MinNumber(0.00001)
|
@MinNumber(0.00001)
|
||||||
@Desc("The zoom of this style")
|
@Desc("The zoom of this style")
|
||||||
private double zoom = 1;
|
private double zoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@MinNumber(0.00001)
|
@MinNumber(0.00001)
|
||||||
@Desc("The Output multiplier. Only used if parent is fracture.")
|
@Desc("The Output multiplier. Only used if parent is fracture.")
|
||||||
private double multiplier = 1;
|
private double multiplier = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Apply a generator to the coordinate field fed into this parent generator. I.e. Distort your generator with another generator.")
|
@Desc("Apply a generator to the coordinate field fed into this parent generator. I.e. Distort your generator with another generator.")
|
||||||
private IrisGeneratorStyle fracture = null;
|
private IrisGeneratorStyle fracture = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@MinNumber(0.01562)
|
@MinNumber(0.01562)
|
||||||
@MaxNumber(64)
|
@MaxNumber(64)
|
||||||
@ -54,11 +49,6 @@ public class IrisGeneratorStyle
|
|||||||
|
|
||||||
private final transient AtomicCache<CNG> cng = new AtomicCache<CNG>();
|
private final transient AtomicCache<CNG> cng = new AtomicCache<CNG>();
|
||||||
|
|
||||||
public IrisGeneratorStyle()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public IrisGeneratorStyle(NoiseStyle s)
|
public IrisGeneratorStyle(NoiseStyle s)
|
||||||
{
|
{
|
||||||
this.style = s;
|
this.style = s;
|
||||||
@ -69,7 +59,7 @@ public class IrisGeneratorStyle
|
|||||||
this.zoom = z;
|
this.zoom = z;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CNG create(RNG rng)
|
public CNG create(RNG rng)
|
||||||
{
|
{
|
||||||
return cng.aquire(() ->
|
return cng.aquire(() ->
|
||||||
|
@ -9,25 +9,23 @@ import com.volmit.iris.util.NoiseProvider;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Configures rotation for iris")
|
@Desc("Configures rotation for iris")
|
||||||
@Data
|
@Data
|
||||||
public class IrisInterpolator
|
public class IrisInterpolator
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The interpolation method when two biomes use different heights but this same generator")
|
@Desc("The interpolation method when two biomes use different heights but this same generator")
|
||||||
private InterpolationMethod function = InterpolationMethod.BICUBIC;
|
private InterpolationMethod function = InterpolationMethod.BICUBIC;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(8192)
|
@MaxNumber(8192)
|
||||||
@ -35,11 +33,6 @@ public class IrisInterpolator
|
|||||||
@Desc("The range checked horizontally. Smaller ranges yeild more detail but are not as smooth.")
|
@Desc("The range checked horizontally. Smaller ranges yeild more detail but are not as smooth.")
|
||||||
private double horizontalScale = 3;
|
private double horizontalScale = 3;
|
||||||
|
|
||||||
public IrisInterpolator()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public double interpolate(double x, double z, NoiseProvider provider)
|
public double interpolate(double x, double z, NoiseProvider provider)
|
||||||
{
|
{
|
||||||
return interpolate((int) Math.round(x), (int) Math.round(z), provider);
|
return interpolate((int) Math.round(x), (int) Math.round(z), provider);
|
||||||
|
@ -27,118 +27,97 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents a loot entry")
|
@Desc("Represents a loot entry")
|
||||||
@Data
|
@Data
|
||||||
public class IrisLoot
|
public class IrisLoot
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The target inventory slot types to fill this loot with")
|
@Desc("The target inventory slot types to fill this loot with")
|
||||||
private InventorySlotType slotTypes = InventorySlotType.STORAGE;
|
private InventorySlotType slotTypes = InventorySlotType.STORAGE;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The sub rarity of this loot. Calculated after this loot table has been picked.")
|
@Desc("The sub rarity of this loot. Calculated after this loot table has been picked.")
|
||||||
private int rarity = 1;
|
private int rarity = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Minimum amount of this loot")
|
@Desc("Minimum amount of this loot")
|
||||||
private int minAmount = 1;
|
private int minAmount = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Maximum amount of this loot")
|
@Desc("Maximum amount of this loot")
|
||||||
private int maxAmount = 1;
|
private int maxAmount = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The display name of this item")
|
@Desc("The display name of this item")
|
||||||
private String displayName = null;
|
private String displayName = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Minimum durability percent")
|
@Desc("Minimum durability percent")
|
||||||
private double minDurability = 0;
|
private double minDurability = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Maximum durability percent")
|
@Desc("Maximum durability percent")
|
||||||
private double maxDurability = 1;
|
private double maxDurability = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Define a custom model identifier 1.14+ only")
|
@Desc("Define a custom model identifier 1.14+ only")
|
||||||
private Integer customModel = null;
|
private Integer customModel = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Set this to true to prevent it from being broken")
|
@Desc("Set this to true to prevent it from being broken")
|
||||||
private boolean unbreakable = false;
|
private boolean unbreakable = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = ItemFlag.class)
|
@ArrayType(min = 1, type = ItemFlag.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The item flags to add")
|
@Desc("The item flags to add")
|
||||||
private KList<ItemFlag> itemFlags = new KList<>();
|
private KList<ItemFlag> itemFlags = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Apply enchantments to this item")
|
@Desc("Apply enchantments to this item")
|
||||||
@ArrayType(min = 1, type = IrisEnchantment.class)
|
@ArrayType(min = 1, type = IrisEnchantment.class)
|
||||||
private KList<IrisEnchantment> enchantments = new KList<>();
|
private KList<IrisEnchantment> enchantments = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Apply attribute modifiers to this item")
|
@Desc("Apply attribute modifiers to this item")
|
||||||
@ArrayType(min = 1, type = IrisAttributeModifier.class)
|
@ArrayType(min = 1, type = IrisAttributeModifier.class)
|
||||||
private KList<IrisAttributeModifier> attributes = new KList<>();
|
private KList<IrisAttributeModifier> attributes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Add lore to this item")
|
@Desc("Add lore to this item")
|
||||||
private KList<String> lore = new KList<>();
|
private KList<String> lore = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("This is the item or block type. Does not accept minecraft:*. Only materials such as DIAMOND_SWORD or DIRT.")
|
@Desc("This is the item or block type. Does not accept minecraft:*. Only materials such as DIAMOND_SWORD or DIRT.")
|
||||||
private String type = "";
|
private String type = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The dye color")
|
@Desc("The dye color")
|
||||||
private DyeColor dyeColor = null;
|
private DyeColor dyeColor = null;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The leather armor color")
|
@Desc("The leather armor color")
|
||||||
private String leatherColor = null;
|
private String leatherColor = null;
|
||||||
|
|
||||||
private final transient AtomicCache<CNG> chance = new AtomicCache<>();
|
private final transient AtomicCache<CNG> chance = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisLoot()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public Material getType()
|
public Material getType()
|
||||||
{
|
{
|
||||||
return B.getMaterial(type);
|
return B.getMaterial(type);
|
||||||
|
@ -10,31 +10,28 @@ import com.volmit.iris.util.MinNumber;
|
|||||||
import com.volmit.iris.util.RegistryListLoot;
|
import com.volmit.iris.util.RegistryListLoot;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents a loot entry")
|
@Desc("Represents a loot entry")
|
||||||
@Data
|
@Data
|
||||||
public class IrisLootReference
|
public class IrisLootReference
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Add = add on top of parent tables, Replace = clear first then add these. Clear = Remove all and dont add loot from this or parent.")
|
@Desc("Add = add on top of parent tables, Replace = clear first then add these. Clear = Remove all and dont add loot from this or parent.")
|
||||||
private LootMode mode = LootMode.ADD;
|
private LootMode mode = LootMode.ADD;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@RegistryListLoot
|
@RegistryListLoot
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@Desc("Add loot table registries here")
|
@Desc("Add loot table registries here")
|
||||||
private KList<String> tables = new KList<>();
|
private KList<String> tables = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Increase the chance of loot in this area")
|
@Desc("Increase the chance of loot in this area")
|
||||||
@ -42,11 +39,6 @@ public class IrisLootReference
|
|||||||
|
|
||||||
private final transient AtomicCache<KList<IrisLootTable>> tt = new AtomicCache<>();
|
private final transient AtomicCache<KList<IrisLootTable>> tt = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisLootReference()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public KList<IrisLootTable> getLootTables(DimensionalTerrainProvider g)
|
public KList<IrisLootTable> getLootTables(DimensionalTerrainProvider g)
|
||||||
{
|
{
|
||||||
return tt.aquire(() ->
|
return tt.aquire(() ->
|
||||||
|
@ -11,14 +11,13 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents a loot table. Biomes, Regions & Objects can add or replace the virtual table with these loot tables")
|
@Desc("Represents a loot table. Biomes, Regions & Objects can add or replace the virtual table with these loot tables")
|
||||||
@Data
|
@Data
|
||||||
@ -26,35 +25,27 @@ import lombok.experimental.Accessors;
|
|||||||
public class IrisLootTable extends IrisRegistrant
|
public class IrisLootTable extends IrisRegistrant
|
||||||
{
|
{
|
||||||
@Required
|
@Required
|
||||||
@Builder.Default
|
|
||||||
@Desc("The name of this loot table")
|
@Desc("The name of this loot table")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@MinNumber(2)
|
@MinNumber(2)
|
||||||
private String name = "";
|
private String name = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The rarity as in 1 in X chance")
|
@Desc("The rarity as in 1 in X chance")
|
||||||
private int rarity = 1;
|
private int rarity = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The maximum amount of loot that can be picked in this table at a time.")
|
@Desc("The maximum amount of loot that can be picked in this table at a time.")
|
||||||
private int maxPicked = 3;
|
private int maxPicked = 3;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The loot in this table")
|
@Desc("The loot in this table")
|
||||||
@ArrayType(min = 1, type = IrisLoot.class)
|
@ArrayType(min = 1, type = IrisLoot.class)
|
||||||
private KList<IrisLoot> loot = new KList<>();
|
private KList<IrisLoot> loot = new KList<>();
|
||||||
|
|
||||||
public IrisLootTable()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public KList<ItemStack> getLoot(boolean debug, RNG rng, InventorySlotType slot, int x, int y, int z, int gg, int ffs)
|
public KList<ItemStack> getLoot(boolean debug, RNG rng, InventorySlotType slot, int x, int y, int z, int gg, int ffs)
|
||||||
{
|
{
|
||||||
KList<ItemStack> lootf = new KList<>();
|
KList<ItemStack> lootf = new KList<>();
|
||||||
|
@ -14,30 +14,27 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A palette of materials")
|
@Desc("A palette of materials")
|
||||||
@Data
|
@Data
|
||||||
public class IrisMaterialPalette
|
public class IrisMaterialPalette
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The style of noise")
|
@Desc("The style of noise")
|
||||||
private IrisGeneratorStyle style = NoiseStyle.STATIC.style();
|
private IrisGeneratorStyle style = NoiseStyle.STATIC.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The terrain zoom mostly for zooming in on a wispy palette")
|
@Desc("The terrain zoom mostly for zooming in on a wispy palette")
|
||||||
private double zoom = 5;
|
private double zoom = 5;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@ -48,11 +45,6 @@ public class IrisMaterialPalette
|
|||||||
private final transient AtomicCache<CNG> layerGenerator = new AtomicCache<>();
|
private final transient AtomicCache<CNG> layerGenerator = new AtomicCache<>();
|
||||||
private final transient AtomicCache<CNG> heightGenerator = new AtomicCache<>();
|
private final transient AtomicCache<CNG> heightGenerator = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisMaterialPalette()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockData get(RNG rng, double x, double y, double z)
|
public BlockData get(RNG rng, double x, double y, double z)
|
||||||
{
|
{
|
||||||
if(getBlockData().isEmpty())
|
if(getBlockData().isEmpty())
|
||||||
|
@ -12,94 +12,79 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A noise generator")
|
@Desc("A noise generator")
|
||||||
@Data
|
@Data
|
||||||
public class IrisNoiseGenerator
|
public class IrisNoiseGenerator
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The coordinate input zoom")
|
@Desc("The coordinate input zoom")
|
||||||
private double zoom = 1;
|
private double zoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Reverse the output. So that noise = -noise + opacity")
|
@Desc("Reverse the output. So that noise = -noise + opacity")
|
||||||
private boolean negative = false;
|
private boolean negative = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The output multiplier")
|
@Desc("The output multiplier")
|
||||||
private double opacity = 1;
|
private double opacity = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Coordinate offset x")
|
@Desc("Coordinate offset x")
|
||||||
private double offsetX = 0;
|
private double offsetX = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Height output offset y")
|
@Desc("Height output offset y")
|
||||||
private double offsetY = 0;
|
private double offsetY = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Coordinate offset z")
|
@Desc("Coordinate offset z")
|
||||||
private double offsetZ = 0;
|
private double offsetZ = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The seed")
|
@Desc("The seed")
|
||||||
private long seed = 0;
|
private long seed = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Apply a parametric curve on the output")
|
@Desc("Apply a parametric curve on the output")
|
||||||
private boolean parametric = false;
|
private boolean parametric = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Apply a bezier curve on the output")
|
@Desc("Apply a bezier curve on the output")
|
||||||
private boolean bezier = false;
|
private boolean bezier = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Apply a sin-center curve on the output (0, and 1 = 0 and 0.5 = 1.0 using a sinoid shape.)")
|
@Desc("Apply a sin-center curve on the output (0, and 1 = 0 and 0.5 = 1.0 using a sinoid shape.)")
|
||||||
private boolean sinCentered = false;
|
private boolean sinCentered = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The exponent noise^EXPONENT")
|
@Desc("The exponent noise^EXPONENT")
|
||||||
private double exponent = 1;
|
private double exponent = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Enable / disable. Outputs offsetY if disabled")
|
@Desc("Enable / disable. Outputs offsetY if disabled")
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The Noise Style")
|
@Desc("The Noise Style")
|
||||||
private IrisGeneratorStyle style = NoiseStyle.IRIS.style();
|
private IrisGeneratorStyle style = NoiseStyle.IRIS.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Multiple octaves for multple generators of changing zooms added together")
|
@Desc("Multiple octaves for multple generators of changing zooms added together")
|
||||||
private int octaves = 1;
|
private int octaves = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisNoiseGenerator.class)
|
@ArrayType(min = 1, type = IrisNoiseGenerator.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Apply a child noise generator to fracture the input coordinates of this generator")
|
@Desc("Apply a child noise generator to fracture the input coordinates of this generator")
|
||||||
@ -107,11 +92,6 @@ public class IrisNoiseGenerator
|
|||||||
|
|
||||||
private final transient AtomicCache<CNG> generator = new AtomicCache<>();
|
private final transient AtomicCache<CNG> generator = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisNoiseGenerator()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public IrisNoiseGenerator(boolean enabled)
|
public IrisNoiseGenerator(boolean enabled)
|
||||||
{
|
{
|
||||||
this();
|
this();
|
||||||
|
@ -6,37 +6,30 @@ import com.volmit.iris.util.MaxNumber;
|
|||||||
import com.volmit.iris.util.MinNumber;
|
import com.volmit.iris.util.MinNumber;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Translate objects")
|
@Desc("Translate objects")
|
||||||
@Data
|
@Data
|
||||||
public class IrisObjectLimit
|
public class IrisObjectLimit
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(255)
|
@MaxNumber(255)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The minimum height for placement (bottom of object)")
|
@Desc("The minimum height for placement (bottom of object)")
|
||||||
private int minimumHeight = 0;
|
private int minimumHeight = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(255)
|
@MaxNumber(255)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The maximum height for placement (top of object)")
|
@Desc("The maximum height for placement (top of object)")
|
||||||
private int maximumHeight = 255;
|
private int maximumHeight = 255;
|
||||||
|
|
||||||
public IrisObjectLimit()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean canPlace(int h, int l)
|
public boolean canPlace(int h, int l)
|
||||||
{
|
{
|
||||||
if(h > maximumHeight || l < minimumHeight)
|
if(h > maximumHeight || l < minimumHeight)
|
||||||
|
@ -15,19 +15,18 @@ import com.volmit.iris.util.RegistryListObject;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents an iris object placer. It places objects.")
|
@Desc("Represents an iris object placer. It places objects.")
|
||||||
@Data
|
@Data
|
||||||
public class IrisObjectPlacement
|
public class IrisObjectPlacement
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@RegistryListObject
|
@RegistryListObject
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@ -35,45 +34,37 @@ public class IrisObjectPlacement
|
|||||||
@Desc("List of objects to place")
|
@Desc("List of objects to place")
|
||||||
private KList<String> place = new KList<>();
|
private KList<String> place = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If the place mode is set to CENTER_HEIGHT_RIGID and you have an X/Z translation, Turning on translate center will also translate the center height check.")
|
@Desc("If the place mode is set to CENTER_HEIGHT_RIGID and you have an X/Z translation, Turning on translate center will also translate the center height check.")
|
||||||
private boolean translateCenter = false;
|
private boolean translateCenter = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The placement mode")
|
@Desc("The placement mode")
|
||||||
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
|
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisObjectReplace.class)
|
@ArrayType(min = 1, type = IrisObjectReplace.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Find and replace blocks")
|
@Desc("Find and replace blocks")
|
||||||
private KList<IrisObjectReplace> edit = new KList<>();
|
private KList<IrisObjectReplace> edit = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Translate this object's placement")
|
@Desc("Translate this object's placement")
|
||||||
private IrisObjectTranslate translate = new IrisObjectTranslate();
|
private IrisObjectTranslate translate = new IrisObjectTranslate();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Rotate this objects placement")
|
@Desc("Rotate this objects placement")
|
||||||
private IrisObjectRotation rotation = new IrisObjectRotation();
|
private IrisObjectRotation rotation = new IrisObjectRotation();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Limit the max height or min height of placement.")
|
@Desc("Limit the max height or min height of placement.")
|
||||||
private IrisObjectLimit clamp = new IrisObjectLimit();
|
private IrisObjectLimit clamp = new IrisObjectLimit();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The maximum layer level of a snow filter overtop of this placement. Set to 0 to disable. Max of 1.")
|
@Desc("The maximum layer level of a snow filter overtop of this placement. Set to 0 to disable. Max of 1.")
|
||||||
private double snow = 0;
|
private double snow = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@ -81,80 +72,63 @@ public class IrisObjectPlacement
|
|||||||
@Desc("The chance for this to place in a chunk. If you need multiple per chunk, set this to 1 and use density.")
|
@Desc("The chance for this to place in a chunk. If you need multiple per chunk, set this to 1 and use density.")
|
||||||
private double chance = 1;
|
private double chance = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If the chance check passes, place this many in a single chunk")
|
@Desc("If the chance check passes, place this many in a single chunk")
|
||||||
private int density = 1;
|
private int density = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MaxNumber(64)
|
@MaxNumber(64)
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If the place mode is set to stilt, you can over-stilt it even further into the ground. Especially useful when using fast stilt due to inaccuracies.")
|
@Desc("If the place mode is set to stilt, you can over-stilt it even further into the ground. Especially useful when using fast stilt due to inaccuracies.")
|
||||||
private int overStilt = 0;
|
private int overStilt = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MaxNumber(64)
|
@MaxNumber(64)
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("When boar is enabled, expand max-y of the cuboid it removes")
|
@Desc("When boar is enabled, expand max-y of the cuboid it removes")
|
||||||
private int boarExtendMaxY = 0;
|
private int boarExtendMaxY = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MaxNumber(64)
|
@MaxNumber(64)
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("When boar is enabled, lower min-y of the cuboid it removes")
|
@Desc("When boar is enabled, lower min-y of the cuboid it removes")
|
||||||
private int boarExtendMinY = 0;
|
private int boarExtendMinY = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, objects will place on the terrain height, ignoring the water surface.")
|
@Desc("If set to true, objects will place on the terrain height, ignoring the water surface.")
|
||||||
private boolean underwater = false;
|
private boolean underwater = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, Iris will try to fill the insides of 'rooms' and 'pockets' where air should fit based off of raytrace checks. This prevents a village house placing in an area where a tree already exists, and instead replaces the parts of the tree where the interior of the structure is. \n\nThis operation does not affect warmed-up generation speed however it does slow down loading objects.")
|
@Desc("If set to true, Iris will try to fill the insides of 'rooms' and 'pockets' where air should fit based off of raytrace checks. This prevents a village house placing in an area where a tree already exists, and instead replaces the parts of the tree where the interior of the structure is. \n\nThis operation does not affect warmed-up generation speed however it does slow down loading objects.")
|
||||||
private boolean smartBore = false;
|
private boolean smartBore = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, Blocks placed underwater that could be waterlogged are waterlogged.")
|
@Desc("If set to true, Blocks placed underwater that could be waterlogged are waterlogged.")
|
||||||
private boolean waterloggable = true;
|
private boolean waterloggable = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, objects will place on the fluid height level Such as boats.")
|
@Desc("If set to true, objects will place on the fluid height level Such as boats.")
|
||||||
private boolean onwater = false;
|
private boolean onwater = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, this object will only place parts of itself where blocks already exist. Warning: Melding is very performance intensive!")
|
@Desc("If set to true, this object will only place parts of itself where blocks already exist. Warning: Melding is very performance intensive!")
|
||||||
private boolean meld = false;
|
private boolean meld = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, this object will place from the ground up instead of height checks when not y locked to the surface. This is not compatable with X and Z axis rotations (it may look off)")
|
@Desc("If set to true, this object will place from the ground up instead of height checks when not y locked to the surface. This is not compatable with X and Z axis rotations (it may look off)")
|
||||||
private boolean bottom = false;
|
private boolean bottom = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, air will be placed before the schematic places.")
|
@Desc("If set to true, air will be placed before the schematic places.")
|
||||||
private boolean bore = false;
|
private boolean bore = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Use a generator to warp the field of coordinates. Using simplex for example would make a square placement warp like a flag")
|
@Desc("Use a generator to warp the field of coordinates. Using simplex for example would make a square placement warp like a flag")
|
||||||
private IrisGeneratorStyle warp = new IrisGeneratorStyle(NoiseStyle.FLAT);
|
private IrisGeneratorStyle warp = new IrisGeneratorStyle(NoiseStyle.FLAT);
|
||||||
|
|
||||||
private final transient AtomicCache<CNG> surfaceWarp = new AtomicCache<>();
|
private final transient AtomicCache<CNG> surfaceWarp = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisObjectPlacement()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public CNG getSurfaceWarp(RNG rng)
|
public CNG getSurfaceWarp(RNG rng)
|
||||||
{
|
{
|
||||||
return surfaceWarp.aquire(() ->
|
return surfaceWarp.aquire(() ->
|
||||||
|
@ -13,33 +13,32 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Find and replace object materials")
|
@Desc("Find and replace object materials")
|
||||||
@Data
|
@Data
|
||||||
public class IrisObjectReplace
|
public class IrisObjectReplace
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@Required
|
@Required
|
||||||
@Desc("Find this block")
|
@Desc("Find this block")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private KList<String> find = new KList<>();
|
private KList<String> find = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@Required
|
@Required
|
||||||
@Desc("Replace it with this block")
|
@Desc("Replace it with this block")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private KList<String> replace = new KList<>();
|
private KList<String> replace = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Desc("Exactly match the block data or not")
|
@Desc("Exactly match the block data or not")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private boolean exact = false;
|
private boolean exact = false;
|
||||||
@ -48,11 +47,6 @@ public class IrisObjectReplace
|
|||||||
private final transient AtomicCache<KList<BlockData>> findData = new AtomicCache<>();
|
private final transient AtomicCache<KList<BlockData>> findData = new AtomicCache<>();
|
||||||
private final transient AtomicCache<KList<BlockData>> replaceData = new AtomicCache<>();
|
private final transient AtomicCache<KList<BlockData>> replaceData = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisObjectReplace()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public KList<BlockData> getFind()
|
public KList<BlockData> getFind()
|
||||||
{
|
{
|
||||||
return findData.aquire(() -> B.getBlockData(find));
|
return findData.aquire(() -> B.getBlockData(find));
|
||||||
|
@ -14,43 +14,34 @@ import com.volmit.iris.util.DontObfuscate;
|
|||||||
import com.volmit.iris.util.KList;
|
import com.volmit.iris.util.KList;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Configures rotation for iris")
|
@Desc("Configures rotation for iris")
|
||||||
@Data
|
@Data
|
||||||
public class IrisObjectRotation
|
public class IrisObjectRotation
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If this rotator is enabled or not")
|
@Desc("If this rotator is enabled or not")
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The x axis rotation")
|
@Desc("The x axis rotation")
|
||||||
private IrisAxisRotationClamp xAxis = new IrisAxisRotationClamp();
|
private IrisAxisRotationClamp xAxis = new IrisAxisRotationClamp();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The y axis rotation")
|
@Desc("The y axis rotation")
|
||||||
private IrisAxisRotationClamp yAxis = new IrisAxisRotationClamp(true, 0, 0, 90);
|
private IrisAxisRotationClamp yAxis = new IrisAxisRotationClamp(true, 0, 0, 90);
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The z axis rotation")
|
@Desc("The z axis rotation")
|
||||||
private IrisAxisRotationClamp zAxis = new IrisAxisRotationClamp();
|
private IrisAxisRotationClamp zAxis = new IrisAxisRotationClamp();
|
||||||
|
|
||||||
public IrisObjectRotation()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getYRotation(int spin)
|
public double getYRotation(int spin)
|
||||||
{
|
{
|
||||||
return getRotation(spin, yAxis);
|
return getRotation(spin, yAxis);
|
||||||
|
@ -9,26 +9,24 @@ import com.volmit.iris.util.MinNumber;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Translate objects")
|
@Desc("Translate objects")
|
||||||
@Data
|
@Data
|
||||||
public class IrisObjectTranslate
|
public class IrisObjectTranslate
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(-128)
|
@MinNumber(-128)
|
||||||
@MaxNumber(128)
|
@MaxNumber(128)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The x shift in blocks")
|
@Desc("The x shift in blocks")
|
||||||
private int x = 0;
|
private int x = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(-256)
|
@MinNumber(-256)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@ -36,27 +34,18 @@ public class IrisObjectTranslate
|
|||||||
@Desc("The x shift in blocks")
|
@Desc("The x shift in blocks")
|
||||||
private int y = 0;
|
private int y = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(-128)
|
@MinNumber(-128)
|
||||||
@MaxNumber(128)
|
@MaxNumber(128)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Adds an additional amount of height randomly (translateY + rand(0 - yRandom))")
|
@Desc("Adds an additional amount of height randomly (translateY + rand(0 - yRandom))")
|
||||||
private int yRandom = 0;
|
private int yRandom = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(-128)
|
@MinNumber(-128)
|
||||||
@MaxNumber(128)
|
@MaxNumber(128)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The x shift in blocks")
|
@Desc("The x shift in blocks")
|
||||||
private int z = 0;
|
private int z = 0;
|
||||||
|
|
||||||
public IrisObjectTranslate()
|
|
||||||
{
|
|
||||||
x = 0;
|
|
||||||
y = 0;
|
|
||||||
z = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean canTranslate()
|
public boolean canTranslate()
|
||||||
{
|
{
|
||||||
return x != 0 || y != 0 || z != 0;
|
return x != 0 || y != 0 || z != 0;
|
||||||
|
@ -13,26 +13,24 @@ import com.volmit.iris.util.MinNumber;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("An iris potion effect")
|
@Desc("An iris potion effect")
|
||||||
@Data
|
@Data
|
||||||
public class IrisPotionEffect
|
public class IrisPotionEffect
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The potion effect to apply in this area")
|
@Desc("The potion effect to apply in this area")
|
||||||
private String potionEffect = "";
|
private String potionEffect = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(-1)
|
@MinNumber(-1)
|
||||||
@MaxNumber(1024)
|
@MaxNumber(1024)
|
||||||
@ -40,30 +38,22 @@ public class IrisPotionEffect
|
|||||||
@Desc("The Potion Strength or -1 to disable")
|
@Desc("The Potion Strength or -1 to disable")
|
||||||
private int strength = -1;
|
private int strength = -1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The time the potion will last for")
|
@Desc("The time the potion will last for")
|
||||||
private int ticks = 200;
|
private int ticks = 200;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Is the effect ambient")
|
@Desc("Is the effect ambient")
|
||||||
private boolean ambient = false;
|
private boolean ambient = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Is the effect showing particles")
|
@Desc("Is the effect showing particles")
|
||||||
private boolean particles = true;
|
private boolean particles = true;
|
||||||
|
|
||||||
private final transient AtomicCache<PotionEffectType> pt = new AtomicCache<>();
|
private final transient AtomicCache<PotionEffectType> pt = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisPotionEffect()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public PotionEffectType getRealType()
|
public PotionEffectType getRealType()
|
||||||
{
|
{
|
||||||
return pt.aquire(() ->
|
return pt.aquire(() ->
|
||||||
|
@ -7,14 +7,13 @@ import com.volmit.iris.util.RegistryListObject;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Represents a structure tile")
|
@Desc("Represents a structure tile")
|
||||||
@ -22,22 +21,16 @@ import lombok.experimental.Accessors;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class IrisRareObject
|
public class IrisRareObject
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@Desc("The rarity is 1 in X")
|
@Desc("The rarity is 1 in X")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private int rarity = 1;
|
private int rarity = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListObject
|
@RegistryListObject
|
||||||
@Required
|
@Required
|
||||||
@Desc("The object to place if rarity check passed")
|
@Desc("The object to place if rarity check passed")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private String object = "";
|
private String object = "";
|
||||||
|
|
||||||
public IrisRareObject()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -6,61 +6,49 @@ import com.volmit.iris.util.MinNumber;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents a carving that slices through the surface")
|
@Desc("Represents a carving that slices through the surface")
|
||||||
@Data
|
@Data
|
||||||
public class IrisRavineLayer
|
public class IrisRavineLayer
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The vertical slope this cave layer follows typically you would set both the min and max values to negative values so the ravine is always under the surface.")
|
@Desc("The vertical slope this cave layer follows typically you would set both the min and max values to negative values so the ravine is always under the surface.")
|
||||||
private IrisShapedGeneratorStyle verticalSlope = IrisShapedGeneratorStyle.builder().generator(new IrisGeneratorStyle(NoiseStyle.IRIS_THICK)).min(-19).max(-11).build();
|
private IrisShapedGeneratorStyle verticalSlope = new IrisShapedGeneratorStyle(new IrisGeneratorStyle(NoiseStyle.IRIS_THICK), -19, -11);
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The horizontal slope this cave layer follows. This affects if the ravine is straight or curves or even whirls around")
|
@Desc("The horizontal slope this cave layer follows. This affects if the ravine is straight or curves or even whirls around")
|
||||||
private IrisShapedGeneratorStyle horizontalSlope = IrisShapedGeneratorStyle.builder().generator(new IrisGeneratorStyle(NoiseStyle.IRIS)).min(-30).max(30).build();
|
private IrisShapedGeneratorStyle horizontalSlope = new IrisShapedGeneratorStyle(new IrisGeneratorStyle(NoiseStyle.IRIS), -30, 30);
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If defined, a cave fluid will fill this cave below (or above) the specified fluidHeight in this object.")
|
@Desc("If defined, a cave fluid will fill this cave below (or above) the specified fluidHeight in this object.")
|
||||||
private IrisCaveFluid fluid = new IrisCaveFluid();
|
private IrisCaveFluid fluid = new IrisCaveFluid();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.001)
|
@MinNumber(0.001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The cave zoom. Higher values makes caves spread out further and branch less often, but are thicker.")
|
@Desc("The cave zoom. Higher values makes caves spread out further and branch less often, but are thicker.")
|
||||||
private double caveZoom = 1D;
|
private double caveZoom = 1D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.001)
|
@MinNumber(0.001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The ravine thickness.")
|
@Desc("The ravine thickness.")
|
||||||
private double ravineThickness = 1D;
|
private double ravineThickness = 1D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The ravine rarity as 1 in rarity chance.")
|
@Desc("The ravine rarity as 1 in rarity chance.")
|
||||||
private int rarity = 12;
|
private int rarity = 12;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.001)
|
@MinNumber(0.001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The ravine rarity zoom is how large of a check area at a time iris will do. For example, with higher zooms ravines will have the same effective rarity, but when you actually find a ravine, it will be near a whole patch of ravines. Setting a lower zoom such as 0.25 will make the check density higher resulting in a more uniform distribution of ravines. A zoom that is too small may also reduce the ravine sizes.")
|
@Desc("The ravine rarity zoom is how large of a check area at a time iris will do. For example, with higher zooms ravines will have the same effective rarity, but when you actually find a ravine, it will be near a whole patch of ravines. Setting a lower zoom such as 0.25 will make the check density higher resulting in a more uniform distribution of ravines. A zoom that is too small may also reduce the ravine sizes.")
|
||||||
private double rarityZoom = 1;
|
private double rarityZoom = 1;
|
||||||
|
|
||||||
public IrisRavineLayer()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -18,150 +18,128 @@ import com.volmit.iris.util.RegistryListBiome;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents an iris region")
|
@Desc("Represents an iris region")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class IrisRegion extends IrisRegistrant implements IRare
|
public class IrisRegion extends IrisRegistrant implements IRare
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(2)
|
@MinNumber(2)
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The name of the region")
|
@Desc("The name of the region")
|
||||||
private String name = "A Region";
|
private String name = "A Region";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisEffect.class)
|
@ArrayType(min = 1, type = IrisEffect.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Effects are ambient effects such as potion effects, random sounds, or even particles around each player. All of these effects are played via packets so two players won't see/hear each others effects.\nDue to performance reasons, effects will play arround the player even if where the effect was played is no longer in the biome the player is in.")
|
@Desc("Effects are ambient effects such as potion effects, random sounds, or even particles around each player. All of these effects are played via packets so two players won't see/hear each others effects.\nDue to performance reasons, effects will play arround the player even if where the effect was played is no longer in the biome the player is in.")
|
||||||
private KList<IrisEffect> effects = new KList<>();
|
private KList<IrisEffect> effects = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity spawns to override or add to this region")
|
@Desc("Entity spawns to override or add to this region")
|
||||||
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
||||||
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity spawns during generation")
|
@Desc("Entity spawns during generation")
|
||||||
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
||||||
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The rarity of the region")
|
@Desc("The rarity of the region")
|
||||||
private int rarity = 1;
|
private int rarity = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Place text on terrain")
|
@Desc("Place text on terrain")
|
||||||
@ArrayType(min = 1, type = IrisTextPlacement.class)
|
@ArrayType(min = 1, type = IrisTextPlacement.class)
|
||||||
private KList<IrisTextPlacement> text = new KList<>();
|
private KList<IrisTextPlacement> text = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisBlockDrops.class)
|
@ArrayType(min = 1, type = IrisBlockDrops.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Define custom block drops for this region")
|
@Desc("Define custom block drops for this region")
|
||||||
private KList<IrisBlockDrops> blockDrops = new KList<>();
|
private KList<IrisBlockDrops> blockDrops = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The shore ration (How much percent of land should be a shore)")
|
@Desc("The shore ration (How much percent of land should be a shore)")
|
||||||
private double shoreRatio = 0.13;
|
private double shoreRatio = 0.13;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisObjectPlacement.class)
|
@ArrayType(min = 1, type = IrisObjectPlacement.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Objects define what schematics (iob files) iris will place in this region")
|
@Desc("Objects define what schematics (iob files) iris will place in this region")
|
||||||
private KList<IrisObjectPlacement> objects = new KList<IrisObjectPlacement>();
|
private KList<IrisObjectPlacement> objects = new KList<IrisObjectPlacement>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The min shore height")
|
@Desc("The min shore height")
|
||||||
private double shoreHeightMin = 1.2;
|
private double shoreHeightMin = 1.2;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Reference loot tables in this area")
|
@Desc("Reference loot tables in this area")
|
||||||
private IrisLootReference loot = new IrisLootReference();
|
private IrisLootReference loot = new IrisLootReference();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The the max shore height")
|
@Desc("The the max shore height")
|
||||||
private double shoreHeightMax = 3.2;
|
private double shoreHeightMax = 3.2;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The varience of the shore height")
|
@Desc("The varience of the shore height")
|
||||||
private double shoreHeightZoom = 3.14;
|
private double shoreHeightZoom = 3.14;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("How large land biomes are in this region")
|
@Desc("How large land biomes are in this region")
|
||||||
private double landBiomeZoom = 1;
|
private double landBiomeZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("How large shore biomes are in this region")
|
@Desc("How large shore biomes are in this region")
|
||||||
private double shoreBiomeZoom = 1;
|
private double shoreBiomeZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("How large lake biomes are in this region")
|
@Desc("How large lake biomes are in this region")
|
||||||
private double lakeBiomeZoom = 1;
|
private double lakeBiomeZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("How large river biomes are in this region")
|
@Desc("How large river biomes are in this region")
|
||||||
private double riverBiomeZoom = 1;
|
private double riverBiomeZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("How large sea biomes are in this region")
|
@Desc("How large sea biomes are in this region")
|
||||||
private double seaBiomeZoom = 1;
|
private double seaBiomeZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("How large cave biomes are in this region")
|
@Desc("How large cave biomes are in this region")
|
||||||
private double caveBiomeZoom = 1;
|
private double caveBiomeZoom = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The biome implosion ratio, how much to implode biomes into children (chance)")
|
@Desc("The biome implosion ratio, how much to implode biomes into children (chance)")
|
||||||
private double biomeImplosionRatio = 0.4;
|
private double biomeImplosionRatio = 0.4;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisStructurePlacement.class)
|
@ArrayType(min = 1, type = IrisStructurePlacement.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("A list of structure tilesets")
|
@Desc("A list of structure tilesets")
|
||||||
private KList<IrisStructurePlacement> structures = new KList<>();
|
private KList<IrisStructurePlacement> structures = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@ -169,7 +147,6 @@ public class IrisRegion extends IrisRegistrant implements IRare
|
|||||||
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
||||||
private KList<String> landBiomes = new KList<>();
|
private KList<String> landBiomes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@ -177,7 +154,6 @@ public class IrisRegion extends IrisRegistrant implements IRare
|
|||||||
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
||||||
private KList<String> seaBiomes = new KList<>();
|
private KList<String> seaBiomes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@ -185,82 +161,68 @@ public class IrisRegion extends IrisRegistrant implements IRare
|
|||||||
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
||||||
private KList<String> shoreBiomes = new KList<>();
|
private KList<String> shoreBiomes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
||||||
private KList<String> riverBiomes = new KList<>();
|
private KList<String> riverBiomes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
||||||
private KList<String> lakeBiomes = new KList<>();
|
private KList<String> lakeBiomes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
@Desc("A list of root-level biomes in this region. Don't specify child biomes of other biomes here. Just the root parents.")
|
||||||
private KList<String> caveBiomes = new KList<>();
|
private KList<String> caveBiomes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisRegionRidge.class)
|
@ArrayType(min = 1, type = IrisRegionRidge.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Ridge biomes create a vein-like network like rivers through this region")
|
@Desc("Ridge biomes create a vein-like network like rivers through this region")
|
||||||
private KList<IrisRegionRidge> ridgeBiomes = new KList<>();
|
private KList<IrisRegionRidge> ridgeBiomes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisRegionSpot.class)
|
@ArrayType(min = 1, type = IrisRegionSpot.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Spot biomes splotch themselves across this region like lakes")
|
@Desc("Spot biomes splotch themselves across this region like lakes")
|
||||||
private KList<IrisRegionSpot> spotBiomes = new KList<>();
|
private KList<IrisRegionSpot> spotBiomes = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@ArrayType(min = 1, type = IrisDepositGenerator.class)
|
@ArrayType(min = 1, type = IrisDepositGenerator.class)
|
||||||
@Desc("Define regional deposit generators that add onto the global deposit generators")
|
@Desc("Define regional deposit generators that add onto the global deposit generators")
|
||||||
private KList<IrisDepositGenerator> deposits = new KList<>();
|
private KList<IrisDepositGenerator> deposits = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The style of rivers")
|
@Desc("The style of rivers")
|
||||||
private IrisGeneratorStyle riverStyle = NoiseStyle.VASCULAR_THIN.style().zoomed(7.77);
|
private IrisGeneratorStyle riverStyle = NoiseStyle.VASCULAR_THIN.style().zoomed(7.77);
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The style of lakes")
|
@Desc("The style of lakes")
|
||||||
private IrisGeneratorStyle lakeStyle = NoiseStyle.CELLULAR_IRIS_THICK.style();
|
private IrisGeneratorStyle lakeStyle = NoiseStyle.CELLULAR_IRIS_THICK.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The style of river chances")
|
@Desc("The style of river chances")
|
||||||
private IrisGeneratorStyle riverChanceStyle = NoiseStyle.SIMPLEX.style().zoomed(4);
|
private IrisGeneratorStyle riverChanceStyle = NoiseStyle.SIMPLEX.style().zoomed(4);
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Generate lakes in this region")
|
@Desc("Generate lakes in this region")
|
||||||
private boolean lakes = true;
|
private boolean lakes = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Generate rivers in this region")
|
@Desc("Generate rivers in this region")
|
||||||
private boolean rivers = true;
|
private boolean rivers = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Generate lakes in this region")
|
@Desc("Generate lakes in this region")
|
||||||
private int lakeRarity = 22;
|
private int lakeRarity = 22;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Generate rivers in this region")
|
@Desc("Generate rivers in this region")
|
||||||
private int riverRarity = 3;
|
private int riverRarity = 3;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@ -280,11 +242,6 @@ public class IrisRegion extends IrisRegistrant implements IRare
|
|||||||
private final transient AtomicCache<CNG> riverGen = new AtomicCache<>();
|
private final transient AtomicCache<CNG> riverGen = new AtomicCache<>();
|
||||||
private final transient AtomicCache<CNG> riverChanceGen = new AtomicCache<>();
|
private final transient AtomicCache<CNG> riverChanceGen = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisRegion()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isRiver(RNG rng, double x, double z)
|
public boolean isRiver(RNG rng, double x, double z)
|
||||||
{
|
{
|
||||||
if(!isRivers())
|
if(!isRivers())
|
||||||
|
@ -11,42 +11,41 @@ import com.volmit.iris.util.RegistryListBiome;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A ridge config")
|
@Desc("A ridge config")
|
||||||
@Data
|
@Data
|
||||||
public class IrisRegionRidge
|
public class IrisRegionRidge
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The biome name")
|
@Desc("The biome name")
|
||||||
private String biome = "";
|
private String biome = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The type this biome should override (land sea or shore)")
|
@Desc("The type this biome should override (land sea or shore)")
|
||||||
private InferredType type = InferredType.LAND;
|
private InferredType type = InferredType.LAND;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("What type this spot is (i.e. target SEA but as LAND) like an island. Default matches the target type")
|
@Desc("What type this spot is (i.e. target SEA but as LAND) like an island. Default matches the target type")
|
||||||
private InferredType as = InferredType.DEFER;
|
private InferredType as = InferredType.DEFER;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Use the distance from cell value to add or remove noise value. (Forces depth or height)")
|
@Desc("Use the distance from cell value to add or remove noise value. (Forces depth or height)")
|
||||||
private double noiseMultiplier = 0;
|
private double noiseMultiplier = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@ -54,36 +53,36 @@ public class IrisRegionRidge
|
|||||||
@Desc("The chance this biome will be placed in a given spot")
|
@Desc("The chance this biome will be placed in a given spot")
|
||||||
private double chance = 0.75;
|
private double chance = 0.75;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The scale of the biome ridge. Higher values = wider veins & bigger connected cells")
|
@Desc("The scale of the biome ridge. Higher values = wider veins & bigger connected cells")
|
||||||
private double scale = 5;
|
private double scale = 5;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The chance scale (cell chances)")
|
@Desc("The chance scale (cell chances)")
|
||||||
private double chanceScale = 4;
|
private double chanceScale = 4;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The shuffle, how 'natural' this looks. Compared to pure polygons")
|
@Desc("The shuffle, how 'natural' this looks. Compared to pure polygons")
|
||||||
private double shuffle = 16;
|
private double shuffle = 16;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The chance shuffle (polygon cell chances)")
|
@Desc("The chance shuffle (polygon cell chances)")
|
||||||
private double chanceShuffle = 128;
|
private double chanceShuffle = 128;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The thickness of the vein")
|
@Desc("The thickness of the vein")
|
||||||
private double thickness = 0.125;
|
private double thickness = 0.125;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If the noise multiplier is below zero, what should the air be filled with?")
|
@Desc("If the noise multiplier is below zero, what should the air be filled with?")
|
||||||
private IrisBiomePaletteLayer air = new IrisBiomePaletteLayer().zero();
|
private IrisBiomePaletteLayer air = new IrisBiomePaletteLayer().zero();
|
||||||
@ -91,10 +90,6 @@ public class IrisRegionRidge
|
|||||||
private final transient AtomicCache<CellGenerator> spot = new AtomicCache<>();
|
private final transient AtomicCache<CellGenerator> spot = new AtomicCache<>();
|
||||||
private final transient AtomicCache<CellGenerator> ridge = new AtomicCache<>();
|
private final transient AtomicCache<CellGenerator> ridge = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisRegionRidge()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public CellGenerator getSpotGenerator(RNG rng)
|
public CellGenerator getSpotGenerator(RNG rng)
|
||||||
{
|
{
|
||||||
|
@ -10,72 +10,59 @@ import com.volmit.iris.util.RegistryListBiome;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A spot config")
|
@Desc("A spot config")
|
||||||
@Data
|
@Data
|
||||||
public class IrisRegionSpot
|
public class IrisRegionSpot
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@RegistryListBiome
|
@RegistryListBiome
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The biome to be placed")
|
@Desc("The biome to be placed")
|
||||||
private String biome = "";
|
private String biome = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Where this spot overrides. Land sea or shore")
|
@Desc("Where this spot overrides. Land sea or shore")
|
||||||
private InferredType type = InferredType.LAND;
|
private InferredType type = InferredType.LAND;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("What type this spot is (i.e. target SEA but as LAND) like an island. Default matches the target type")
|
@Desc("What type this spot is (i.e. target SEA but as LAND) like an island. Default matches the target type")
|
||||||
private InferredType as = InferredType.DEFER;
|
private InferredType as = InferredType.DEFER;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Use the distance from cell value to add or remove noise value. (Forces depth or height)")
|
@Desc("Use the distance from cell value to add or remove noise value. (Forces depth or height)")
|
||||||
private double noiseMultiplier = 0;
|
private double noiseMultiplier = 0;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The scale of splotches")
|
@Desc("The scale of splotches")
|
||||||
private double scale = 1;
|
private double scale = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Rarity is how often this splotch appears. higher = less often")
|
@Desc("Rarity is how often this splotch appears. higher = less often")
|
||||||
private double rarity = 1;
|
private double rarity = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The shuffle or how natural the splotch looks like (anti-polygon)")
|
@Desc("The shuffle or how natural the splotch looks like (anti-polygon)")
|
||||||
private double shuffle = 128;
|
private double shuffle = 128;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If the noise multiplier is below zero, what should the air be filled with?")
|
@Desc("If the noise multiplier is below zero, what should the air be filled with?")
|
||||||
private IrisBiomePaletteLayer air = new IrisBiomePaletteLayer().zero();
|
private IrisBiomePaletteLayer air = new IrisBiomePaletteLayer().zero();
|
||||||
|
|
||||||
private final transient AtomicCache<CellGenerator> spot = new AtomicCache<>();
|
private final transient AtomicCache<CellGenerator> spot = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisRegionSpot()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public CellGenerator getSpotGenerator(RNG rng)
|
public CellGenerator getSpotGenerator(RNG rng)
|
||||||
{
|
{
|
||||||
return spot.aquire(() ->
|
return spot.aquire(() ->
|
||||||
|
@ -8,13 +8,12 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("This represents a generator with a min and max height")
|
@Desc("This represents a generator with a min and max height")
|
||||||
@Data
|
@Data
|
||||||
@ -23,13 +22,13 @@ public class IrisShapedGeneratorStyle
|
|||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The generator id")
|
@Desc("The generator id")
|
||||||
@Builder.Default
|
|
||||||
private IrisGeneratorStyle generator = new IrisGeneratorStyle(NoiseStyle.IRIS);
|
private IrisGeneratorStyle generator = new IrisGeneratorStyle(NoiseStyle.IRIS);
|
||||||
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(-256)
|
@MinNumber(-256)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The min block value")
|
@Desc("The min block value")
|
||||||
private int min = 0;
|
private int min = 0;
|
||||||
@ -37,7 +36,7 @@ public class IrisShapedGeneratorStyle
|
|||||||
@Required
|
@Required
|
||||||
@MinNumber(-256)
|
@MinNumber(-256)
|
||||||
@MaxNumber(256)
|
@MaxNumber(256)
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The max block value")
|
@Desc("The max block value")
|
||||||
private int max = 0;
|
private int max = 0;
|
||||||
@ -58,9 +57,4 @@ public class IrisShapedGeneratorStyle
|
|||||||
{
|
{
|
||||||
this.generator = new IrisGeneratorStyle(style);
|
this.generator = new IrisGeneratorStyle(style);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IrisShapedGeneratorStyle()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -13,14 +13,13 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Represents a structure in iris.")
|
@Desc("Represents a structure in iris.")
|
||||||
@ -28,46 +27,39 @@ import lombok.experimental.Accessors;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class IrisStructure extends IrisRegistrant
|
public class IrisStructure extends IrisRegistrant
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(2)
|
@MinNumber(2)
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("This is the human readable name for this structure. Such as Red Dungeon or Tropical Village.")
|
@Desc("This is the human readable name for this structure. Such as Red Dungeon or Tropical Village.")
|
||||||
private String name = "A Structure Type";
|
private String name = "A Structure Type";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity spawns to override or add to this structure")
|
@Desc("Entity spawns to override or add to this structure")
|
||||||
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
||||||
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity spawns during generation")
|
@Desc("Entity spawns during generation")
|
||||||
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
||||||
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Wall style noise")
|
@Desc("Wall style noise")
|
||||||
private IrisGeneratorStyle wallStyle = NoiseStyle.STATIC.style();
|
private IrisGeneratorStyle wallStyle = NoiseStyle.STATIC.style();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Desc("Setting underwater to true will waterlog blocks")
|
@Desc("Setting underwater to true will waterlog blocks")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private boolean underwater = false;
|
private boolean underwater = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Desc("The max & min height any part of this structure can place at")
|
@Desc("The max & min height any part of this structure can place at")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private IrisObjectLimit clamp = new IrisObjectLimit();
|
private IrisObjectLimit clamp = new IrisObjectLimit();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Desc("Setting bore to true will dig out blocks before placing tiles")
|
@Desc("Setting bore to true will dig out blocks before placing tiles")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private boolean bore = false;
|
private boolean bore = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(3)
|
@MinNumber(3)
|
||||||
@MaxNumber(64)
|
@MaxNumber(64)
|
||||||
@ -75,12 +67,10 @@ public class IrisStructure extends IrisRegistrant
|
|||||||
@Desc("This is the x and z size of each grid cell")
|
@Desc("This is the x and z size of each grid cell")
|
||||||
private int gridSize = 11;
|
private int gridSize = 11;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Reference loot tables in this area")
|
@Desc("Reference loot tables in this area")
|
||||||
private IrisLootReference loot = new IrisLootReference();
|
private IrisLootReference loot = new IrisLootReference();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(255)
|
@MaxNumber(255)
|
||||||
@ -88,14 +78,12 @@ public class IrisStructure extends IrisRegistrant
|
|||||||
@Desc("This is the y size of each grid cell")
|
@Desc("This is the y size of each grid cell")
|
||||||
private int gridHeight = 5;
|
private int gridHeight = 5;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@MaxNumber(82)
|
@MaxNumber(82)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("This is the maximum layers iris will generate for (height cells)")
|
@Desc("This is the maximum layers iris will generate for (height cells)")
|
||||||
private int maxLayers = 1;
|
private int maxLayers = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@ -103,12 +91,10 @@ public class IrisStructure extends IrisRegistrant
|
|||||||
@Desc("This is the wall chance. Higher values makes more rooms and less open halls")
|
@Desc("This is the wall chance. Higher values makes more rooms and less open halls")
|
||||||
private double wallChance = 0.25;
|
private double wallChance = 0.25;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Edges of tiles replace each other instead of having their own.")
|
@Desc("Edges of tiles replace each other instead of having their own.")
|
||||||
private boolean mergeEdges = false;
|
private boolean mergeEdges = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = IrisStructureTile.class)
|
@ArrayType(min = 1, type = IrisStructureTile.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@ -207,9 +193,4 @@ public class IrisStructure extends IrisRegistrant
|
|||||||
return wallStyle.create(rngx).scale(0.8);
|
return wallStyle.create(rngx).scale(0.8);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public IrisStructure()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -16,54 +16,48 @@ import com.volmit.iris.util.RegistryListStructure;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Represents a structure placement")
|
@Desc("Represents a structure placement")
|
||||||
@Data
|
@Data
|
||||||
public class IrisStructurePlacement
|
public class IrisStructurePlacement
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@RegistryListStructure
|
@RegistryListStructure
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The structure tileset to use")
|
@Desc("The structure tileset to use")
|
||||||
private String tileset = "";
|
private String tileset = "";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(0.0001)
|
@MinNumber(0.0001)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The structure chance zoom. Higher = bigger cells, further away")
|
@Desc("The structure chance zoom. Higher = bigger cells, further away")
|
||||||
private double zoom = 1D;
|
private double zoom = 1D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(-1)
|
@MinNumber(-1)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The ratio. Lower values means cells can get closer to other cells. Negative values means make veins of structures")
|
@Desc("The ratio. Lower values means cells can get closer to other cells. Negative values means make veins of structures")
|
||||||
private double ratio = 0.25D;
|
private double ratio = 0.25D;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@MinNumber(1)
|
@MinNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The rarity for this structure")
|
@Desc("The rarity for this structure")
|
||||||
private int rarity = 4;
|
private int rarity = 4;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(-1)
|
@MinNumber(-1)
|
||||||
@MaxNumber(255)
|
@MaxNumber(255)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The height or -1 for surface")
|
@Desc("The height or -1 for surface")
|
||||||
private int height = -1;
|
private int height = -1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The chance cell shuffle (rougher edges)")
|
@Desc("The chance cell shuffle (rougher edges)")
|
||||||
@ -73,11 +67,6 @@ public class IrisStructurePlacement
|
|||||||
private final transient AtomicCache<IrisStructure> structure = new AtomicCache<>();
|
private final transient AtomicCache<IrisStructure> structure = new AtomicCache<>();
|
||||||
private final transient AtomicCache<IrisObjectPlacement> config = new AtomicCache<>();
|
private final transient AtomicCache<IrisObjectPlacement> config = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisStructurePlacement()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void place(ParallaxTerrainProvider g, RNG rngno, int cx, int cz)
|
public void place(ParallaxTerrainProvider g, RNG rngno, int cx, int cz)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -12,14 +12,13 @@ import com.volmit.iris.util.RegistryListObject;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Represents a structure tile")
|
@Desc("Represents a structure tile")
|
||||||
@ -27,65 +26,55 @@ import lombok.experimental.Accessors;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class IrisStructureTile
|
public class IrisStructureTile
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Reference loot tables in this area")
|
@Desc("Reference loot tables in this area")
|
||||||
private IrisLootReference loot = new IrisLootReference();
|
private IrisLootReference loot = new IrisLootReference();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity spawns to override or add to this structure tile")
|
@Desc("Entity spawns to override or add to this structure tile")
|
||||||
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
@ArrayType(min = 1, type = IrisEntitySpawnOverride.class)
|
||||||
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
private KList<IrisEntitySpawnOverride> entitySpawnOverrides = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Entity spawns during generation")
|
@Desc("Entity spawns during generation")
|
||||||
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
@ArrayType(min = 1, type = IrisEntityInitialSpawn.class)
|
||||||
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The place mode for this tile")
|
@Desc("The place mode for this tile")
|
||||||
private ObjectPlaceMode placeMode = ObjectPlaceMode.CENTER_HEIGHT;
|
private ObjectPlaceMode placeMode = ObjectPlaceMode.CENTER_HEIGHT;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Is this structure allowed to place if there is supposed to be a ceiling?")
|
@Desc("Is this structure allowed to place if there is supposed to be a ceiling?")
|
||||||
private StructureTileCondition ceiling = StructureTileCondition.AGNOSTIC;
|
private StructureTileCondition ceiling = StructureTileCondition.AGNOSTIC;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Is this structure allowed to place if there is supposed to be a floor?")
|
@Desc("Is this structure allowed to place if there is supposed to be a floor?")
|
||||||
private StructureTileCondition floor = StructureTileCondition.REQUIRED;
|
private StructureTileCondition floor = StructureTileCondition.REQUIRED;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Is this structure allowed to place if there is supposed to be a north wall?")
|
@Desc("Is this structure allowed to place if there is supposed to be a north wall?")
|
||||||
private StructureTileCondition north = StructureTileCondition.AGNOSTIC;
|
private StructureTileCondition north = StructureTileCondition.AGNOSTIC;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Is this structure allowed to place if there is supposed to be a south wall?")
|
@Desc("Is this structure allowed to place if there is supposed to be a south wall?")
|
||||||
private StructureTileCondition south = StructureTileCondition.AGNOSTIC;
|
private StructureTileCondition south = StructureTileCondition.AGNOSTIC;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Is this structure allowed to place if there is supposed to be a east wall?")
|
@Desc("Is this structure allowed to place if there is supposed to be a east wall?")
|
||||||
private StructureTileCondition east = StructureTileCondition.AGNOSTIC;
|
private StructureTileCondition east = StructureTileCondition.AGNOSTIC;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("Is this structure allowed to place if there is supposed to be a west wall?")
|
@Desc("Is this structure allowed to place if there is supposed to be a west wall?")
|
||||||
private StructureTileCondition west = StructureTileCondition.AGNOSTIC;
|
private StructureTileCondition west = StructureTileCondition.AGNOSTIC;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListObject
|
@RegistryListObject
|
||||||
@Required
|
@Required
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
@ -93,12 +82,10 @@ public class IrisStructureTile
|
|||||||
@Desc("List of objects to place centered in this tile")
|
@Desc("List of objects to place centered in this tile")
|
||||||
private KList<String> objects = new KList<>();
|
private KList<String> objects = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, Iris will try to fill the insides of 'rooms' and 'pockets' where air should fit based off of raytrace checks. This prevents a village house placing in an area where a tree already exists, and instead replaces the parts of the tree where the interior of the structure is. \n\nThis operation does not affect warmed-up generation speed however it does slow down loading objects.")
|
@Desc("If set to true, Iris will try to fill the insides of 'rooms' and 'pockets' where air should fit based off of raytrace checks. This prevents a village house placing in an area where a tree already exists, and instead replaces the parts of the tree where the interior of the structure is. \n\nThis operation does not affect warmed-up generation speed however it does slow down loading objects.")
|
||||||
private boolean smartBore = false;
|
private boolean smartBore = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@RegistryListObject
|
@RegistryListObject
|
||||||
@ArrayType(min = 1, type = IrisRareObject.class)
|
@ArrayType(min = 1, type = IrisRareObject.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@ -109,11 +96,6 @@ public class IrisStructureTile
|
|||||||
private final transient AtomicCache<Integer> minFaces = new AtomicCache<>();
|
private final transient AtomicCache<Integer> minFaces = new AtomicCache<>();
|
||||||
private final transient AtomicCache<Integer> maxFaces = new AtomicCache<>();
|
private final transient AtomicCache<Integer> maxFaces = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisStructureTile()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public int hashFace()
|
public int hashFace()
|
||||||
{
|
{
|
||||||
return Objects.hash(ceiling, floor, south, north, east, west);
|
return Objects.hash(ceiling, floor, south, north, east, west);
|
||||||
@ -126,23 +108,23 @@ public class IrisStructureTile
|
|||||||
|
|
||||||
public boolean likeAGlove(boolean floor, boolean ceiling, KList<StructureTileFace> walls, int faces, int openings)
|
public boolean likeAGlove(boolean floor, boolean ceiling, KList<StructureTileFace> walls, int faces, int openings)
|
||||||
{
|
{
|
||||||
//@builder
|
// @NoArgsConstructor
|
||||||
|
|
||||||
if((getFloor().required() && !floor) || (getCeiling().required() && !ceiling))
|
if((getFloor().required() && !floor) || (getCeiling().required() && !ceiling))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((!getFloor().supported() && floor) || (!getCeiling().supported() && ceiling))
|
if((!getFloor().supported() && floor) || (!getCeiling().supported() && ceiling))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!fitsWalls(walls, faces, openings))
|
if(!fitsWalls(walls, faces, openings))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//@done
|
//@done
|
||||||
|
|
||||||
return faces >= minFaces.aquire(() ->
|
return faces >= minFaces.aquire(() ->
|
||||||
@ -170,19 +152,13 @@ public class IrisStructureTile
|
|||||||
|
|
||||||
private boolean fitsWalls(KList<StructureTileFace> walls, int faces, int openings)
|
private boolean fitsWalls(KList<StructureTileFace> walls, int faces, int openings)
|
||||||
{
|
{
|
||||||
//@builder
|
// @NoArgsConstructor
|
||||||
if((getNorth().required() && !walls.contains(StructureTileFace.NORTH))
|
if((getNorth().required() && !walls.contains(StructureTileFace.NORTH)) || (getSouth().required() && !walls.contains(StructureTileFace.SOUTH)) || (getEast().required() && !walls.contains(StructureTileFace.EAST)) || (getWest().required() && !walls.contains(StructureTileFace.WEST)))
|
||||||
|| (getSouth().required() && !walls.contains(StructureTileFace.SOUTH))
|
|
||||||
|| (getEast().required() && !walls.contains(StructureTileFace.EAST))
|
|
||||||
|| (getWest().required() && !walls.contains(StructureTileFace.WEST)))
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((!getNorth().supported() && walls.contains(StructureTileFace.NORTH))
|
if((!getNorth().supported() && walls.contains(StructureTileFace.NORTH)) || (!getSouth().supported() && walls.contains(StructureTileFace.SOUTH)) || (!getEast().supported() && walls.contains(StructureTileFace.EAST)) || (!getWest().supported() && walls.contains(StructureTileFace.WEST)))
|
||||||
|| (!getSouth().supported() && walls.contains(StructureTileFace.SOUTH))
|
|
||||||
|| (!getEast().supported() && walls.contains(StructureTileFace.EAST))
|
|
||||||
|| (!getWest().supported() && walls.contains(StructureTileFace.WEST)))
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -12,69 +12,59 @@ import com.volmit.iris.util.RNG;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A text renderer to place text on terrain")
|
@Desc("A text renderer to place text on terrain")
|
||||||
@Data
|
@Data
|
||||||
public class IrisTextPlacement
|
public class IrisTextPlacement
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The chance to place this font per chunk")
|
@Desc("The chance to place this font per chunk")
|
||||||
private double chance = 0.1;
|
private double chance = 0.1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The amount of times to place randomly in a chunk if the chance passes")
|
@Desc("The amount of times to place randomly in a chunk if the chance passes")
|
||||||
private int density = 1;
|
private int density = 1;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The rotation for this text placement")
|
@Desc("The rotation for this text placement")
|
||||||
private IrisObjectRotation rotation = new IrisObjectRotation();
|
private IrisObjectRotation rotation = new IrisObjectRotation();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The mode to place this text")
|
@Desc("The mode to place this text")
|
||||||
private ObjectPlaceMode mode = ObjectPlaceMode.PAINT;
|
private ObjectPlaceMode mode = ObjectPlaceMode.PAINT;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The translation for this text placement")
|
@Desc("The translation for this text placement")
|
||||||
private IrisObjectTranslate translate = new IrisObjectTranslate();
|
private IrisObjectTranslate translate = new IrisObjectTranslate();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The clamp for this text placement")
|
@Desc("The clamp for this text placement")
|
||||||
private IrisObjectLimit clamp = new IrisObjectLimit();
|
private IrisObjectLimit clamp = new IrisObjectLimit();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The text renderers to pick from")
|
@Desc("The text renderers to pick from")
|
||||||
@ArrayType(min = 1, type = IrisTextRenderer.class)
|
@ArrayType(min = 1, type = IrisTextRenderer.class)
|
||||||
private KList<IrisTextRenderer> render = new KList<>();
|
private KList<IrisTextRenderer> render = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, objects will place on the terrain height, ignoring the water surface.")
|
@Desc("If set to true, objects will place on the terrain height, ignoring the water surface.")
|
||||||
private boolean underwater = false;
|
private boolean underwater = false;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, Blocks placed underwater that could be waterlogged are waterlogged.")
|
@Desc("If set to true, Blocks placed underwater that could be waterlogged are waterlogged.")
|
||||||
private boolean waterloggable = true;
|
private boolean waterloggable = true;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("If set to true, objects will place on the fluid height level Such as boats.")
|
@Desc("If set to true, objects will place on the fluid height level Such as boats.")
|
||||||
private boolean onwater = false;
|
private boolean onwater = false;
|
||||||
@ -102,11 +92,6 @@ public class IrisTextPlacement
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public IrisTextPlacement()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public int maxDimension()
|
public int maxDimension()
|
||||||
{
|
{
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
@ -17,45 +17,40 @@ import com.volmit.iris.util.RegistryListFont;
|
|||||||
import com.volmit.iris.util.Required;
|
import com.volmit.iris.util.Required;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("A text renderer to place text on terrain")
|
@Desc("A text renderer to place text on terrain")
|
||||||
@Data
|
@Data
|
||||||
public class IrisTextRenderer
|
public class IrisTextRenderer
|
||||||
{
|
{
|
||||||
@Builder.Default
|
|
||||||
@RegistryListFont
|
@RegistryListFont
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The font to use for this renderer")
|
@Desc("The font to use for this renderer")
|
||||||
private String font = "default";
|
private String font = "default";
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@MinNumber(4)
|
@MinNumber(4)
|
||||||
@MaxNumber(48)
|
@MaxNumber(48)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The font scale 1 = 1pt = ~1-2 blocks high per character")
|
@Desc("The font scale 1 = 1pt = ~1-2 blocks high per character")
|
||||||
private int size = 18;
|
private int size = 18;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The font style to use while rendering text")
|
@Desc("The font style to use while rendering text")
|
||||||
private FontStyle fontStyle = FontStyle.PLAIN;
|
private FontStyle fontStyle = FontStyle.PLAIN;
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The lines of text to randomly pick from")
|
@Desc("The lines of text to randomly pick from")
|
||||||
@ArrayType(min = 1, type = String.class)
|
@ArrayType(min = 1, type = String.class)
|
||||||
private KList<String> text = new KList<>();
|
private KList<String> text = new KList<>();
|
||||||
|
|
||||||
@Builder.Default
|
|
||||||
@Required
|
@Required
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("The palette of blocks to use when drawing text")
|
@Desc("The palette of blocks to use when drawing text")
|
||||||
@ -67,11 +62,6 @@ public class IrisTextRenderer
|
|||||||
private final transient AtomicCache<Double> maxLength = new AtomicCache<>();
|
private final transient AtomicCache<Double> maxLength = new AtomicCache<>();
|
||||||
private final transient AtomicCache<Integer> fontStyleData = new AtomicCache<>();
|
private final transient AtomicCache<Integer> fontStyleData = new AtomicCache<>();
|
||||||
|
|
||||||
public IrisTextRenderer()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public KList<IrisObject> getObjects(ParallaxTerrainProvider g, RNG rng)
|
public KList<IrisObject> getObjects(ParallaxTerrainProvider g, RNG rng)
|
||||||
{
|
{
|
||||||
return objects.aquire(() ->
|
return objects.aquire(() ->
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package com.volmit.iris.object;
|
package com.volmit.iris.object;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class TileResult
|
public class TileResult
|
||||||
{
|
{
|
||||||
|
@ -609,7 +609,7 @@ public class StructureTemplate implements Listener, IObjectPlacer
|
|||||||
|
|
||||||
public Cuboid getBounds(Location center)
|
public Cuboid getBounds(Location center)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return new Cuboid(
|
return new Cuboid(
|
||||||
getTileBounds(center.clone().add(
|
getTileBounds(center.clone().add(
|
||||||
((size / 2) * w) + 1,
|
((size / 2) * w) + 1,
|
||||||
@ -626,7 +626,7 @@ public class StructureTemplate implements Listener, IObjectPlacer
|
|||||||
|
|
||||||
public Cuboid getTileBounds(Location l)
|
public Cuboid getTileBounds(Location l)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return new Cuboid(
|
return new Cuboid(
|
||||||
new Location(l.getWorld(),
|
new Location(l.getWorld(),
|
||||||
Math.floorDiv(l.getBlockX(), w) * w,
|
Math.floorDiv(l.getBlockX(), w) * w,
|
||||||
@ -851,7 +851,7 @@ public class StructureTemplate implements Listener, IObjectPlacer
|
|||||||
{
|
{
|
||||||
if(use3d)
|
if(use3d)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
structure.getTiles().add(tileFor("Cross Floor",
|
structure.getTiles().add(tileFor("Cross Floor",
|
||||||
StructureTileCondition.REQUIRED,
|
StructureTileCondition.REQUIRED,
|
||||||
StructureTileCondition.NEVER,
|
StructureTileCondition.NEVER,
|
||||||
@ -1052,7 +1052,7 @@ public class StructureTemplate implements Listener, IObjectPlacer
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
structure.getTiles().add(tileFor("Cross",
|
structure.getTiles().add(tileFor("Cross",
|
||||||
StructureTileCondition.REQUIRED,
|
StructureTileCondition.REQUIRED,
|
||||||
StructureTileCondition.AGNOSTIC,
|
StructureTileCondition.AGNOSTIC,
|
||||||
|
@ -77,6 +77,33 @@ public class B
|
|||||||
return getBlockData(bd, defaultCompat);
|
return getBlockData(bd, defaultCompat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String[] getBlockTypes()
|
||||||
|
{
|
||||||
|
KList<String> bt = new KList<String>();
|
||||||
|
|
||||||
|
for(Material i : Material.values())
|
||||||
|
{
|
||||||
|
if(i.isBlock())
|
||||||
|
{
|
||||||
|
String v = i.createBlockData().getAsString(true);
|
||||||
|
|
||||||
|
if(v.contains("["))
|
||||||
|
{
|
||||||
|
v = v.split("\\Q[\\E")[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(v.contains(":"))
|
||||||
|
{
|
||||||
|
v = v.split("\\Q:\\E")[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
bt.add(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return bt.toArray(new String[bt.size()]);
|
||||||
|
}
|
||||||
|
|
||||||
public static BlockData getBlockData(String bdxf, IrisDimension resolver)
|
public static BlockData getBlockData(String bdxf, IrisDimension resolver)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -163,7 +190,7 @@ public class B
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
boolean str = mat.equals(B.mat("CHEST"))
|
boolean str = mat.equals(B.mat("CHEST"))
|
||||||
|| mat.equals(B.mat("TRAPPED_CHEST"))
|
|| mat.equals(B.mat("TRAPPED_CHEST"))
|
||||||
|| mat.equals(B.mat("SHULKER_BOX"))
|
|| mat.equals(B.mat("SHULKER_BOX"))
|
||||||
@ -210,7 +237,7 @@ public class B
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
boolean str = mat.equals(B.mat("CHEST"))
|
boolean str = mat.equals(B.mat("CHEST"))
|
||||||
|| mat.equals(B.mat("TRAPPED_CHEST"))
|
|| mat.equals(B.mat("TRAPPED_CHEST"))
|
||||||
|| mat.equals(B.mat("SHULKER_BOX"))
|
|| mat.equals(B.mat("SHULKER_BOX"))
|
||||||
@ -254,7 +281,7 @@ public class B
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
boolean str = mat.equals(B.mat("GLOWSTONE"))
|
boolean str = mat.equals(B.mat("GLOWSTONE"))
|
||||||
|| mat.equals(B.mat("END_ROD"))
|
|| mat.equals(B.mat("END_ROD"))
|
||||||
|| mat.equals(B.mat("SOUL_SAND"))
|
|| mat.equals(B.mat("SOUL_SAND"))
|
||||||
@ -324,7 +351,7 @@ public class B
|
|||||||
}
|
}
|
||||||
|
|
||||||
Material mat = d.getMaterial();
|
Material mat = d.getMaterial();
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return mat.equals(Material.POPPY)
|
return mat.equals(Material.POPPY)
|
||||||
|| mat.equals(Material.DANDELION)
|
|| mat.equals(Material.DANDELION)
|
||||||
|| mat.equals(B.mat("CORNFLOWER"))
|
|| mat.equals(B.mat("CORNFLOWER"))
|
||||||
@ -425,7 +452,7 @@ public class B
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
boolean str = m.equals(Material.GRASS)
|
boolean str = m.equals(Material.GRASS)
|
||||||
|| m.equals(Material.TALL_GRASS)
|
|| m.equals(Material.TALL_GRASS)
|
||||||
|| m.equals(B.mat("CORNFLOWER"))
|
|| m.equals(B.mat("CORNFLOWER"))
|
||||||
|
@ -10,7 +10,7 @@ public class BoardSettings
|
|||||||
{
|
{
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private BoardProvider boardProvider;
|
private BoardProvider boardProvider;
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
private ScoreDirection scoreDirection;
|
private ScoreDirection scoreDirection;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ public class IrisInterpolation
|
|||||||
|
|
||||||
public static double bihermite(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double tension, double bias)
|
public static double bihermite(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double tension, double bias)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return hermite(
|
return hermite(
|
||||||
hermite(p00, p01, p02, p03, muy, tension, bias),
|
hermite(p00, p01, p02, p03, muy, tension, bias),
|
||||||
hermite(p10, p11, p12, p13, muy, tension, bias),
|
hermite(p10, p11, p12, p13, muy, tension, bias),
|
||||||
@ -140,7 +140,7 @@ public class IrisInterpolation
|
|||||||
|
|
||||||
public static double bihermiteBezier(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double tension, double bias)
|
public static double bihermiteBezier(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double tension, double bias)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return hermiteBezier(
|
return hermiteBezier(
|
||||||
hermiteBezier(p00, p01, p02, p03, muy, tension, bias),
|
hermiteBezier(p00, p01, p02, p03, muy, tension, bias),
|
||||||
hermiteBezier(p10, p11, p12, p13, muy, tension, bias),
|
hermiteBezier(p10, p11, p12, p13, muy, tension, bias),
|
||||||
@ -152,7 +152,7 @@ public class IrisInterpolation
|
|||||||
|
|
||||||
public static double bihermiteParametric(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double tension, double bias, double a)
|
public static double bihermiteParametric(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double tension, double bias, double a)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return hermiteParametric(
|
return hermiteParametric(
|
||||||
hermiteParametric(p00, p01, p02, p03, muy, tension, bias, a),
|
hermiteParametric(p00, p01, p02, p03, muy, tension, bias, a),
|
||||||
hermiteParametric(p10, p11, p12, p13, muy, tension, bias, a),
|
hermiteParametric(p10, p11, p12, p13, muy, tension, bias, a),
|
||||||
@ -187,7 +187,7 @@ public class IrisInterpolation
|
|||||||
|
|
||||||
public static double bicubic(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy)
|
public static double bicubic(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return cubic(
|
return cubic(
|
||||||
cubic(p00, p01, p02, p03, muy),
|
cubic(p00, p01, p02, p03, muy),
|
||||||
cubic(p10, p11, p12, p13, muy),
|
cubic(p10, p11, p12, p13, muy),
|
||||||
@ -199,7 +199,7 @@ public class IrisInterpolation
|
|||||||
|
|
||||||
public static double bicubicBezier(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy)
|
public static double bicubicBezier(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return cubicBezier(
|
return cubicBezier(
|
||||||
cubicBezier(p00, p01, p02, p03, muy),
|
cubicBezier(p00, p01, p02, p03, muy),
|
||||||
cubicBezier(p10, p11, p12, p13, muy),
|
cubicBezier(p10, p11, p12, p13, muy),
|
||||||
@ -211,7 +211,7 @@ public class IrisInterpolation
|
|||||||
|
|
||||||
public static double bicubicParametric(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double a)
|
public static double bicubicParametric(double p00, double p01, double p02, double p03, double p10, double p11, double p12, double p13, double p20, double p21, double p22, double p23, double p30, double p31, double p32, double p33, double mux, double muy, double a)
|
||||||
{
|
{
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return cubicParametric(
|
return cubicParametric(
|
||||||
cubicParametric(p00, p01, p02, p03, muy,a),
|
cubicParametric(p00, p01, p02, p03, muy,a),
|
||||||
cubicParametric(p10, p11, p12, p13, muy,a),
|
cubicParametric(p10, p11, p12, p13, muy,a),
|
||||||
@ -239,7 +239,7 @@ public class IrisInterpolation
|
|||||||
|
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return blerp(
|
return blerp(
|
||||||
n.noise(x1, z1),
|
n.noise(x1, z1),
|
||||||
n.noise(x2, z1),
|
n.noise(x2, z1),
|
||||||
@ -276,7 +276,7 @@ public class IrisInterpolation
|
|||||||
int z2 = (int) Math.round((fz + 1) * rad);
|
int z2 = (int) Math.round((fz + 1) * rad);
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return blerpBezier(
|
return blerpBezier(
|
||||||
n.noise(x1, z1),
|
n.noise(x1, z1),
|
||||||
n.noise(x2, z1),
|
n.noise(x2, z1),
|
||||||
@ -296,7 +296,7 @@ public class IrisInterpolation
|
|||||||
int z2 = (int) Math.round((fz + 1) * rad);
|
int z2 = (int) Math.round((fz + 1) * rad);
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return blerpParametric(
|
return blerpParametric(
|
||||||
n.noise(x1, z1),
|
n.noise(x1, z1),
|
||||||
n.noise(x2, z1),
|
n.noise(x2, z1),
|
||||||
@ -316,7 +316,7 @@ public class IrisInterpolation
|
|||||||
int z2 = (int) Math.round((fz + 1) * rad);
|
int z2 = (int) Math.round((fz + 1) * rad);
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return blerpSinCenter(
|
return blerpSinCenter(
|
||||||
n.noise(x1, z1),
|
n.noise(x1, z1),
|
||||||
n.noise(x2, z1),
|
n.noise(x2, z1),
|
||||||
@ -340,7 +340,7 @@ public class IrisInterpolation
|
|||||||
int z3 = (int) Math.round((fz + 2) * rad);
|
int z3 = (int) Math.round((fz + 2) * rad);
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return bicubic(
|
return bicubic(
|
||||||
n.noise(x0, z0),
|
n.noise(x0, z0),
|
||||||
n.noise(x0, z1),
|
n.noise(x0, z1),
|
||||||
@ -376,7 +376,7 @@ public class IrisInterpolation
|
|||||||
int z3 = (int) Math.round((fz + 2) * rad);
|
int z3 = (int) Math.round((fz + 2) * rad);
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return bicubicBezier(
|
return bicubicBezier(
|
||||||
n.noise(x0, z0),
|
n.noise(x0, z0),
|
||||||
n.noise(x0, z1),
|
n.noise(x0, z1),
|
||||||
@ -412,7 +412,7 @@ public class IrisInterpolation
|
|||||||
int z3 = (int) Math.round((fz + 2) * rad);
|
int z3 = (int) Math.round((fz + 2) * rad);
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return bicubicParametric(
|
return bicubicParametric(
|
||||||
n.noise(x0, z0),
|
n.noise(x0, z0),
|
||||||
n.noise(x0, z1),
|
n.noise(x0, z1),
|
||||||
@ -463,7 +463,7 @@ public class IrisInterpolation
|
|||||||
int z3 = (int) Math.round((fz + 2) * rad);
|
int z3 = (int) Math.round((fz + 2) * rad);
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return bihermite(
|
return bihermite(
|
||||||
n.noise(x0, z0),
|
n.noise(x0, z0),
|
||||||
n.noise(x0, z1),
|
n.noise(x0, z1),
|
||||||
@ -499,7 +499,7 @@ public class IrisInterpolation
|
|||||||
int z3 = (int) Math.round((fz + 2) * rad);
|
int z3 = (int) Math.round((fz + 2) * rad);
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return bihermiteBezier(
|
return bihermiteBezier(
|
||||||
n.noise(x0, z0),
|
n.noise(x0, z0),
|
||||||
n.noise(x0, z1),
|
n.noise(x0, z1),
|
||||||
@ -535,7 +535,7 @@ public class IrisInterpolation
|
|||||||
int z3 = (int) Math.round((fz + 2) * rad);
|
int z3 = (int) Math.round((fz + 2) * rad);
|
||||||
double px = rangeScale(0, 1, x1, x2, x);
|
double px = rangeScale(0, 1, x1, x2, x);
|
||||||
double pz = rangeScale(0, 1, z1, z2, z);
|
double pz = rangeScale(0, 1, z1, z2, z);
|
||||||
//@builder
|
//@NoArgsConstructor
|
||||||
return bihermiteParametric(
|
return bihermiteParametric(
|
||||||
n.noise(x0, z0),
|
n.noise(x0, z0),
|
||||||
n.noise(x0, z1),
|
n.noise(x0, z1),
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.volmit.iris.util;
|
||||||
|
|
||||||
|
import static java.lang.annotation.ElementType.*;
|
||||||
|
import static java.lang.annotation.RetentionPolicy.*;
|
||||||
|
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
@Retention(RUNTIME)
|
||||||
|
@Target({PARAMETER, TYPE, FIELD})
|
||||||
|
public @interface RegistryListBlockType
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user