mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-22 08:07:42 +00:00
Consolidate source layout
- Packages regrouped by domain: generation, world, pack, studio, structure, platform, command, localization, diagnostics - Forked VolmLib utilities dropped for the shared library: noise, stream, interpolation, hunk, matter - Engine-coupled stream decorators moved to generation.stream.GenerationStreams - Hunk section splits now run on the Iris burst pool through HunkBurst - Artifact entry lists, purity allowlists and shrink rules follow the new paths
This commit is contained in:
1 parent
29a31a69e0
commit
3f57925443
2666 files changed
+18279
-37104
No files matched your search
+7
-7
@@ -1,14 +1,14 @@
|
||||
package art.arcane.iris.core.link.data;
|
||||
package art.arcane.iris.integration.data;
|
||||
|
||||
import art.arcane.iris.core.link.Identifier;
|
||||
import art.arcane.iris.core.service.ExternalDataSVC;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.framework.SeedManager;
|
||||
import art.arcane.iris.integration.Identifier;
|
||||
import art.arcane.iris.integration.ExternalDataSVC;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.generation.runtime.SeedManager;
|
||||
import art.arcane.iris.platform.bukkit.BukkitBlockResolution;
|
||||
import art.arcane.iris.spi.IrisServices;
|
||||
import art.arcane.iris.testsupport.BukkitTestServer;
|
||||
import art.arcane.iris.util.common.data.IrisCustomData;
|
||||
import art.arcane.iris.util.common.data.registry.RegistryUtil;
|
||||
import art.arcane.iris.generation.block.IrisCustomData;
|
||||
import art.arcane.iris.platform.bukkit.registry.RegistryUtil;
|
||||
import art.arcane.volmlib.util.collection.KMap;
|
||||
import net.momirealms.craftengine.bukkit.api.CraftEngineBlocks;
|
||||
import net.momirealms.craftengine.bukkit.api.CraftEngineFurniture;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package art.arcane.iris.core.link.data;
|
||||
package art.arcane.iris.integration.data;
|
||||
|
||||
import art.arcane.iris.core.link.Identifier;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.util.common.data.IrisCustomData;
|
||||
import art.arcane.iris.integration.Identifier;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.generation.block.IrisCustomData;
|
||||
import art.arcane.volmlib.util.collection.KMap;
|
||||
import dev.lone.itemsadder.api.CustomBlock;
|
||||
import dev.lone.itemsadder.api.CustomStack;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package art.arcane.iris.core.link.data;
|
||||
package art.arcane.iris.integration.data;
|
||||
|
||||
import art.arcane.iris.core.link.Identifier;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.util.common.data.IrisCustomData;
|
||||
import art.arcane.iris.integration.Identifier;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.generation.block.IrisCustomData;
|
||||
import art.arcane.volmlib.util.collection.KMap;
|
||||
import io.th0rgal.oraxen.api.OraxenBlocks;
|
||||
import org.bukkit.Location;
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package art.arcane.iris.util.common.director;
|
||||
package art.arcane.iris.command;
|
||||
|
||||
import art.arcane.volmlib.util.director.context.DirectorContextBase;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
|
||||
public class DirectorContext {
|
||||
private static final DirectorContextBase<VolmitSender> context = new DirectorContextBase<>();
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
package art.arcane.iris.util.common.director;
|
||||
package art.arcane.iris.command;
|
||||
|
||||
import art.arcane.volmlib.util.director.context.DirectorContextHandlers;
|
||||
import art.arcane.volmlib.util.director.context.DirectorContextHandlerType;
|
||||
import art.arcane.iris.spi.IrisLogging;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface DirectorContextHandler<T> extends DirectorContextHandlerType<T,
|
||||
|
||||
static Map<Class<?>, DirectorContextHandler<?>> buildContextHandlers() {
|
||||
return DirectorContextHandlers.buildOrEmpty(
|
||||
DirectorSystem.initializePackage("art.arcane.iris.util.common.director.context"),
|
||||
DirectorSystem.initializePackage("art.arcane.iris.command.context"),
|
||||
DirectorContextHandler.class,
|
||||
h -> ((DirectorContextHandler<?>) h).getType(),
|
||||
e -> {
|
||||
+7
-7
@@ -16,16 +16,16 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director;
|
||||
package art.arcane.iris.command;
|
||||
|
||||
import art.arcane.volmlib.util.director.DirectorExecutorBase;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.core.pack.PackDirectoryResolver;
|
||||
import art.arcane.iris.core.tools.IrisToolbelt;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.platform.PlatformChunkGenerator;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.pack.PackDirectoryResolver;
|
||||
import art.arcane.iris.world.IrisToolbelt;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.platform.generation.PlatformChunkGenerator;
|
||||
import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.io.File;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package art.arcane.iris.util.common.director;
|
||||
package art.arcane.iris.command;
|
||||
|
||||
public interface DirectorParameterHandler<T>
|
||||
extends DirectorExecutor, art.arcane.volmlib.util.director.DirectorParameterHandler<T> {
|
||||
+31
-5
@@ -16,16 +16,26 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director;
|
||||
package art.arcane.iris.command;
|
||||
|
||||
import art.arcane.iris.spi.IrisLogging;
|
||||
import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.iris.util.common.scheduling.J;
|
||||
import art.arcane.iris.world.task.J;
|
||||
import art.arcane.volmlib.util.director.DirectorParameterHandler;
|
||||
import art.arcane.volmlib.util.director.DirectorSystemSupport;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.director.handlers.StringHandlerBase;
|
||||
import art.arcane.volmlib.util.director.handlers.base.BooleanHandlerBase;
|
||||
import art.arcane.volmlib.util.director.handlers.base.ByteHandlerBase;
|
||||
import art.arcane.volmlib.util.director.handlers.base.DoubleHandlerBase;
|
||||
import art.arcane.volmlib.util.director.handlers.base.FloatHandlerBase;
|
||||
import art.arcane.volmlib.util.director.handlers.base.IntegerHandlerBase;
|
||||
import art.arcane.volmlib.util.director.handlers.base.LongHandlerBase;
|
||||
import art.arcane.volmlib.util.director.handlers.base.ShortHandlerBase;
|
||||
import art.arcane.volmlib.util.io.JarScanner;
|
||||
|
||||
public final class DirectorSystem {
|
||||
public static final KList<art.arcane.volmlib.util.director.DirectorParameterHandler<?>> handlers = initializePackage("art.arcane.iris.util.common.director.handlers").convert((i) -> (art.arcane.volmlib.util.director.DirectorParameterHandler<?>) i);
|
||||
public static final KList<DirectorParameterHandler<?>> handlers = initializeHandlers();
|
||||
|
||||
private DirectorSystem() {
|
||||
}
|
||||
@@ -55,8 +65,8 @@ public final class DirectorSystem {
|
||||
* @param type The type to handle
|
||||
* @return The corresponding {@link DirectorParameterHandler}, or null
|
||||
*/
|
||||
public static art.arcane.volmlib.util.director.DirectorParameterHandler<?> getHandler(Class<?> type) {
|
||||
art.arcane.volmlib.util.director.DirectorParameterHandler<?> handler = DirectorSystemSupport.getHandler(handlers, type, (h, t) -> h.supports(t));
|
||||
public static DirectorParameterHandler<?> getHandler(Class<?> type) {
|
||||
DirectorParameterHandler<?> handler = DirectorSystemSupport.getHandler(handlers, type, (h, t) -> h.supports(t));
|
||||
if (handler != null) {
|
||||
return handler;
|
||||
}
|
||||
@@ -64,4 +74,20 @@ public final class DirectorSystem {
|
||||
IrisLogging.error("Unhandled type in Director Parameter: " + type.getName() + ". This is bad!");
|
||||
return null;
|
||||
}
|
||||
|
||||
private static KList<DirectorParameterHandler<?>> initializeHandlers() {
|
||||
KList<DirectorParameterHandler<?>> handlers = new KList<>(
|
||||
new BooleanHandlerBase(),
|
||||
new ByteHandlerBase(),
|
||||
new DoubleHandlerBase(),
|
||||
new FloatHandlerBase(),
|
||||
new IntegerHandlerBase(),
|
||||
new LongHandlerBase(),
|
||||
new ShortHandlerBase(),
|
||||
new StringHandlerBase());
|
||||
for (Object handler : initializePackage("art.arcane.iris.command.handlers")) {
|
||||
handlers.add((DirectorParameterHandler<?>) handler);
|
||||
}
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
+16
-13
@@ -16,15 +16,18 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
package art.arcane.iris.command;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.ArrayType;
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.Required;
|
||||
import art.arcane.iris.engine.object.annotations.Snippet;
|
||||
import art.arcane.iris.world.IrisTimeBlock;
|
||||
import art.arcane.iris.world.IrisWeather;
|
||||
|
||||
import art.arcane.iris.pack.schema.annotation.ArrayType;
|
||||
import art.arcane.volmlib.util.documentation.Description;
|
||||
import art.arcane.iris.pack.schema.annotation.Required;
|
||||
import art.arcane.iris.pack.schema.annotation.Snippet;
|
||||
import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.iris.spi.PlatformWorld;
|
||||
import art.arcane.iris.util.common.scheduling.J;
|
||||
import art.arcane.iris.world.task.J;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -33,28 +36,28 @@ import lombok.experimental.Accessors;
|
||||
@Snippet("command")
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Represents a set of Iris commands")
|
||||
@Description("Represents a set of Iris commands")
|
||||
@Data
|
||||
public class IrisCommand {
|
||||
|
||||
@Required
|
||||
@ArrayType(min = 1, type = String.class)
|
||||
@Desc("List of commands. Iris replaces {x} {y} and {z} with the location of the entity spawn")
|
||||
@Description("List of commands. Iris replaces {x} {y} and {z} with the location of the entity spawn")
|
||||
private KList<String> commands = new KList<>();
|
||||
|
||||
@Desc("The delay for running the command. Instant by default")
|
||||
@Description("The delay for running the command. Instant by default")
|
||||
private long delay = 0;
|
||||
|
||||
@Desc("If this should be repeated (indefinitely, cannot be cancelled). This does not persist with server-restarts, so it only repeats when the chunk is generated.")
|
||||
@Description("If this should be repeated (indefinitely, cannot be cancelled). This does not persist with server-restarts, so it only repeats when the chunk is generated.")
|
||||
private boolean repeat = false;
|
||||
|
||||
@Desc("The delay between repeats, in server ticks (by default 100, so 5 seconds)")
|
||||
@Description("The delay between repeats, in server ticks (by default 100, so 5 seconds)")
|
||||
private long repeatDelay = 100;
|
||||
|
||||
@Desc("The block of 24 hour time in which the command should execute.")
|
||||
@Description("The block of 24 hour time in which the command should execute.")
|
||||
private IrisTimeBlock timeBlock = new IrisTimeBlock();
|
||||
|
||||
@Desc("The weather that is required for the command to execute.")
|
||||
@Description("The weather that is required for the command to execute.")
|
||||
private IrisWeather weather = IrisWeather.ANY;
|
||||
|
||||
public boolean isValid(PlatformWorld world) {
|
||||
+17
-17
@@ -16,15 +16,15 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
package art.arcane.iris.command;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.ArrayType;
|
||||
import art.arcane.iris.engine.object.annotations.DependsOn;
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.Required;
|
||||
import art.arcane.iris.engine.object.annotations.Snippet;
|
||||
import art.arcane.iris.pack.schema.annotation.ArrayType;
|
||||
import art.arcane.iris.pack.schema.annotation.DependsOn;
|
||||
import art.arcane.volmlib.util.documentation.Description;
|
||||
import art.arcane.iris.pack.schema.annotation.MaxNumber;
|
||||
import art.arcane.iris.pack.schema.annotation.MinNumber;
|
||||
import art.arcane.iris.pack.schema.annotation.Required;
|
||||
import art.arcane.iris.pack.schema.annotation.Snippet;
|
||||
import art.arcane.iris.platform.bukkit.BukkitWorld;
|
||||
import art.arcane.iris.spi.PlatformWorld;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
@@ -38,39 +38,39 @@ import org.bukkit.entity.Player;
|
||||
@Snippet("command-registry")
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Represents a casting location for a command")
|
||||
@Description("Represents a casting location for a command")
|
||||
@Data
|
||||
public class IrisCommandRegistry {
|
||||
@Required
|
||||
@ArrayType(min = 1, type = IrisCommand.class)
|
||||
@Desc("Run commands, at the exact location of the player")
|
||||
@Description("Run commands, at the exact location of the player")
|
||||
private KList<IrisCommand> rawCommands = new KList<>();
|
||||
@DependsOn({"rawCommands"})
|
||||
@MinNumber(-8)
|
||||
@MaxNumber(8)
|
||||
@Desc("The alt x, usually represents motion if the particle count is zero. Otherwise an offset.")
|
||||
@Description("The alt x, usually represents motion if the particle count is zero. Otherwise an offset.")
|
||||
private double commandOffsetX = 0;
|
||||
@DependsOn({"rawCommands"})
|
||||
@MinNumber(-8)
|
||||
@MaxNumber(8)
|
||||
@Desc("The alt y, usually represents motion if the particle count is zero. Otherwise an offset.")
|
||||
@Description("The alt y, usually represents motion if the particle count is zero. Otherwise an offset.")
|
||||
private double commandOffsetY = 0;
|
||||
@DependsOn({"rawCommands"})
|
||||
@MinNumber(-8)
|
||||
@MaxNumber(8)
|
||||
@Desc("The alt z, usually represents motion if the particle count is zero. Otherwise an offset.")
|
||||
@Description("The alt z, usually represents motion if the particle count is zero. Otherwise an offset.")
|
||||
private double commandOffsetZ = 0;
|
||||
@DependsOn({"rawCommands"})
|
||||
@Desc("Randomize the altX from -altX to altX")
|
||||
@Description("Randomize the altX from -altX to altX")
|
||||
private boolean commandRandomAltX = true;
|
||||
@DependsOn({"rawCommands"})
|
||||
@Desc("Randomize the altY from -altY to altY")
|
||||
@Description("Randomize the altY from -altY to altY")
|
||||
private boolean commandRandomAltY = false;
|
||||
@DependsOn({"rawCommands"})
|
||||
@Desc("Randomize the altZ from -altZ to altZ")
|
||||
@Description("Randomize the altZ from -altZ to altZ")
|
||||
private boolean commandRandomAltZ = true;
|
||||
@DependsOn({"rawCommands"})
|
||||
@Desc("Randomize location for all separate commands (true), or run all on the same location (false)")
|
||||
@Description("Randomize location for all separate commands (true), or run all on the same location (false)")
|
||||
private boolean commandAllRandomLocations = true;
|
||||
|
||||
public void run(Player p) {
|
||||
+9
-9
@@ -16,16 +16,16 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.context;
|
||||
package art.arcane.iris.command.context;
|
||||
|
||||
import art.arcane.iris.core.tools.IrisToolbelt;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.object.IrisBiome;
|
||||
import art.arcane.iris.engine.platform.EngineBukkitOps;
|
||||
import art.arcane.iris.util.common.director.DirectorContextHandler;
|
||||
import art.arcane.iris.util.common.director.DirectorExecutor;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import art.arcane.iris.world.IrisToolbelt;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.generation.biome.IrisBiome;
|
||||
import art.arcane.iris.platform.generation.EngineBukkitOps;
|
||||
import art.arcane.iris.command.DirectorContextHandler;
|
||||
import art.arcane.iris.command.DirectorExecutor;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
|
||||
public class BiomeContextHandler implements DirectorContextHandler<IrisBiome> {
|
||||
public Class<IrisBiome> getType() {
|
||||
+8
-8
@@ -16,15 +16,15 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.context;
|
||||
package art.arcane.iris.command.context;
|
||||
|
||||
import art.arcane.iris.core.tools.IrisToolbelt;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.object.IrisDimension;
|
||||
import art.arcane.iris.util.common.director.DirectorContextHandler;
|
||||
import art.arcane.iris.util.common.director.DirectorExecutor;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import art.arcane.iris.world.IrisToolbelt;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.generation.terrain.IrisDimension;
|
||||
import art.arcane.iris.command.DirectorContextHandler;
|
||||
import art.arcane.iris.command.DirectorExecutor;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
|
||||
public class DimensionContextHandler implements DirectorContextHandler<IrisDimension> {
|
||||
public Class<IrisDimension> getType() {
|
||||
+9
-9
@@ -16,16 +16,16 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.context;
|
||||
package art.arcane.iris.command.context;
|
||||
|
||||
import art.arcane.iris.core.tools.IrisToolbelt;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.object.IrisGenerator;
|
||||
import art.arcane.iris.engine.platform.EngineBukkitOps;
|
||||
import art.arcane.iris.util.common.director.DirectorContextHandler;
|
||||
import art.arcane.iris.util.common.director.DirectorExecutor;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import art.arcane.iris.world.IrisToolbelt;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.generation.noise.IrisGenerator;
|
||||
import art.arcane.iris.platform.generation.EngineBukkitOps;
|
||||
import art.arcane.iris.command.DirectorContextHandler;
|
||||
import art.arcane.iris.command.DirectorExecutor;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
|
||||
public class GeneratorContextHandler implements DirectorContextHandler<IrisGenerator> {
|
||||
@Override
|
||||
+9
-9
@@ -16,16 +16,16 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.context;
|
||||
package art.arcane.iris.command.context;
|
||||
|
||||
import art.arcane.iris.core.tools.IrisToolbelt;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.object.IrisRegion;
|
||||
import art.arcane.iris.engine.platform.EngineBukkitOps;
|
||||
import art.arcane.iris.util.common.director.DirectorContextHandler;
|
||||
import art.arcane.iris.util.common.director.DirectorExecutor;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import art.arcane.iris.world.IrisToolbelt;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.generation.terrain.IrisRegion;
|
||||
import art.arcane.iris.platform.generation.EngineBukkitOps;
|
||||
import art.arcane.iris.command.DirectorContextHandler;
|
||||
import art.arcane.iris.command.DirectorExecutor;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
|
||||
public class RegionContextHandler implements DirectorContextHandler<IrisRegion> {
|
||||
public Class<IrisRegion> getType() {
|
||||
+37
-37
@@ -1,37 +1,37 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.context;
|
||||
|
||||
import art.arcane.iris.util.common.director.DirectorContextHandler;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class VectorContextHandler implements DirectorContextHandler<Vector> {
|
||||
public Class<Vector> getType() {
|
||||
return Vector.class;
|
||||
}
|
||||
|
||||
public Vector handle(VolmitSender sender) {
|
||||
if (sender.isPlayer()) {
|
||||
return sender.player().getLocation().toVector();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.command.context;
|
||||
|
||||
import art.arcane.iris.command.DirectorContextHandler;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class VectorContextHandler implements DirectorContextHandler<Vector> {
|
||||
public Class<Vector> getType() {
|
||||
return Vector.class;
|
||||
}
|
||||
|
||||
public Vector handle(VolmitSender sender) {
|
||||
if (sender.isPlayer()) {
|
||||
return sender.player().getLocation().toVector();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package art.arcane.iris.util.common.director.context;
|
||||
package art.arcane.iris.command.context;
|
||||
|
||||
import art.arcane.volmlib.util.director.context.WorldContextHandlerBase;
|
||||
import art.arcane.iris.util.common.director.DirectorContextHandler;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import art.arcane.iris.command.DirectorContextHandler;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
import org.bukkit.World;
|
||||
|
||||
public class WorldContextHandler extends WorldContextHandlerBase<VolmitSender> implements DirectorContextHandler<World> {
|
||||
+3
-3
@@ -16,10 +16,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.iris.engine.object.IrisBiome;
|
||||
import art.arcane.iris.util.common.director.specialhandlers.RegistrantHandler;
|
||||
import art.arcane.iris.generation.biome.IrisBiome;
|
||||
import art.arcane.iris.command.specialhandlers.RegistrantHandler;
|
||||
|
||||
public class BiomeHandler extends RegistrantHandler<IrisBiome> {
|
||||
public BiomeHandler() {
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.iris.util.common.director.DirectorContext;
|
||||
import art.arcane.iris.command.DirectorContext;
|
||||
import art.arcane.volmlib.util.director.DirectorParameterHandler;
|
||||
import art.arcane.iris.util.common.director.DirectorSystem;
|
||||
import art.arcane.iris.command.DirectorSystem;
|
||||
import art.arcane.volmlib.util.director.handlers.base.BlockVectorHandlerBase;
|
||||
import art.arcane.volmlib.util.format.Form;
|
||||
import org.bukkit.FluidCollisionMode;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.iris.core.nms.datapack.DataVersion;
|
||||
import art.arcane.iris.platform.bukkit.nms.datapack.DataVersion;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.director.DirectorParameterHandler;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
+5
-5
@@ -16,14 +16,14 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.iris.core.IrisSettings;
|
||||
import art.arcane.iris.core.tools.IrisToolbelt;
|
||||
import art.arcane.iris.engine.object.IrisDimension;
|
||||
import art.arcane.iris.configuration.IrisSettings;
|
||||
import art.arcane.iris.world.IrisToolbelt;
|
||||
import art.arcane.iris.generation.terrain.IrisDimension;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
import art.arcane.iris.util.common.director.specialhandlers.RegistrantHandler;
|
||||
import art.arcane.iris.command.specialhandlers.RegistrantHandler;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
+3
-3
@@ -16,10 +16,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.iris.engine.object.IrisEntity;
|
||||
import art.arcane.iris.util.common.director.specialhandlers.RegistrantHandler;
|
||||
import art.arcane.iris.world.entity.IrisEntity;
|
||||
import art.arcane.iris.command.specialhandlers.RegistrantHandler;
|
||||
|
||||
public class EntityHandler extends RegistrantHandler<IrisEntity> {
|
||||
|
||||
+3
-3
@@ -16,10 +16,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.iris.engine.object.IrisGenerator;
|
||||
import art.arcane.iris.util.common.director.specialhandlers.RegistrantHandler;
|
||||
import art.arcane.iris.generation.noise.IrisGenerator;
|
||||
import art.arcane.iris.command.specialhandlers.RegistrantHandler;
|
||||
|
||||
public class GeneratorHandler extends RegistrantHandler<IrisGenerator> {
|
||||
public GeneratorHandler() {
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.volmlib.util.director.handlers.base.BukkitPlayerHandlerBase;
|
||||
import art.arcane.volmlib.util.director.DirectorParameterHandler;
|
||||
+3
-3
@@ -16,10 +16,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.iris.engine.object.IrisRegion;
|
||||
import art.arcane.iris.util.common.director.specialhandlers.RegistrantHandler;
|
||||
import art.arcane.iris.generation.terrain.IrisRegion;
|
||||
import art.arcane.iris.command.specialhandlers.RegistrantHandler;
|
||||
|
||||
public class RegionHandler extends RegistrantHandler<IrisRegion> {
|
||||
public RegionHandler() {
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.iris.util.common.director.DirectorContext;
|
||||
import art.arcane.iris.command.DirectorContext;
|
||||
import art.arcane.volmlib.util.director.DirectorParameterHandler;
|
||||
import art.arcane.iris.util.common.director.DirectorSystem;
|
||||
import art.arcane.iris.command.DirectorSystem;
|
||||
import art.arcane.volmlib.util.director.handlers.base.VectorHandlerBase;
|
||||
import art.arcane.volmlib.util.format.Form;
|
||||
import org.bukkit.FluidCollisionMode;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package art.arcane.iris.util.common.director.handlers;
|
||||
package art.arcane.iris.command.handlers;
|
||||
|
||||
import art.arcane.volmlib.util.director.handlers.base.WorldHandlerBase;
|
||||
import art.arcane.volmlib.util.director.DirectorParameterHandler;
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.hydrology.HydrologyFeatureQuery;
|
||||
import art.arcane.iris.engine.hydrology.runtime.IrisHydrologyRuntime;
|
||||
import art.arcane.iris.util.common.director.DirectorParameterHandler;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.generation.hydrology.HydrologyFeatureQuery;
|
||||
import art.arcane.iris.generation.hydrology.runtime.IrisHydrologyRuntime;
|
||||
import art.arcane.iris.command.DirectorParameterHandler;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.core.pack.PackDirectoryResolver;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.pack.PackDirectoryResolver;
|
||||
import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.iris.util.common.director.DirectorParameterHandler;
|
||||
import art.arcane.iris.command.DirectorParameterHandler;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.history.GenerationFindCatalog;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.world.history.GenerationFindCatalog;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
|
||||
public class LocatableObjectHandler extends ObjectHandler {
|
||||
+4
-4
@@ -16,11 +16,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.core.IrisSettings;
|
||||
import art.arcane.iris.core.tools.IrisToolbelt;
|
||||
import art.arcane.iris.engine.object.IrisDimension;
|
||||
import art.arcane.iris.configuration.IrisSettings;
|
||||
import art.arcane.iris.world.IrisToolbelt;
|
||||
import art.arcane.iris.generation.terrain.IrisDimension;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.volmlib.util.director.handlers.base.NullablePlayerHandlerBase;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
import art.arcane.volmlib.util.director.DirectorParameterHandler;
|
||||
import art.arcane.iris.util.common.director.handlers.PlayerHandler;
|
||||
import art.arcane.iris.command.handlers.PlayerHandler;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class NullablePlayerHandler extends PlayerHandler implements DirectorParameterHandler<Player> {
|
||||
+4
-4
@@ -16,13 +16,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.core.pack.PackDirectoryResolver;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.pack.PackDirectoryResolver;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.iris.util.common.director.DirectorParameterHandler;
|
||||
import art.arcane.iris.command.DirectorParameterHandler;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
|
||||
import java.io.File;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.engine.object.IrisObjectScale;
|
||||
import art.arcane.iris.structure.object.IrisObjectScale;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
import art.arcane.volmlib.util.director.handlers.base.DoubleHandlerBase;
|
||||
|
||||
+4
-4
@@ -16,13 +16,13 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.core.pack.PackDirectoryResolver;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.pack.PackDirectoryResolver;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.iris.util.common.director.DirectorParameterHandler;
|
||||
import art.arcane.iris.command.DirectorParameterHandler;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
|
||||
import java.io.File;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.history.GenerationFindCatalog;
|
||||
import art.arcane.iris.engine.object.IrisBiome;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.world.history.GenerationFindCatalog;
|
||||
import art.arcane.iris.generation.biome.IrisBiome;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
|
||||
public class ReachableBiomeHandler extends RegistrantHandler<IrisBiome> {
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.history.GenerationFindCatalog;
|
||||
import art.arcane.iris.engine.object.IrisRegion;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.world.history.GenerationFindCatalog;
|
||||
import art.arcane.iris.generation.terrain.IrisRegion;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
|
||||
public class ReachableRegionHandler extends RegistrantHandler<IrisRegion> {
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.core.loader.IrisRegistrant;
|
||||
import art.arcane.iris.core.pack.PackDirectoryResolver;
|
||||
import art.arcane.iris.pack.loading.IrisData;
|
||||
import art.arcane.iris.pack.loading.IrisRegistrant;
|
||||
import art.arcane.iris.pack.PackDirectoryResolver;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.iris.util.common.director.DirectorParameterHandler;
|
||||
import art.arcane.iris.command.DirectorParameterHandler;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
|
||||
import java.io.File;
|
||||
+9
-9
@@ -16,18 +16,18 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.util.common.director.specialhandlers;
|
||||
package art.arcane.iris.command.specialhandlers;
|
||||
|
||||
import art.arcane.iris.engine.framework.Engine;
|
||||
import art.arcane.iris.engine.framework.IrisStructureLocator;
|
||||
import art.arcane.iris.engine.framework.NativeStructureGenerationPolicy;
|
||||
import art.arcane.iris.engine.framework.StructureReachability;
|
||||
import art.arcane.iris.engine.history.GenerationFindCatalog;
|
||||
import art.arcane.iris.engine.object.IrisNativeStructureDecision;
|
||||
import art.arcane.iris.engine.object.NativeStructureGenerationStatus;
|
||||
import art.arcane.iris.generation.runtime.Engine;
|
||||
import art.arcane.iris.structure.placement.IrisStructureLocator;
|
||||
import art.arcane.iris.structure.nativegen.NativeStructureGenerationPolicy;
|
||||
import art.arcane.iris.structure.placement.StructureReachability;
|
||||
import art.arcane.iris.world.history.GenerationFindCatalog;
|
||||
import art.arcane.iris.structure.nativegen.IrisNativeStructureDecision;
|
||||
import art.arcane.iris.structure.nativegen.NativeStructureGenerationStatus;
|
||||
import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.iris.spi.PlatformStructureHooks;
|
||||
import art.arcane.iris.util.common.director.DirectorParameterHandler;
|
||||
import art.arcane.iris.command.DirectorParameterHandler;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.director.exceptions.DirectorParsingException;
|
||||
|
||||
+6
-3
@@ -16,7 +16,10 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.core;
|
||||
package art.arcane.iris.configuration;
|
||||
|
||||
import art.arcane.iris.world.IrisPaperLikeBackendMode;
|
||||
import art.arcane.iris.world.IrisRuntimeSchedulerMode;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import art.arcane.iris.spi.IrisLogging;
|
||||
@@ -24,8 +27,8 @@ import art.arcane.iris.spi.IrisPlatforms;
|
||||
import art.arcane.volmlib.util.io.IO;
|
||||
import art.arcane.volmlib.util.json.JSONException;
|
||||
import art.arcane.volmlib.util.json.JSONObject;
|
||||
import art.arcane.iris.util.common.misc.getHardware;
|
||||
import art.arcane.iris.util.common.plugin.VolmitSender;
|
||||
import art.arcane.iris.platform.bootstrap.getHardware;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.File;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package art.arcane.iris.core;
|
||||
package art.arcane.iris.configuration;
|
||||
|
||||
import art.arcane.iris.core.localization.IrisLanguage;
|
||||
import art.arcane.iris.localization.IrisLanguage;
|
||||
import art.arcane.iris.spi.IrisLogging;
|
||||
import art.arcane.volmlib.util.hotload.ConfigHotloadEngine;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package art.arcane.iris.core.nms.container;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BlockPos {
|
||||
private int x;
|
||||
private int y;
|
||||
private int z;
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package art.arcane.iris.core.service;
|
||||
package art.arcane.iris.diagnostics;
|
||||
|
||||
import art.arcane.iris.util.common.plugin.IrisService;
|
||||
import art.arcane.iris.platform.bukkit.plugin.IrisService;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Marker;
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.core.report;
|
||||
package art.arcane.iris.diagnostics;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.core.report;
|
||||
package art.arcane.iris.diagnostics;
|
||||
|
||||
public enum ReportType {
|
||||
ERROR,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package art.arcane.iris.core.splash;
|
||||
package art.arcane.iris.diagnostics.splash;
|
||||
|
||||
import art.arcane.iris.BuildConstants;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package art.arcane.iris.core.splash;
|
||||
package art.arcane.iris.diagnostics.splash;
|
||||
|
||||
import art.arcane.iris.core.pack.PackDirectoryResolver;
|
||||
import art.arcane.iris.pack.PackDirectoryResolver;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package art.arcane.iris.core.splash;
|
||||
package art.arcane.iris.diagnostics.splash;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
package art.arcane.iris.engine.hydrology;
|
||||
|
||||
record OutletCourseKey(long outletId) {
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
package art.arcane.iris.engine.hydrology.runtime;
|
||||
|
||||
import art.arcane.iris.engine.object.IrisBiome;
|
||||
import art.arcane.iris.engine.object.IrisRegion;
|
||||
|
||||
public record IrisHydrologyNaturalSample(
|
||||
double naturalHeight,
|
||||
boolean ocean,
|
||||
IrisBiome biome,
|
||||
IrisRegion region
|
||||
) {
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.iris.util.project.stream.ProceduralStream;
|
||||
import art.arcane.iris.util.project.stream.interpolation.Interpolated;
|
||||
import java.util.List;
|
||||
|
||||
public interface IRare {
|
||||
static <T extends IRare> ProceduralStream<T> stream(ProceduralStream<Double> noise, List<T> possibilities) {
|
||||
return ProceduralStream.of((x, z) -> pick(possibilities, noise.get(x, z)),
|
||||
(x, y, z) -> pick(possibilities, noise.get(x, y, z)),
|
||||
new Interpolated<T>() {
|
||||
@Override
|
||||
public double toDouble(T t) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T fromDouble(double d) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
static <T extends IRare> T pickSlowly(List<T> possibilities, double noiseValue) {
|
||||
if (possibilities.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (possibilities.size() == 1) {
|
||||
return possibilities.get(0);
|
||||
}
|
||||
|
||||
KList<T> rarityTypes = new KList<>();
|
||||
int totalRarity = 0;
|
||||
for (T i : possibilities) {
|
||||
totalRarity += IRare.get(i);
|
||||
}
|
||||
|
||||
for (T i : possibilities) {
|
||||
rarityTypes.addMultiple(i, totalRarity / IRare.get(i));
|
||||
}
|
||||
|
||||
return rarityTypes.get((int) (noiseValue * rarityTypes.last()));
|
||||
}
|
||||
|
||||
static <T extends IRare> T pick(List<T> possibilities, double noiseValue) {
|
||||
if (possibilities.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (possibilities.size() == 1) {
|
||||
return possibilities.getFirst();
|
||||
}
|
||||
|
||||
double total = 0;
|
||||
for (T i : possibilities) {
|
||||
total += 1d / IRare.get(i);
|
||||
}
|
||||
|
||||
double threshold = total * noiseValue;
|
||||
double buffer = 0;
|
||||
for (T i : possibilities) {
|
||||
buffer += 1d / IRare.get(i);
|
||||
if (buffer >= threshold) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return possibilities.getLast();
|
||||
}
|
||||
|
||||
static int get(Object v) {
|
||||
return v instanceof IRare ? Math.max(1, ((IRare) v).getRarity()) : 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expands a candidate list into a rarity-weighted list: each entry appears totalRarity/rarity
|
||||
* times, so picking uniformly from the result applies rarity exactly once. Both the Bukkit and
|
||||
* modded entity spawners select through this expansion; rarity must never be applied a second
|
||||
* time per spawn position.
|
||||
*/
|
||||
static <T> KList<T> expandWeighted(List<T> possibilities) {
|
||||
KList<T> rarityTypes = new KList<>();
|
||||
int totalRarity = 0;
|
||||
for (T i : possibilities) {
|
||||
totalRarity += get(i);
|
||||
}
|
||||
for (T i : possibilities) {
|
||||
rarityTypes.addMultiple(i, totalRarity / get(i));
|
||||
}
|
||||
return rarityTypes;
|
||||
}
|
||||
|
||||
int getRarity();
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("The custom biome category. Vanilla asks for this, basically what represents your biome closest?")
|
||||
public enum IrisBiomeCustomCategory {
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'beach' (shoreline biomes).")
|
||||
beach,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'desert' (hot, dry sand biomes).")
|
||||
desert,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'extreme_hills' (mountain biomes).")
|
||||
extreme_hills,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'forest' (tree-dense temperate biomes).")
|
||||
forest,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'icy' (snow and ice biomes).")
|
||||
icy,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'jungle'.")
|
||||
jungle,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'mesa' (badlands).")
|
||||
mesa,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'mushroom' (mushroom fields).")
|
||||
mushroom,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'nether'.")
|
||||
nether,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'none' (no classification).")
|
||||
none,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'ocean'.")
|
||||
ocean,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'plains'. This is the default when category is omitted.")
|
||||
plains,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'river'.")
|
||||
river,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'savanna'.")
|
||||
savanna,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'swamp'.")
|
||||
swamp,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'taiga'.")
|
||||
taiga,
|
||||
|
||||
@Desc("Tags the generated datapack biome as vanilla category 'the_end'.")
|
||||
the_end
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Defines which carved-space anchor to target for cave object placement.")
|
||||
public enum IrisCaveAnchorMode {
|
||||
@Desc("Use the active cave profile default anchor mode.")
|
||||
PROFILE_DEFAULT,
|
||||
|
||||
@Desc("Target cave floor anchors where carved space has solid support below.")
|
||||
FLOOR,
|
||||
|
||||
@Desc("Target cave ceiling anchors where carved space has solid support above.")
|
||||
CEILING,
|
||||
|
||||
@Desc("Target carved positions with no immediate solid support above or below.")
|
||||
CENTER,
|
||||
|
||||
@Desc("Target any carved-space anchor.")
|
||||
ANY
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.Snippet;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Snippet("cave-field-module")
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Desc("Represents a modular cave-density layer.")
|
||||
@Data
|
||||
public class IrisCaveFieldModule {
|
||||
@Desc("Density style used by this module.")
|
||||
private IrisGeneratorStyle style = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("Layer contribution multiplier.")
|
||||
private double weight = 1;
|
||||
|
||||
@MinNumber(-1)
|
||||
@MaxNumber(1)
|
||||
@Desc("Threshold offset applied to this layer before blending.")
|
||||
private double threshold = 0;
|
||||
|
||||
@Desc("Vertical bounds where this module can contribute, in engine-local Y where 0 is the bottom of the dimension, not world Y.")
|
||||
private IrisRange verticalRange = new IrisRange(0, 384);
|
||||
|
||||
@Desc("Invert this module before weighting.")
|
||||
private boolean invert = false;
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.ArrayType;
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.Snippet;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Snippet("cave-profile")
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Desc("Represents a configurable 3D cave profile.")
|
||||
@Data
|
||||
public class IrisCaveProfile {
|
||||
@Desc("Enable profile-driven cave carving.")
|
||||
private boolean enabled = false;
|
||||
|
||||
@Desc("Global vertical bounds for profile cave carving, in engine-local Y where 0 is the bottom of the dimension, not world Y.")
|
||||
private IrisRange verticalRange = new IrisRange(0, 384);
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(128)
|
||||
@Desc("Vertical fade range applied near cave profile min/max bounds to avoid abrupt hard-stop ceilings/floors.")
|
||||
private int verticalEdgeFade = 20;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Strength of the vertical edge fade at cave profile min/max bounds.")
|
||||
private double verticalEdgeFadeStrength = 0.18;
|
||||
|
||||
@Desc("Base density style for cave field generation.")
|
||||
private IrisGeneratorStyle baseDensityStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||
|
||||
@Desc("Detail density style blended into base caves.")
|
||||
private IrisGeneratorStyle detailDensityStyle = new IrisGeneratorStyle(NoiseStyle.SIMPLEX);
|
||||
|
||||
@Desc("Warp style used to distort cave coordinates.")
|
||||
private IrisGeneratorStyle warpStyle = new IrisGeneratorStyle(NoiseStyle.FLAT);
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("Base cave field multiplier.")
|
||||
private double baseWeight = 1;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("Detail cave field multiplier.")
|
||||
private double detailWeight = 0.35;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("Coordinate warp strength for cave fields.")
|
||||
private double warpStrength = 0;
|
||||
|
||||
@Desc("Threshold range used for carve cutoff decisions.")
|
||||
private IrisStyledRange densityThreshold = new IrisStyledRange(-0.2, 0.2, NoiseStyle.CELLULAR_IRIS_DOUBLE.style());
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Extra threshold bias subtracted from sampled threshold before carve tests.")
|
||||
private double thresholdBias = 0.16;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(8)
|
||||
@Desc("Vertical sample step used while evaluating cave density.")
|
||||
private int sampleStep = 1;
|
||||
|
||||
@Desc("Use adaptive cave density prediction so only threshold-adjacent cells fall back to full-resolution evaluation.")
|
||||
private boolean adaptiveSampling = true;
|
||||
|
||||
@MinNumber(2)
|
||||
@MaxNumber(4)
|
||||
@Desc("Horizontal adaptive predictor tuning. The carver always samples the predictor grid at a fixed step of 8; values below 8 only widen the ambiguity margin slightly and do not tighten the grid.")
|
||||
private int adaptiveSampleStep = 2;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Additional adaptive ambiguity margin used before the cave predictor falls back to exact sampling.")
|
||||
private double adaptiveThresholdMargin = 0.04;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(64)
|
||||
@Desc("Minimum solid clearance below terrain surface where carving may occur.")
|
||||
private int surfaceClearance = 4;
|
||||
|
||||
@Desc("Allow profile-driven cave carving to break through terrain surface in selected columns.")
|
||||
private boolean allowSurfaceBreak = true;
|
||||
|
||||
@Desc("Noise style used to decide where surface-breaking cave columns are allowed.")
|
||||
private IrisGeneratorStyle surfaceBreakStyle = new IrisGeneratorStyle(NoiseStyle.SIMPLEX).zoomed(0.08);
|
||||
|
||||
@MinNumber(-1)
|
||||
@MaxNumber(1)
|
||||
@Desc("Minimum signed surface-break noise value required before near-surface carving is allowed.")
|
||||
private double surfaceBreakNoiseThreshold = 0.62;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(64)
|
||||
@Desc("Near-surface depth window used for surface-break carve logic.")
|
||||
private int surfaceBreakDepth = 18;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Additional threshold boost applied while carving in the surface-break depth window.")
|
||||
private double surfaceBreakThresholdBoost = 0.2;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(64)
|
||||
@Desc("Minimum depth below terrain surface required for cave-only object anchor placement.")
|
||||
private int objectMinDepthBelowSurface = 6;
|
||||
|
||||
@ArrayType(type = IrisCaveFieldModule.class, min = 1)
|
||||
@Desc("Additional layered cave-density modules.")
|
||||
private KList<IrisCaveFieldModule> modules = new KList<>();
|
||||
|
||||
@Desc("Default cave anchor mode for cave-only object placement.")
|
||||
private IrisCaveAnchorMode defaultObjectAnchor = IrisCaveAnchorMode.FLOOR;
|
||||
|
||||
@Desc("Default placement mode for cave objects. Only applies to placements that are still on the default CENTER_HEIGHT mode; an explicit mode on the placement always wins. Stilt modes tile the object base block down to the cave floor surface. FAST_MIN_STILT is recommended for cave objects to prevent floating.")
|
||||
private ObjectPlaceMode defaultObjectPlaceMode = null;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(8)
|
||||
@Desc("Vertical scan step used while searching cave anchors.")
|
||||
private int anchorScanStep = 1;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Desc("Maximum random column retries while searching a valid cave object anchor in the chunk.")
|
||||
private int anchorSearchAttempts = 6;
|
||||
|
||||
@Desc("Allow cave fluid placement from the dimension fluid palette below fluid level.")
|
||||
private boolean allowFluid = true;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(64)
|
||||
@Desc("Minimum depth below terrain surface required before cave fluid may be placed.")
|
||||
private int fluidMinDepthBelowSurface = 12;
|
||||
|
||||
@Desc("Require solid floor support below cave fluid to reduce unsupported fluid flows.")
|
||||
private boolean fluidRequiresFloor = true;
|
||||
|
||||
@Desc("Allow cave lava placement based on lava height.")
|
||||
private boolean allowLava = true;
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Controls coastal grottos: sea-level chambers whose only opening is their ocean face, admitted either as a river outlet or as a standalone sea cave.")
|
||||
@Data
|
||||
public class IrisCoastalRiverGrottoConfig {
|
||||
@Desc("Allow a coastal grotto to serve as an explicit accepted outlet.")
|
||||
private boolean enabled = true;
|
||||
|
||||
@Desc("Hydraulic level assigned to the contained coastal grotto pool.")
|
||||
private IrisGrottoPoolLevel poolLevel = IrisGrottoPoolLevel.SEA_LEVEL;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(128)
|
||||
@Desc("Maximum horizontal radius in blocks of an accepted coastal grotto.")
|
||||
private int horizontalRadius = 12;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Desc("Maximum vertical radius in blocks of an accepted coastal grotto.")
|
||||
private int verticalRadius = 7;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(63)
|
||||
@Desc("Required dry clearance above a coastal grotto pool.")
|
||||
private int headroom = 10;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(1048576)
|
||||
@Desc("Maximum accepted coastal grotto volume in blocks.")
|
||||
private int maximumVolume = 8192;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(128)
|
||||
@Desc("Blocks the coast must stand above the sea at the outlet for a river to end in a coastal grotto instead of an open mouth. Null uses the larger of 4 and verticalRadius.")
|
||||
private Integer cliffMinimumHeight = null;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(4)
|
||||
@Desc("Share of cliffMinimumHeight the coast's slope must reach at the outlet before a grotto is chosen over an open mouth; 0 ignores the slope and decides on height alone.")
|
||||
private double cliffSlopeFactor = 0.5D;
|
||||
|
||||
@Desc("Standalone sea caves: coastal grottos opening from the ocean into the coast without a river.")
|
||||
private IrisSeaCaveConfig seaCaves = new IrisSeaCaveConfig();
|
||||
}
|
||||
@@ -1,238 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.engine.data.cache.AtomicCache;
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.RegistryListBlockType;
|
||||
import art.arcane.iris.engine.object.annotations.Required;
|
||||
import art.arcane.iris.engine.object.annotations.Snippet;
|
||||
import art.arcane.iris.engine.object.coral.CoralGenerator;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.math.RNG;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Snippet("coral")
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Desc("A single procedurally generated coral reef structure. Iris bakes a pool of deterministic variants from these settings and scatters them across the seafloor at world-gen time, exactly like an object placement but generated from scratch instead of loaded from an iob file. Mirrors the procedural tree system but tuned for underwater reefs: structural blocks are waterlogged so the coral stays alive, and placement defaults to anchoring on the terrain beneath the water surface.")
|
||||
@Data
|
||||
public class IrisCoral implements IrisProceduralPlacement {
|
||||
private final transient AtomicCache<KList<IrisObject>> variantCache = new AtomicCache<>();
|
||||
|
||||
@Desc("A human readable name used in logs and as the variant load key.")
|
||||
private String name = "coral";
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The chance per chunk for this coral to attempt placement. Use density for multiple per chunk.")
|
||||
private double chance = 0.4;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("If the chance check passes, attempt this many placements in the chunk.")
|
||||
private int density = 1;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Desc("How many distinct variants to pre-bake for this coral. Higher means more variety at a small memory cost.")
|
||||
private int variants = 6;
|
||||
|
||||
@Desc("The base seed for deterministic generation. The same seed and settings always bake the same variants.")
|
||||
private long seed = 1337;
|
||||
|
||||
@Desc("The placement mode used to anchor the coral to the seafloor.")
|
||||
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
|
||||
|
||||
@Desc("Rotate this coral's placement.")
|
||||
private IrisObjectRotation rotation = new IrisObjectRotation();
|
||||
|
||||
@Desc("Limit the max or min height of placement.")
|
||||
private IrisObjectLimit clamp = new IrisObjectLimit();
|
||||
|
||||
@Desc("Whether this coral may place on the terrain surface, under carvings, or both.")
|
||||
private CarvingMode carvingSupport = CarvingMode.SURFACE_ONLY;
|
||||
|
||||
@Desc("If true (default for coral), the coral anchors on the terrain height beneath the water, so it grows up from the seafloor rather than floating at the water surface.")
|
||||
private boolean underwater = true;
|
||||
|
||||
@Desc("Translate (offset) this placement along each axis; for example set a negative y to sink it into the seafloor.")
|
||||
private IrisObjectTranslate translate = new IrisObjectTranslate();
|
||||
|
||||
@Desc("Settings for the stilt place modes (STILT, MIN_STILT, FAST_STILT, CENTER_STILT, ERODE_STILT, ORGANIC_STILT).")
|
||||
private IrisStiltSettings stiltSettings;
|
||||
|
||||
@Desc("Settings for the vacuum place modes (VACUUM, VACUUM_HIGH, VACUUM_FAST, VACUUM_ORGANIC).")
|
||||
private IrisVacuumSettings vacuumSettings;
|
||||
|
||||
@Desc("If true (default), every resolved coral block that is waterloggable is forced waterlogged so the coral does not die in water (coral fans, sea pickles and kelp also waterlog). Set false to place dead/dry coral.")
|
||||
private boolean waterlogged = true;
|
||||
|
||||
@Desc("The overall silhouette this coral grows into (branching, fan, brain, pillar, tendril). Each form runs a different generation routine.")
|
||||
private IrisCoralForm form = IrisCoralForm.BRANCHING;
|
||||
|
||||
@Required
|
||||
@Desc("The structural coral block (the living wood of the reef), e.g. minecraft:tube_coral_block. Ignored when blockPalette is set.")
|
||||
@RegistryListBlockType
|
||||
private String block = "minecraft:tube_coral_block";
|
||||
|
||||
@Desc("A noise-driven palette for the structural coral block. When set this overrides the single block, letting the reef mix tube/brain/bubble/fire/horn coral_block tones across its body.")
|
||||
private IrisMaterialPalette blockPalette = null;
|
||||
|
||||
@Desc("Optional tip block placed at branch tips and at the very top of the structure, e.g. coral fans or minecraft:sea_pickle. Ignored when tipPalette is set. Null disables tips.")
|
||||
@RegistryListBlockType
|
||||
private String tipBlock = null;
|
||||
|
||||
@Desc("A noise-driven palette for the tip block. When set this overrides the single tipBlock, letting tips mix fan / pickle decorations.")
|
||||
private IrisMaterialPalette tipPalette = null;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The chance per eligible tip position to place a tip block (coral fan / sea pickle).")
|
||||
private double tipChance = 0.6;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Minimum overall height of the coral in blocks.")
|
||||
private int heightMin = 4;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Maximum overall height of the coral in blocks.")
|
||||
private int heightMax = 8;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("Horizontal spread of the structure in blocks. For BRANCHING this is how far arms reach out, for BRAIN/PILLAR/FAN it widens the base footprint.")
|
||||
private double spread = 3;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Lateral noise wobble (0-1) applied to branches and tendrils so they are not ruler-straight. 0 is perfectly straight, 1 is heavily wandering.")
|
||||
private double sway = 0.5;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(12)
|
||||
@Desc("BRANCHING only: how many arms sprout from the central stalk.")
|
||||
private int branchCount = 4;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("BRANCHING only: the length of each arm in blocks before reaching its tip.")
|
||||
private double branchLength = 3;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(90)
|
||||
@Desc("BRANCHING only: the upward elevation in degrees of each arm from horizontal. 90 is straight up, 0 is flat out.")
|
||||
private double branchElevation = 55;
|
||||
|
||||
@Desc("BRANCHING only: how the arms are distributed around the stalk by azimuth.")
|
||||
private IrisCoralBranchAzimuth branchAzimuth = IrisCoralBranchAzimuth.GOLDEN_ANGLE;
|
||||
|
||||
@Desc("BRANCHING only: if true, each arm splits once into a small fan of sub-arms for a bushier reef.")
|
||||
private boolean subBranches = true;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(5)
|
||||
@Desc("BRANCHING only: how many sub-arms each arm splits into when subBranches is true.")
|
||||
private int subBranchCount = 2;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("BRANCHING only: the length of each sub-arm as a fraction of its parent arm.")
|
||||
private double subBranchScale = 0.5;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(4)
|
||||
@Desc("BRANCHING and PILLAR only: the radius of the small coral tip cluster grown at each tip.")
|
||||
private int tipClusterRadius = 1;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(8)
|
||||
@Desc("BRAIN only: the horizontal radius of the brain-coral blob in blocks.")
|
||||
private int brainRadius = 3;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("BRAIN only: how strongly 3D value noise perturbs the ellipsoid surface, for a wrinkled organic blob. 0 is a smooth dome.")
|
||||
private double brainRoughness = 0.35;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(12)
|
||||
@Desc("PILLAR only: the radius of the stout vertical column in blocks.")
|
||||
private int pillarRadius = 1;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(8)
|
||||
@Desc("FAN only: the half-width of the upright fan plane in blocks (the disc widens toward its mid-height).")
|
||||
private int fanWidth = 3;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(12)
|
||||
@Desc("TENDRIL only: how many thin wavy stalks rise from the base.")
|
||||
private int tendrilCount = 4;
|
||||
|
||||
public KList<IrisObject> getVariantObjects(IrisData data) {
|
||||
return variantCache.aquire(() -> {
|
||||
KList<IrisObject> baked = new KList<>();
|
||||
int count = Math.max(1, variants);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
IrisObject object = CoralGenerator.generate(this, i, new RNG(seed + (i * 7919L)), data);
|
||||
if (object == null || object.getBlocks().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
object.setLoadKey("procedural/" + name + "#" + i);
|
||||
object.setLoader(data);
|
||||
baked.add(object);
|
||||
}
|
||||
|
||||
return baked;
|
||||
});
|
||||
}
|
||||
|
||||
public IrisObject getVariantObject(IrisData data, RNG rng) {
|
||||
KList<IrisObject> baked = getVariantObjects(data);
|
||||
if (baked == null || baked.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return baked.get(rng.i(baked.size()));
|
||||
}
|
||||
|
||||
public IrisObjectPlacement asPlacement() {
|
||||
IrisObjectPlacement placement = new IrisObjectPlacement();
|
||||
placement.setMode(mode);
|
||||
placement.setRotation(rotation);
|
||||
placement.setClamp(clamp);
|
||||
placement.setCarvingSupport(carvingSupport);
|
||||
placement.setUnderwater(underwater);
|
||||
placement.setTranslate(translate);
|
||||
placement.setStiltSettings(stiltSettings);
|
||||
placement.setVacuumSettings(vacuumSettings);
|
||||
placement.setChance(chance);
|
||||
placement.setDensity(density);
|
||||
return placement;
|
||||
}
|
||||
|
||||
public boolean isPlausible() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("The overall silhouette a procedural coral grows into. Each form drives a completely different generation routine in the coral generator, from tree-like branching arms to rounded brain blobs and thin wavy tendrils.")
|
||||
public enum IrisCoralForm {
|
||||
@Desc("A tree-like coral built from a stout central stalk that sprouts several upward-leaning arms (distributed by golden angle or randomly), each optionally splitting once into sub-arms, with small coral tip clusters (fans / sea pickles) at the ends. The most structurally complex form and the closest analogue to a procedural tree.")
|
||||
BRANCHING,
|
||||
|
||||
@Desc("A thin, single-block-thick vertical fan plane that rises and widens with height like a sheet of fire or horn coral. Reads as a flat decorative blade rather than a volume.")
|
||||
FAN,
|
||||
|
||||
@Desc("A rounded, noise-perturbed ellipsoid blob of brain coral that bulges out of the seafloor like a boulder, with an irregular wrinkled surface driven by 3D value noise.")
|
||||
BRAIN,
|
||||
|
||||
@Desc("A stout, thick vertical column of coral block topped with a dense tip cluster. Wider and blunter than a tendril, reading as a solid coral pillar or stack.")
|
||||
PILLAR,
|
||||
|
||||
@Desc("Several very thin (one block wide) wavy stalks that rise upward and wander laterally using value noise, like a clump of swaying coral whips or kelp-thin growths.")
|
||||
TENDRIL
|
||||
}
|
||||
@@ -1,219 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.engine.data.cache.AtomicCache;
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.RegistryListBlockType;
|
||||
import art.arcane.iris.engine.object.annotations.Required;
|
||||
import art.arcane.iris.engine.object.annotations.Snippet;
|
||||
import art.arcane.iris.engine.object.crystal.CrystalGenerator;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.math.RNG;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Snippet("crystal")
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Desc("A single procedurally generated crystal cluster: a budding base blob with faceted, tapered shards radiating from it (geode / amethyst-style). Iris bakes a pool of deterministic variants from these settings and scatters them at world-gen time, exactly like an object placement but generated from scratch instead of loaded from an iob file. Built for caves.")
|
||||
@Data
|
||||
public class IrisCrystal implements IrisProceduralPlacement {
|
||||
private final transient AtomicCache<KList<IrisObject>> variantCache = new AtomicCache<>();
|
||||
|
||||
@Desc("A human readable name used in logs and as the variant load key.")
|
||||
private String name = "crystal";
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The chance per chunk for this crystal cluster to attempt placement. Use density for multiple per chunk.")
|
||||
private double chance = 0.2;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("If the chance check passes, attempt this many placements in the chunk.")
|
||||
private int density = 1;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Desc("How many distinct variants to pre-bake for this crystal cluster. Higher means more variety at a small memory cost.")
|
||||
private int variants = 6;
|
||||
|
||||
@Desc("The base seed for deterministic generation. The same seed and settings always bake the same variants.")
|
||||
private long seed = 1337;
|
||||
|
||||
@Desc("The placement mode used to anchor the crystal cluster to the terrain.")
|
||||
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
|
||||
|
||||
@Desc("Rotate this crystal cluster's placement.")
|
||||
private IrisObjectRotation rotation = new IrisObjectRotation();
|
||||
|
||||
@Desc("Limit the max or min height of placement.")
|
||||
private IrisObjectLimit clamp = new IrisObjectLimit();
|
||||
|
||||
@Desc("Whether this crystal cluster may place on the terrain surface, under carvings, or both. Crystals are meant for caves, so this defaults to CARVING_ONLY.")
|
||||
private CarvingMode carvingSupport = CarvingMode.CARVING_ONLY;
|
||||
|
||||
@Desc("If true, the crystal cluster anchors on the terrain height ignoring the water surface.")
|
||||
private boolean underwater = false;
|
||||
|
||||
@Desc("Translate (offset) this placement along each axis; for example set a negative y to sink it into the ground.")
|
||||
private IrisObjectTranslate translate = new IrisObjectTranslate();
|
||||
|
||||
@Desc("Settings for the stilt place modes (STILT, MIN_STILT, FAST_STILT, CENTER_STILT, ERODE_STILT, ORGANIC_STILT).")
|
||||
private IrisStiltSettings stiltSettings;
|
||||
|
||||
@Desc("Settings for the vacuum place modes (VACUUM, VACUUM_HIGH, VACUUM_FAST, VACUUM_ORGANIC).")
|
||||
private IrisVacuumSettings vacuumSettings;
|
||||
|
||||
@Desc("The surface this crystal grows from (FLOOR shards up, CEILING shards down, WALL shards outward). This orients the baked geometry only.")
|
||||
private IrisCrystalSurface growthSurface = IrisCrystalSurface.FLOOR;
|
||||
|
||||
@Required
|
||||
@Desc("The primary crystal shard block, e.g. minecraft:amethyst_block. Ignored when blockPalette is set.")
|
||||
@RegistryListBlockType
|
||||
private String block = "minecraft:amethyst_block";
|
||||
|
||||
@Desc("A noise-driven palette for the crystal shards (a prismatic mix, e.g. amethyst_block, calcite, tinted_glass). When set this overrides the single block, letting the shards mix blocks by noise. Palette wins.")
|
||||
private IrisMaterialPalette blockPalette = null;
|
||||
|
||||
@Desc("Optional block placed at the very tip of each shard for a different colored or sparkling point (e.g. minecraft:amethyst_cluster or glowstone). Ignored when tipPalette is set. If unset and glow is true, a light-emitting block is sprinkled among the tips instead.")
|
||||
@RegistryListBlockType
|
||||
private String tipBlock = null;
|
||||
|
||||
@Desc("A noise-driven palette for the shard tips. When set this overrides the single tipBlock. Palette wins.")
|
||||
private IrisMaterialPalette tipPalette = null;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The chance per shard that its very tip is replaced by the tip block (or glow block).")
|
||||
private double tipChance = 0.6;
|
||||
|
||||
@Desc("If true and no tipBlock/tipPalette is set, sprinkle a light-emitting block (the glowBlock) among the shard tips for a sparkling geode.")
|
||||
private boolean glow = false;
|
||||
|
||||
@Desc("The light-emitting block sprinkled among the tips when glow is true and no tip block is configured.")
|
||||
@RegistryListBlockType
|
||||
private String glowBlock = "minecraft:glowstone";
|
||||
|
||||
@Desc("Optional block for the budding base blob the shards grow from, e.g. minecraft:budding_amethyst or calcite. Ignored when basePalette is set. If unset, the base is built from the primary shard block.")
|
||||
@RegistryListBlockType
|
||||
private String baseBlock = "minecraft:budding_amethyst";
|
||||
|
||||
@Desc("A noise-driven palette for the budding base blob. When set this overrides the single baseBlock. Palette wins.")
|
||||
private IrisMaterialPalette basePalette = null;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("Radius in blocks of the budding base blob the shards radiate from. 0 places no base blob (shards spring from a single point).")
|
||||
private double baseRadius = 1.6;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("How strongly value noise perturbs the surface of the base blob, for a lumpy organic budding base rather than a clean sphere.")
|
||||
private double baseNoise = 0.35;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Minimum number of shards radiating from the base.")
|
||||
private int shardCountMin = 5;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Maximum number of shards radiating from the base.")
|
||||
private int shardCountMax = 11;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Minimum length in blocks of a shard, measured from the base out to its pointed tip.")
|
||||
private int shardLengthMin = 3;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Maximum length in blocks of a shard, measured from the base out to its pointed tip.")
|
||||
private int shardLengthMax = 8;
|
||||
|
||||
@MinNumber(0.5)
|
||||
@Desc("Starting radius in blocks of a shard at its thick base end. The shard tapers from this down to a single block at the tip.")
|
||||
private double shardBaseRadius = 1.4;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("How aggressively each shard narrows from base to tip. 0 keeps a near-constant column; 1 tapers fully to a sharp point at the very tip. Each shard always ends in a single pointed block.")
|
||||
private double shardTaper = 0.85;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(90)
|
||||
@Desc("The half-angle in degrees of the cone the shards fan within around the surface normal. 0 makes all shards parallel to the normal; larger values splay them outward into a starburst.")
|
||||
private double spreadAngle = 45;
|
||||
|
||||
@Desc("How the shard azimuths are distributed around the normal (RANDOM for a chaotic clump, GOLDEN_ANGLE for an evenly spaced rosette).")
|
||||
private IrisCrystalDistribution distribution = IrisCrystalDistribution.GOLDEN_ANGLE;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Per-shard angular randomness (0-1) added on top of the chosen distribution so the cluster never looks mechanically regular. 0 is perfectly distributed; 1 is heavily jittered.")
|
||||
private double jitter = 0.25;
|
||||
|
||||
public KList<IrisObject> getVariantObjects(IrisData data) {
|
||||
return variantCache.aquire(() -> {
|
||||
KList<IrisObject> baked = new KList<>();
|
||||
int count = Math.max(1, variants);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
IrisObject object = CrystalGenerator.generate(this, i, new RNG(seed + (i * 7919L)), data);
|
||||
if (object == null || object.getBlocks().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
object.setLoadKey("procedural/" + name + "#" + i);
|
||||
object.setLoader(data);
|
||||
baked.add(object);
|
||||
}
|
||||
|
||||
return baked;
|
||||
});
|
||||
}
|
||||
|
||||
public IrisObject getVariantObject(IrisData data, RNG rng) {
|
||||
KList<IrisObject> baked = getVariantObjects(data);
|
||||
if (baked == null || baked.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return baked.get(rng.i(baked.size()));
|
||||
}
|
||||
|
||||
public IrisObjectPlacement asPlacement() {
|
||||
IrisObjectPlacement placement = new IrisObjectPlacement();
|
||||
placement.setMode(mode);
|
||||
placement.setRotation(rotation);
|
||||
placement.setClamp(clamp);
|
||||
placement.setCarvingSupport(carvingSupport);
|
||||
placement.setUnderwater(underwater);
|
||||
placement.setTranslate(translate);
|
||||
placement.setStiltSettings(stiltSettings);
|
||||
placement.setVacuumSettings(vacuumSettings);
|
||||
placement.setChance(chance);
|
||||
placement.setDensity(density);
|
||||
return placement;
|
||||
}
|
||||
|
||||
public boolean isPlausible() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("The surface a crystal cluster grows from. This only orients the baked geometry (which way the shards point); placement of the object into a cave is handled by the placement system, not here.")
|
||||
public enum IrisCrystalSurface {
|
||||
@Desc("Grows from a cave floor. The budding base sits at the bottom and the shards point upward, fanning within the spread cone around the up axis. Built with positive py so the cluster grows up from the base layer.")
|
||||
FLOOR,
|
||||
|
||||
@Desc("Grows from a cave ceiling. The budding base sits at the top and the shards point downward like stalactites, fanning within the spread cone around the down axis. Built with negative py so the cluster grows down from the ceiling.")
|
||||
CEILING,
|
||||
|
||||
@Desc("Grows from a cave wall. The budding base hugs the wall and the shards point outward and slightly upward, fanning within the spread cone around a tilted normal so the cluster reads as a wall sconce of shards.")
|
||||
WALL
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.Required;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Independent deep-fluid configuration outside the surface and underground river source budgets.")
|
||||
@Data
|
||||
public class IrisDeepFluidConfig {
|
||||
@Required
|
||||
@Desc("Deep-fluid system identifier.")
|
||||
private String id = "deep_lava";
|
||||
|
||||
@Required
|
||||
@Desc("Fluid palette used by accepted deep pools and short channels.")
|
||||
private IrisMaterialPalette fluidPalette = new IrisMaterialPalette().qclear().qadd("lava");
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(64)
|
||||
@Desc("Expected independent deep-fluid sources per hydrology tile.")
|
||||
private double density = 0.125D;
|
||||
|
||||
@MinNumber(16)
|
||||
@MaxNumber(8192)
|
||||
@Desc("Nominal spacing in blocks between independent deep-fluid source sites.")
|
||||
private int spacing = 768;
|
||||
|
||||
@Desc("Deep-fluid elevation in world Y.")
|
||||
private IrisStyledRange height = new IrisStyledRange(
|
||||
-192D,
|
||||
32D,
|
||||
new IrisGeneratorStyle(NoiseStyle.IRIS).zoomed(1024D)
|
||||
);
|
||||
|
||||
@MinNumber(2)
|
||||
@MaxNumber(128)
|
||||
@Desc("Maximum horizontal radius in blocks of an accepted deep-fluid body.")
|
||||
private int horizontalRadius = 14;
|
||||
|
||||
@MinNumber(2)
|
||||
@MaxNumber(64)
|
||||
@Desc("Maximum vertical radius in blocks of an accepted deep-fluid body.")
|
||||
private int verticalRadius = 6;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(32)
|
||||
@Desc("Wet width in blocks of an accepted short deep-fluid channel.")
|
||||
private int channelWidth = 3;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(32)
|
||||
@Desc("Wet depth in blocks of an accepted deep-fluid body.")
|
||||
private int depth = 1;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(63)
|
||||
@Desc("Required dry clearance above an accepted deep-fluid body.")
|
||||
private int headroom = 6;
|
||||
|
||||
@Desc("Allow accepted sources to form fully contained pools.")
|
||||
private boolean containedPools = true;
|
||||
|
||||
@Desc("Allow accepted sources to form short contained channels.")
|
||||
private boolean shortChannels = false;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Selects which biome identity is checked by a deposit's include and exclude filters.")
|
||||
public enum IrisDepositBiomeScope {
|
||||
@Desc("Checks the surface biome selected for the deposit column.")
|
||||
SURFACE,
|
||||
@Desc("Checks the cave biome selected at the deposit origin.")
|
||||
CAVE
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Controls how a deposit chooses its origin height within the configured vertical band.")
|
||||
public enum IrisDepositHeightDistribution {
|
||||
@Desc("Samples uniformly after clipping the configured band to the terrain and build-height bounds.")
|
||||
CLIPPED_UNIFORM,
|
||||
@Desc("Samples uniformly from the configured band, then rejects origins outside the terrain or build-height bounds.")
|
||||
UNIFORM,
|
||||
@Desc("Samples toward the middle of the configured band with a triangular distribution, then rejects invalid origins.")
|
||||
TRIANGLE
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Controls which vertical part of the world may contain a deposit origin.")
|
||||
public enum IrisDepositPlacementScope {
|
||||
@Desc("Places in solid terrain below the generated surface while preserving the configured surface clearance.")
|
||||
TERRAIN,
|
||||
@Desc("Places only in existing solid hosts above the generated terrain surface.")
|
||||
ABOVE_TERRAIN,
|
||||
@Desc("Places in existing solid hosts anywhere within the dimension build height.")
|
||||
FULL_HEIGHT
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Selects the geometry used to build each deposit clump.")
|
||||
public enum IrisDepositShape {
|
||||
@Desc("Builds the traditional Iris fixed-block-count cube clump.")
|
||||
IRIS,
|
||||
@Desc("Builds a chain of overlapping ellipsoids matching Minecraft's ordinary ore-vein geometry.")
|
||||
VANILLA_ELLIPSOID,
|
||||
@Desc("Builds sparse candidate offsets matching Minecraft's scattered-ore geometry.")
|
||||
VANILLA_SCATTERED
|
||||
}
|
||||
@@ -1,293 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.engine.data.cache.AtomicCache;
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.RegistryListBlockType;
|
||||
import art.arcane.iris.engine.object.annotations.Required;
|
||||
import art.arcane.iris.engine.object.annotations.Snippet;
|
||||
import art.arcane.iris.engine.object.formation.FormationGenerator;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.math.RNG;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Snippet("formation")
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Desc("A single procedurally generated natural formation, including rock landmarks and magical glacial silhouettes. Iris bakes a pool of deterministic variants from these settings and scatters them at world-gen time, exactly like an object placement but generated from scratch instead of loaded from an iob file.")
|
||||
@Data
|
||||
public class IrisFormation implements IrisProceduralPlacement {
|
||||
private final transient AtomicCache<KList<IrisObject>> variantCache = new AtomicCache<>();
|
||||
|
||||
@Desc("A human readable name used in logs and as the variant load key.")
|
||||
private String name = "formation";
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The chance per chunk for this formation to attempt placement. Use density for multiple per chunk.")
|
||||
private double chance = 0.02;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("If the chance check passes, attempt this many placements in the chunk.")
|
||||
private int density = 1;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Desc("How many distinct variants to pre-bake for this formation. Higher means more variety at a small memory cost.")
|
||||
private int variants = 6;
|
||||
|
||||
@Desc("The base seed for deterministic generation. The same seed and settings always bake the same variants.")
|
||||
private long seed = 1337;
|
||||
|
||||
@Desc("The placement mode used to anchor the formation to the terrain.")
|
||||
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
|
||||
|
||||
@Desc("Rotate this formation's placement.")
|
||||
private IrisObjectRotation rotation = new IrisObjectRotation();
|
||||
|
||||
@Desc("Limit the max or min height of placement.")
|
||||
private IrisObjectLimit clamp = new IrisObjectLimit();
|
||||
|
||||
@Desc("Whether this formation may place on the terrain surface, under carvings, or both.")
|
||||
private CarvingMode carvingSupport = CarvingMode.SURFACE_ONLY;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(16)
|
||||
@Desc("Horizontal buffer, in blocks, beyond each lowest solid foundation block that must also be solid, un-carved ground.")
|
||||
private int surfaceSupportBuffer = 3;
|
||||
|
||||
@Desc("If true, the formation anchors on the terrain height ignoring the water surface.")
|
||||
private boolean underwater = false;
|
||||
|
||||
@Desc("Translate (offset) this placement along each axis; for example set a negative y to sink it into the ground.")
|
||||
private IrisObjectTranslate translate = new IrisObjectTranslate();
|
||||
|
||||
@Desc("Settings for the stilt place modes (STILT, MIN_STILT, FAST_STILT, CENTER_STILT, ERODE_STILT, ORGANIC_STILT).")
|
||||
private IrisStiltSettings stiltSettings;
|
||||
|
||||
@Desc("Settings for the vacuum place modes (VACUUM, VACUUM_HIGH, VACUUM_FAST, VACUUM_ORGANIC).")
|
||||
private IrisVacuumSettings vacuumSettings;
|
||||
|
||||
@Desc("The overall silhouette of the formation. Drives which sculpting routine the generator uses.")
|
||||
private IrisFormationForm form = IrisFormationForm.SPIRE;
|
||||
|
||||
@Required
|
||||
@Desc("The main rock block, e.g. minecraft:stone. Ignored when blockPalette is set.")
|
||||
@RegistryListBlockType
|
||||
private String block = "minecraft:stone";
|
||||
|
||||
@Desc("A noise-driven palette for the main rock body. When set this overrides the single block, letting the body mix blocks by noise.")
|
||||
private IrisMaterialPalette blockPalette = null;
|
||||
|
||||
@Desc("Optional caprock block placed on the top crown of the formation (and the wide overhanging cap for HOODOO). Ignored when capPalette is set. When null and capPalette is unset, the formation uses its main rock everywhere.")
|
||||
@RegistryListBlockType
|
||||
private String capBlock = null;
|
||||
|
||||
@Desc("A noise-driven palette for the caprock. When set this overrides the single capBlock.")
|
||||
private IrisMaterialPalette capPalette = null;
|
||||
|
||||
@Desc("Optional palette of strata (horizontal colored bands) blended into the rock body by y level. When set, every strataThickness blocks of height switches to the next strata block, producing the signature banded look. Falls back to the main block where unset.")
|
||||
private IrisMaterialPalette strataPalette = null;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(32)
|
||||
@Desc("The thickness in blocks of each horizontal strata band when strataPalette is set.")
|
||||
private int strataThickness = 3;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Minimum total height of the formation in blocks.")
|
||||
private int heightMin = 14;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Maximum total height of the formation in blocks.")
|
||||
private int heightMax = 26;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Minimum base radius (half-width) of the formation in blocks.")
|
||||
private int baseWidthMin = 3;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Maximum base radius (half-width) of the formation in blocks.")
|
||||
private int baseWidthMax = 6;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("The target radius (half-width) at the very top of the formation in blocks, before the profile is applied. 0 means taper to a point.")
|
||||
private int topWidth = 0;
|
||||
|
||||
@Desc("The function used to shape the formation radius over its height.")
|
||||
private IrisFormationProfile profile = IrisFormationProfile.TAPER;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The normalized height (0 base, 1 top) of the pinched waist for the PARABOLIC profile (used by HOODOO).")
|
||||
private double profileWaist = 0.55;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The minimum radius fraction at the waist for the PARABOLIC profile. Lower values pinch the waist tighter.")
|
||||
private double profileWaistFloor = 0.35;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("How far the formation leans, in degrees from vertical. 0 is perfectly upright. The whole body is sheared by this amount over its height.")
|
||||
private double lean = 0;
|
||||
|
||||
@Desc("Compass direction in degrees the formation leans toward when lean is non-zero.")
|
||||
private double leanAzimuth = 0;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Surface roughness from 0 (a clean smooth solid) to 1 (heavily eroded and pitted). Driven by 3D value noise that perturbs the radius so the formation never reads as a clean cylinder.")
|
||||
private double roughness = 0.3;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Per-block surface jitter from 0 (none) to 1 (maximum). Randomly carves and adds isolated edge blocks to break up the silhouette.")
|
||||
private double jitter = 0.15;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("Extra wide cap radius in blocks added on top for the HOODOO form, producing the overhanging mushroom caprock. 0 disables the overhang.")
|
||||
private int hoodooCapRadius = 3;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(6)
|
||||
@Desc("The height in blocks of the HOODOO overhanging caprock slab.")
|
||||
private int hoodooCapHeight = 3;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("How wide the ARCH opening is in blocks (the gap between the two legs). The arch span is rasterized over this width.")
|
||||
private int archSpan = 10;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("The thickness in blocks of the ARCH legs and spanning curve.")
|
||||
private int archThickness = 3;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("How strongly an ARCH varies its leg steepness, crown position, depth bow and tube width between deterministic variants. 0 is symmetric and 1 is highly organic.")
|
||||
private double archAsymmetry = 0.35;
|
||||
|
||||
@MinNumber(2)
|
||||
@MaxNumber(12)
|
||||
@Desc("How many separate columns make up a BASALT_COLUMN cluster. Each column gets a randomized height around the formation height range.")
|
||||
private int basaltColumns = 5;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("The radius (half-width) in blocks of each individual column in a BASALT_COLUMN cluster.")
|
||||
private int basaltColumnRadius = 1;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("How much the heights of individual BASALT_COLUMN columns vary from each other, from 0 (all equal) to 1 (highly varied).")
|
||||
private double basaltHeightVariance = 0.45;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(12)
|
||||
@Desc("How many tapered summits crown an ICEBERG formation.")
|
||||
private int icebergPeaks = 3;
|
||||
|
||||
@MinNumber(2)
|
||||
@MaxNumber(8)
|
||||
@Desc("How many separated shards form a FISSURE.")
|
||||
private int fractureCount = 3;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(16)
|
||||
@Desc("Open-air separation in blocks between the shards of a FISSURE.")
|
||||
private int fractureSeparation = 2;
|
||||
|
||||
@MinNumber(0.25)
|
||||
@MaxNumber(6)
|
||||
@Desc("How many complete turns a SPIRAL makes from base to tip.")
|
||||
private double spiralTurns = 1.5;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(32)
|
||||
@Desc("The starting distance in blocks between a SPIRAL and its open center.")
|
||||
private int spiralRadius = 4;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(8)
|
||||
@Desc("The radius in blocks of the tube swept along a SPIRAL.")
|
||||
private int spiralThickness = 2;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(32)
|
||||
@Desc("How far the hooked arm of an OVERHANG projects from its base.")
|
||||
private int overhangReach = 8;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(16)
|
||||
@Desc("How many blocks the tip of an OVERHANG curls downward.")
|
||||
private int overhangDrop = 3;
|
||||
|
||||
public KList<IrisObject> getVariantObjects(IrisData data) {
|
||||
return variantCache.aquire(() -> {
|
||||
KList<IrisObject> baked = new KList<>();
|
||||
int count = Math.max(1, variants);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
IrisObject object = FormationGenerator.generate(this, i, new RNG(seed + (i * 7919L)), data);
|
||||
if (object == null || object.getBlocks().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
object.setLoadKey("procedural/" + name + "#" + i);
|
||||
object.setLoader(data);
|
||||
baked.add(object);
|
||||
}
|
||||
|
||||
return baked;
|
||||
});
|
||||
}
|
||||
|
||||
public IrisObject getVariantObject(IrisData data, RNG rng) {
|
||||
KList<IrisObject> baked = getVariantObjects(data);
|
||||
if (baked == null || baked.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return baked.get(rng.i(baked.size()));
|
||||
}
|
||||
|
||||
public IrisObjectPlacement asPlacement() {
|
||||
IrisObjectPlacement placement = new IrisObjectPlacement();
|
||||
placement.setMode(mode);
|
||||
placement.setRotation(rotation);
|
||||
placement.setClamp(clamp);
|
||||
placement.setCarvingSupport(carvingSupport);
|
||||
placement.setSurfaceSupportBuffer(surfaceSupportBuffer);
|
||||
placement.setUnderwater(underwater);
|
||||
placement.setTranslate(translate);
|
||||
placement.setStiltSettings(stiltSettings);
|
||||
placement.setVacuumSettings(vacuumSettings);
|
||||
placement.setChance(chance);
|
||||
placement.setDensity(density);
|
||||
return placement;
|
||||
}
|
||||
|
||||
public boolean isPlausible() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("The overall silhouette of a procedural natural formation. Each form drives a distinct sculpting routine in the formation generator.")
|
||||
public enum IrisFormationForm {
|
||||
@Desc("A tall, slender needle of rock that tapers smoothly to a point at the top (a sharp pinnacle or stone spire).")
|
||||
SPIRE,
|
||||
@Desc("A column with a pinched, eroded waist and a wide overhanging caprock balanced on top (the classic desert hoodoo / mushroom rock).")
|
||||
HOODOO,
|
||||
@Desc("Two stout legs joined by a spanning curved bridge of rock overhead (a natural stone arch).")
|
||||
ARCH,
|
||||
@Desc("A chunky, blocky stack that tapers gently as it rises, like an isolated pillar of rock standing in water (a sea stack).")
|
||||
SEA_STACK,
|
||||
@Desc("A rounded, lumpy boulder formed from a noise-perturbed ellipsoid that sits low on the terrain.")
|
||||
BOULDER,
|
||||
@Desc("A tightly packed cluster of several vertical, near-hexagonal columns of varying height (a basalt column formation / giant's causeway).")
|
||||
BASALT_COLUMN,
|
||||
@Desc("A broad, faceted mound crowned by several irregular tapered peaks, suitable for icebergs and glacial outcrops.")
|
||||
ICEBERG,
|
||||
@Desc("Several separated, outward-leaning shards divided by open cracks.")
|
||||
FISSURE,
|
||||
@Desc("A tapered tube swept around a tightening helix, leaving open air through its curled center.")
|
||||
SPIRAL,
|
||||
@Desc("A grounded pillar that bends into a long hooked cantilever and curls downward at its tip.")
|
||||
OVERHANG
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("A width-shaping function evaluated over normalized height (0 at the base, 1 at the top). Controls how the formation radius scales between baseWidth at the bottom and topWidth at the top.")
|
||||
public enum IrisFormationProfile {
|
||||
@Desc("Same radius at every height (a straight cylinder of constant baseWidth).")
|
||||
CONSTANT,
|
||||
@Desc("Radius ramps straight from baseWidth at the bottom to topWidth at the top.")
|
||||
LINEAR,
|
||||
@Desc("Radius shrinks smoothly toward a point as height increases (an ease that drives the SPIRE needle and gentle SEA_STACK taper).")
|
||||
TAPER,
|
||||
@Desc("Radius pinches to a narrow waist near profileWaist then widens again toward the top (the eroded waist used by HOODOO columns).")
|
||||
PARABOLIC,
|
||||
@Desc("Radius bulges out to its maximum in the middle of the height range and narrows at both ends (a barrel / bulged column).")
|
||||
BULGE
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.core.loader.IrisData;
|
||||
import art.arcane.iris.engine.data.cache.AtomicCache;
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.RegistryListBlockType;
|
||||
import art.arcane.iris.engine.object.annotations.Required;
|
||||
import art.arcane.iris.engine.object.annotations.Snippet;
|
||||
import art.arcane.iris.engine.object.fungi.FungusGenerator;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import art.arcane.volmlib.util.math.RNG;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Snippet("fungus")
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Desc("A single procedurally generated fungus (giant mushroom or shelf fungus). Iris bakes a pool of deterministic variants from these settings and scatters them at world-gen time, exactly like an object placement but generated from scratch instead of loaded from an iob file. The fungus is built as a stem column with a cap dome grown on top, mirroring the trunk-and-canopy model used by procedural trees.")
|
||||
@Data
|
||||
public class IrisFungus implements IrisProceduralPlacement {
|
||||
private final transient AtomicCache<KList<IrisObject>> variantCache = new AtomicCache<>();
|
||||
|
||||
@Desc("A human readable name used in logs and as the variant load key.")
|
||||
private String name = "fungus";
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The chance per chunk for this fungus to attempt placement. Use density for multiple per chunk.")
|
||||
private double chance = 0.4;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("If the chance check passes, attempt this many placements in the chunk.")
|
||||
private int density = 1;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Desc("How many distinct variants to pre-bake for this fungus. Higher means more variety at a small memory cost.")
|
||||
private int variants = 6;
|
||||
|
||||
@Desc("The base seed for deterministic generation. The same seed and settings always bake the same variants.")
|
||||
private long seed = 1337;
|
||||
|
||||
@Desc("The placement mode used to anchor the fungus to the terrain.")
|
||||
private ObjectPlaceMode mode = ObjectPlaceMode.CENTER_HEIGHT;
|
||||
|
||||
@Desc("Rotate this fungus's placement.")
|
||||
private IrisObjectRotation rotation = new IrisObjectRotation();
|
||||
|
||||
@Desc("Limit the max or min height of placement.")
|
||||
private IrisObjectLimit clamp = new IrisObjectLimit();
|
||||
|
||||
@Desc("Whether this fungus may place on the terrain surface, under carvings, or both.")
|
||||
private CarvingMode carvingSupport = CarvingMode.SURFACE_ONLY;
|
||||
|
||||
@Desc("If true, the fungus anchors on the terrain height ignoring the water surface.")
|
||||
private boolean underwater = false;
|
||||
|
||||
@Desc("Translate (offset) this placement along each axis; for example set a negative y to sink it into the ground.")
|
||||
private IrisObjectTranslate translate = new IrisObjectTranslate();
|
||||
|
||||
@Desc("Settings for the stilt place modes (STILT, MIN_STILT, FAST_STILT, CENTER_STILT, ERODE_STILT, ORGANIC_STILT).")
|
||||
private IrisStiltSettings stiltSettings;
|
||||
|
||||
@Desc("Settings for the vacuum place modes (VACUUM, VACUUM_HIGH, VACUUM_FAST, VACUUM_ORGANIC).")
|
||||
private IrisVacuumSettings vacuumSettings;
|
||||
|
||||
@Required
|
||||
@Desc("The stem block, e.g. minecraft:mushroom_stem. Ignored when stemPalette is set.")
|
||||
@RegistryListBlockType
|
||||
private String stem = "minecraft:mushroom_stem";
|
||||
|
||||
@Desc("A noise-driven palette for the stem. When set this overrides the single stem block, letting the stem mix blocks by noise.")
|
||||
private IrisMaterialPalette stemPalette = null;
|
||||
|
||||
@Required
|
||||
@Desc("The cap block, e.g. minecraft:red_mushroom_block. Ignored when capPalette is set.")
|
||||
@RegistryListBlockType
|
||||
private String cap = "minecraft:red_mushroom_block";
|
||||
|
||||
@Desc("A noise-driven palette for the cap. When set this overrides the single cap block, letting the cap mix blocks by noise.")
|
||||
private IrisMaterialPalette capPalette = null;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Minimum total stem height in blocks. Variants spread between this and stemHeightMax.")
|
||||
private int stemHeightMin = 5;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Maximum total stem height in blocks. Variants spread between stemHeightMin and this.")
|
||||
private int stemHeightMax = 9;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(3)
|
||||
@Desc("Base stem width in blocks. 1 is a single column, 2 is a 2x2 stem, 3 is a chunky 3x3 trunk.")
|
||||
private int stemWidth = 1;
|
||||
|
||||
@Desc("How far the stem leans away from vertical, in degrees. 0 is perfectly upright; small values give an organic tilt.")
|
||||
private double stemCurve = 0;
|
||||
|
||||
@Desc("Compass direction in degrees the stem leans toward when stemCurve is non-zero.")
|
||||
private double stemLeanAzimuth = 0;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("Amplitude in blocks of a gentle sideways wave applied up the stem so it is not a perfectly straight ruler.")
|
||||
private double stemWaveAmplitude = 0.4;
|
||||
|
||||
@MinNumber(0.0001)
|
||||
@Desc("The number of full sine wobbles applied over the stem height for the stem wave.")
|
||||
private double stemWavePeriods = 1;
|
||||
|
||||
@Desc("The silhouette of the cap (dome, flat umbrella, funnel, cone, or wide shallow slab).")
|
||||
private IrisFungusCapShape capShape = IrisFungusCapShape.DOME;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Minimum cap radius in blocks (measured from the cap center to its rim).")
|
||||
private int capRadiusMin = 3;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Maximum cap radius in blocks (measured from the cap center to its rim).")
|
||||
private int capRadiusMax = 5;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(3)
|
||||
@Desc("How many blocks thick the cap shell is. 1 is a thin skin, 3 is a fleshy slab.")
|
||||
private int capThickness = 1;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Vertical flatten factor for the cap. 0 leaves the cap at full height, 1 squashes it flat into a disc.")
|
||||
private double capSquish = 0.4;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("How far the cap rim droops downward, in degrees, curling the edge of the cap toward the ground.")
|
||||
private double capDroop = 20;
|
||||
|
||||
@MinNumber(0)
|
||||
@Desc("How far the cap radius extends past the stem before the rim begins, in blocks. Larger values make the cap overhang the stem more.")
|
||||
private double capOverhang = 2;
|
||||
|
||||
@Desc("Optional block forming the gill layer on the underside of the cap (gills or a glow layer), e.g. minecraft:brown_mushroom_block or minecraft:shroomlight. Ignored when gillPalette is set or left null.")
|
||||
@RegistryListBlockType
|
||||
private String gillBlock = null;
|
||||
|
||||
@Desc("A noise-driven palette for the underside gill layer. When set this overrides the single gillBlock.")
|
||||
private IrisMaterialPalette gillPalette = null;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The fraction of underside cap blocks replaced by the gill block when a gill block or palette is set.")
|
||||
private double gillChance = 0.85;
|
||||
|
||||
@Desc("Optional block speckled across the top of the cap by noise (white toadstool dots, warts, glowing spots), e.g. minecraft:bone_block or minecraft:white_concrete. Ignored when spotPalette is set or left null.")
|
||||
@RegistryListBlockType
|
||||
private String spotBlock = null;
|
||||
|
||||
@Desc("A noise-driven palette for the cap top spots. When set this overrides the single spotBlock.")
|
||||
private IrisMaterialPalette spotPalette = null;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The fraction of top cap blocks replaced by the spot block, selected by value noise so spots cluster naturally.")
|
||||
private double spotChance = 0.18;
|
||||
|
||||
@Desc("If true, generate a bracket / shelf fungus instead of an upright mushroom: a small flat fan that grows sideways off a very short or absent stem, like a polypore clinging to a trunk.")
|
||||
private boolean shelf = false;
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("The radius in blocks of the sideways fan when shelf is true.")
|
||||
private int shelfRadius = 3;
|
||||
|
||||
public KList<IrisObject> getVariantObjects(IrisData data) {
|
||||
return variantCache.aquire(() -> {
|
||||
KList<IrisObject> baked = new KList<>();
|
||||
int count = Math.max(1, variants);
|
||||
int lo = Math.min(stemHeightMin, stemHeightMax);
|
||||
int hi = Math.max(stemHeightMin, stemHeightMax);
|
||||
RNG heightRng = new RNG(seed);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
int height;
|
||||
if (count == 1 || lo == hi) {
|
||||
height = heightRng.i(lo, hi + 1);
|
||||
} else {
|
||||
double step = (hi - lo) / (double) (count - 1);
|
||||
double base = lo + step * i;
|
||||
double jitter = heightRng.d(-step * 0.3, step * 0.3);
|
||||
height = (int) Math.round(Math.max(lo, Math.min(hi, base + jitter)));
|
||||
}
|
||||
|
||||
IrisObject object = FungusGenerator.generate(this, Math.max(1, height), new RNG(seed + (i * 7919L)), data);
|
||||
if (object == null || object.getBlocks().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
object.setLoadKey("procedural/" + name + "#" + i);
|
||||
object.setLoader(data);
|
||||
baked.add(object);
|
||||
}
|
||||
|
||||
return baked;
|
||||
});
|
||||
}
|
||||
|
||||
public IrisObject getVariantObject(IrisData data, RNG rng) {
|
||||
KList<IrisObject> baked = getVariantObjects(data);
|
||||
if (baked == null || baked.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return baked.get(rng.i(baked.size()));
|
||||
}
|
||||
|
||||
public IrisObjectPlacement asPlacement() {
|
||||
IrisObjectPlacement placement = new IrisObjectPlacement();
|
||||
placement.setMode(mode);
|
||||
placement.setRotation(rotation);
|
||||
placement.setClamp(clamp);
|
||||
placement.setCarvingSupport(carvingSupport);
|
||||
placement.setUnderwater(underwater);
|
||||
placement.setTranslate(translate);
|
||||
placement.setStiltSettings(stiltSettings);
|
||||
placement.setVacuumSettings(vacuumSettings);
|
||||
placement.setChance(chance);
|
||||
placement.setDensity(density);
|
||||
return placement;
|
||||
}
|
||||
|
||||
public boolean isPlausible() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("The silhouette of the mushroom cap. Each shape drives how the cap radius and thickness vary from its apex down to the rim, giving the fungus a distinct profile.")
|
||||
public enum IrisFungusCapShape {
|
||||
@Desc("A rounded hemisphere cap that bulges up and curls slightly under at the rim, the classic red toadstool dome.")
|
||||
DOME,
|
||||
@Desc("A wide, nearly flat umbrella that holds its full radius almost to the edge before dropping, the brown-mushroom plate look.")
|
||||
FLAT,
|
||||
@Desc("An upturned bowl whose rim lifts higher than its center, cupping upward like a chanterelle or funnel mushroom.")
|
||||
FUNNEL,
|
||||
@Desc("A tall pointed cone that tapers from a broad base to a sharp apex, the witch-hat parasol silhouette.")
|
||||
CONICAL,
|
||||
@Desc("A very wide but shallow slab, a low overhanging shelf-like roof that spreads far past the stem with minimal vertical rise.")
|
||||
FLAT_WIDE
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Where the pool at the bottom of a coastal grotto sits.")
|
||||
public enum IrisGrottoPoolLevel {
|
||||
@Desc("The pool surface sits at the dimension fluid height, so the grotto meets the sea.")
|
||||
SEA_LEVEL
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.ArrayType;
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Dimension-owned physical hydrology configuration.")
|
||||
@Data
|
||||
public class IrisHydrology {
|
||||
@Desc("Terrain-guided surface and underground river configuration.")
|
||||
private IrisRiverHydrology rivers = new IrisRiverHydrology();
|
||||
|
||||
@ArrayType(type = IrisDeepFluidConfig.class)
|
||||
@Desc("Independent deep-fluid systems that do not consume the surface or underground river source budgets.")
|
||||
private KList<IrisDeepFluidConfig> deepFluids = new KList<>();
|
||||
|
||||
@ArrayType(type = IrisSurfacePoolConfig.class, min = 0)
|
||||
@Desc("Standing surface pools such as lava pools. Each region or biome opts in through riverPolicy.surfacePools.")
|
||||
private KList<IrisSurfacePoolConfig> surfacePools = new KList<>();
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("How alpha participates in decoded data")
|
||||
public enum IrisImageMapAlpha {
|
||||
IGNORE,
|
||||
MASK,
|
||||
TRANSPARENT_IS_FALLBACK,
|
||||
ERROR
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("The generation input controlled by an image map")
|
||||
public enum IrisImageMapApplication {
|
||||
TERRAIN_HEIGHT,
|
||||
BIOME,
|
||||
REGION,
|
||||
SURFACE_BLOCK,
|
||||
MASK,
|
||||
CUSTOM
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.ArrayType;
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.RegistryListResource;
|
||||
import art.arcane.volmlib.util.collection.KList;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Binds a reusable image map to one dimension generation role")
|
||||
@Data
|
||||
public class IrisImageMapBinding {
|
||||
@Desc("Unique name used by Studio previews and custom map lookups")
|
||||
private String key = "";
|
||||
|
||||
@RegistryListResource(IrisImageMap.class)
|
||||
@Desc("Image-map resource key under image-maps/")
|
||||
private String map = "";
|
||||
|
||||
@Desc("Generation input controlled by this binding")
|
||||
private IrisImageMapApplication application = IrisImageMapApplication.CUSTOM;
|
||||
|
||||
@ArrayType(type = IrisImageMapMask.class)
|
||||
@Desc("Named mask maps composed in declaration order")
|
||||
private KList<IrisImageMapMask> masks = new KList<>();
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("A composable reference to a named MASK image map")
|
||||
@Data
|
||||
public class IrisImageMapMask {
|
||||
@Desc("The key of a named imageMaps entry whose application is MASK")
|
||||
private String map = "";
|
||||
|
||||
@Desc("How this mask combines with masks before it")
|
||||
private IrisImageMapMaskOperation operation = IrisImageMapMaskOperation.MULTIPLY;
|
||||
|
||||
@Desc("Invert this mask before combining it")
|
||||
private boolean inverted = false;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Values below this threshold become zero")
|
||||
private double threshold = 0D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Soft transition width above threshold; zero is a hard edge")
|
||||
private double falloff = 0D;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("How a referenced mask combines with masks before it")
|
||||
public enum IrisImageMapMaskOperation {
|
||||
MULTIPLY,
|
||||
MINIMUM,
|
||||
MAXIMUM,
|
||||
ADD,
|
||||
SUBTRACT
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("A two-dimensional image-map coordinate")
|
||||
@Data
|
||||
public class IrisImageMapOrigin {
|
||||
@Desc("X coordinate in world blocks for origin, or source pixels for sourceOrigin")
|
||||
private double x = 0D;
|
||||
|
||||
@Desc("Z coordinate in world blocks for origin, or source image Y pixels for sourceOrigin")
|
||||
private double z = 0D;
|
||||
|
||||
public IrisImageMapOrigin(double x, double z) {
|
||||
this.x = x;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("How coordinates outside an image are resolved")
|
||||
public enum IrisImageMapOutOfBounds {
|
||||
FALLBACK,
|
||||
CLAMP,
|
||||
REPEAT,
|
||||
MIRROR,
|
||||
ERROR
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Clockwise image-map rotation around sourceOrigin")
|
||||
public enum IrisImageMapRotation {
|
||||
DEG_0,
|
||||
DEG_90,
|
||||
DEG_180,
|
||||
DEG_270
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("The filter used between source pixels")
|
||||
public enum IrisImageMapSampling {
|
||||
NEAREST,
|
||||
BILINEAR,
|
||||
BICUBIC
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("How Iris decodes each source pixel")
|
||||
public enum IrisImageMapType {
|
||||
GRAYSCALE_HEIGHT,
|
||||
RGB_HEIGHT,
|
||||
COLOR_MAP,
|
||||
BINARY_MASK,
|
||||
GRAYSCALE_MASK,
|
||||
ALPHA_MASK
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("How a color absent from a color-map legend is handled")
|
||||
public enum IrisImageMapUnknownColor {
|
||||
ERROR,
|
||||
FALLBACK,
|
||||
IGNORE
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Controls contained inland grotto outlets.")
|
||||
@Data
|
||||
public class IrisInlandRiverGrottoConfig {
|
||||
@Desc("Allow a contained inland grotto to serve as an explicit accepted outlet.")
|
||||
private boolean enabled = true;
|
||||
|
||||
@Desc("Continue eligible surface rivers through a falling sinkhole into the contained inland grotto.")
|
||||
private boolean connectSurfaceRivers = false;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(128)
|
||||
@Desc("Maximum horizontal radius in blocks of an accepted inland grotto.")
|
||||
private int horizontalRadius = 10;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Desc("Maximum vertical radius in blocks of an accepted inland grotto.")
|
||||
private int verticalRadius = 6;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(63)
|
||||
@Desc("Required dry clearance above an inland grotto pool.")
|
||||
private int headroom = 10;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(1048576)
|
||||
@Desc("Maximum accepted inland grotto volume in blocks.")
|
||||
private int maximumVolume = 8192;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Controls how an Iris jigsaw assembly handles an optional connector branch that exhausts its primary pool and direct fallback without attaching a piece.")
|
||||
public enum IrisJigsawBranchFailurePolicy {
|
||||
@Desc("Fails the complete assembly when an optional connector branch cannot attach before the maximum depth.")
|
||||
FAIL_ASSEMBLY,
|
||||
|
||||
@Desc("Ends only the unresolved optional connector branch, matching vanilla jigsaw placement behavior.")
|
||||
TERMINATE_BRANCH
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Declares the resource compatibility target of an Iris jigsaw structure.")
|
||||
public enum IrisJigsawCompatibility {
|
||||
@Desc("Allows Iris-specific connector metadata and placement behavior.")
|
||||
IRIS_EXTENDED,
|
||||
|
||||
@Desc("Restricts the graph to metadata that can be represented by vanilla jigsaw resources.")
|
||||
VANILLA_PORTABLE
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Controls whether a configured native jigsaw projects its start onto a Minecraft heightmap.")
|
||||
public enum IrisJigsawHeightmap {
|
||||
@Desc("Keeps the registered structure's own heightmap projection exactly as the vanilla, datapack, or mod definition declares it.")
|
||||
SOURCE,
|
||||
|
||||
@Desc("Removes heightmap projection entirely, so the start piece lands at the structure's literal start height instead of following terrain.")
|
||||
NONE,
|
||||
|
||||
@Desc("Drops the start piece onto the terrain top counting water as solid, so ocean starts sit on the water surface.")
|
||||
WORLD_SURFACE_WG,
|
||||
|
||||
@Desc("Identical to WORLD_SURFACE_WG in Iris worlds: the start piece rides the terrain top including water.")
|
||||
WORLD_SURFACE,
|
||||
|
||||
@Desc("Drops the start piece onto solid terrain, ignoring water, so ocean starts sit on the seabed.")
|
||||
OCEAN_FLOOR_WG,
|
||||
|
||||
@Desc("Identical to OCEAN_FLOOR_WG in Iris worlds: the start piece sits on solid ground beneath any water.")
|
||||
OCEAN_FLOOR,
|
||||
|
||||
@Desc("Behaves like WORLD_SURFACE in Iris worlds; the start piece sits on the terrain top including water.")
|
||||
MOTION_BLOCKING,
|
||||
|
||||
@Desc("Behaves like WORLD_SURFACE in Iris worlds; Iris height queries have no leaf layer to skip.")
|
||||
MOTION_BLOCKING_NO_LEAVES
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Controls waterlogging behavior for a configured native jigsaw.")
|
||||
public enum IrisJigsawLiquidSettings {
|
||||
@Desc("Keeps the registered structure's own liquid setting; vanilla defaults to applying waterlogging when the definition omits it.")
|
||||
SOURCE,
|
||||
|
||||
@Desc("Places pieces dry: existing water is displaced and waterloggable blocks stay unwaterlogged, leaving air-filled interiors underwater.")
|
||||
IGNORE_WATERLOGGING,
|
||||
|
||||
@Desc("Re-applies pre-existing water into placed waterloggable blocks and floods from neighboring sources, so underwater pieces come out waterlogged.")
|
||||
APPLY_WATERLOGGING
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Controls the topology used by an Iris jigsaw structure.")
|
||||
public enum IrisJigsawMode {
|
||||
@Desc("A cell-aligned planar jigsaw intended for villages, paths, and other two-dimensional layouts.")
|
||||
PLANAR_JIGSAW,
|
||||
|
||||
@Desc("A freeform spatial connector graph intended for multi-level and three-dimensional structures.")
|
||||
SPATIAL_JIGSAW
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.Required;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Desc("A weighted structure-wide jigsaw theme. One declared theme is selected for an assembly, and pieces may opt into one or more themes.")
|
||||
@Data
|
||||
public class IrisJigsawThemeSet {
|
||||
@Required
|
||||
@Desc("The exact theme key referenced by jigsaw pieces.")
|
||||
private String key = "";
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("The relative weight used when selecting one theme for an assembly.")
|
||||
private int weight = 1;
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@Desc("Persistent authoring bounds and runtime availability for one planar jigsaw workcell.")
|
||||
public class IrisJigsawWorkcell {
|
||||
@Desc("Optional author-facing name shown by Jigsaw Studio. The canonical archetype name is shown when this is blank.")
|
||||
private String displayName = "";
|
||||
|
||||
@Desc("The orientation-independent planar connector shape configured by this workcell.")
|
||||
private IrisJigsawWorkcellArchetype archetype = IrisJigsawWorkcellArchetype.BLANK;
|
||||
|
||||
@MinNumber(3)
|
||||
@MaxNumber(128)
|
||||
@Desc("The maximum canonical variant width that this workcell can contain, in blocks.")
|
||||
private int width = 16;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(192)
|
||||
@Desc("The maximum variant height that this workcell can contain, in blocks.")
|
||||
private int height = 16;
|
||||
|
||||
@MinNumber(3)
|
||||
@MaxNumber(128)
|
||||
@Desc("The maximum canonical variant depth that this workcell can contain, in blocks.")
|
||||
private int depth = 16;
|
||||
|
||||
@Desc("Whether pieces with this planar connector shape participate in assembly and vanilla export.")
|
||||
private boolean enabled = true;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import art.arcane.iris.engine.object.annotations.RegistryListVanillaStructure;
|
||||
import art.arcane.iris.engine.object.annotations.Required;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@Desc("A live vanilla, datapack, or modded structure generated by Minecraft at an Iris-controlled placement.")
|
||||
public class IrisNativeStructure {
|
||||
@Required
|
||||
@RegistryListVanillaStructure
|
||||
@Desc("Registered structure key. The source retains its native generator, pieces, templates, processors, entities, markers, and data.")
|
||||
private String structure = "";
|
||||
|
||||
@MinNumber(1)
|
||||
@Desc("Relative selection weight when a placement offers multiple native structure sources.")
|
||||
private int weight = 1;
|
||||
|
||||
@Desc("Optional jigsaw-only assembly overrides. Null preserves the complete registered structure definition.")
|
||||
private IrisJigsawConfiguration jigsaw = null;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("The cross-section of the wet channel bed from the centerline out to the waterline.")
|
||||
public enum IrisRiverBedProfile {
|
||||
@Desc("A level thalweg over thalwegFraction of the half-width that eases up to a one-block edge; a broad bowl.")
|
||||
BOWL,
|
||||
@Desc("Full depth across the whole width, so the channel edge drops straight to the bed.")
|
||||
FLAT,
|
||||
@Desc("A straight slope from full depth at the centerline to one block at the edge; thalwegFraction is ignored.")
|
||||
V,
|
||||
@Desc("A level thalweg over thalwegFraction of the half-width that stays deep almost to the edge, then rises steeply; a trough with steep sides.")
|
||||
U
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("The shape of the eroded valley side between the shore band and natural terrain.")
|
||||
public enum IrisRiverBlendStyle {
|
||||
@Desc("An eased S-curve from the bank top out to natural terrain, flat at both ends and steepest across the middle of the band; blendCurve skews it.")
|
||||
SMOOTH,
|
||||
@Desc("A straight slope from the bank top to natural terrain with a sharp shoulder at the shore and a sharp lip at the top; blendCurve bends it.")
|
||||
LINEAR,
|
||||
@Desc("A hollowed valley side that climbs fast beside the shore and flattens out toward natural terrain; blendCurve deepens the hollow.")
|
||||
CONCAVE,
|
||||
@Desc("The eased curve cut into level steps, terraceSteps of them between the bank top and natural terrain.")
|
||||
TERRACED,
|
||||
@Desc("A level bench at the bank top for cliffFraction of the band, then a vertical wall up to natural terrain.")
|
||||
CLIFF
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Controls rounded beds and rough, coherent channel walls.")
|
||||
@Data
|
||||
public class IrisRiverChannelShapeConfig {
|
||||
@MinNumber(1)
|
||||
@MaxNumber(6)
|
||||
@Desc("Cross-section exponent. Larger values broaden the rounded U-shaped bed.")
|
||||
private double bedRoundness = 2.4D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Coherent vertical variation applied to the bed as a fraction of channel depth.")
|
||||
private double bedRoughness = 0.28D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Coherent radial variation applied to carved walls and banks.")
|
||||
private double wallRoughness = 0.24D;
|
||||
|
||||
@MinNumber(3)
|
||||
@MaxNumber(128)
|
||||
@Desc("Wavelength in blocks of bed and wall roughness.")
|
||||
private int roughnessWavelength = 11;
|
||||
|
||||
@MinNumber(0.4)
|
||||
@MaxNumber(1.2)
|
||||
@Desc("Base radial scale of the organic passage outline before the lobes are added; 1 keeps the nominal radius, lower values carve a narrower passage.")
|
||||
private double radialBase = 0.86D;
|
||||
|
||||
@MinNumber(0.2)
|
||||
@MaxNumber(1)
|
||||
@Desc("Smallest radial scale the organic outline may shrink to after the lobes are applied, as a fraction of the nominal radius.")
|
||||
private double radialMinimum = 0.58D;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(2)
|
||||
@Desc("Largest radial scale the organic outline may grow to after the lobes are applied, as a fraction of the nominal radius.")
|
||||
private double radialMaximum = 1.18D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(0.5)
|
||||
@Desc("Strength of the broad lobes that bulge and pinch the passage outline along its length; 0 leaves the outline circular.")
|
||||
private double primaryLobeStrength = 0.08D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(0.5)
|
||||
@Desc("Strength of the fine lobes layered over the broad ones for small-scale wall detail; 0 leaves only the broad lobes.")
|
||||
private double detailLobeStrength = 0.06D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Coherent variation of the carved ceiling height as a fraction of the headroom; 0 keeps the ceiling smooth and evaluates no extra noise.")
|
||||
private double ceilingRoughness = 0D;
|
||||
|
||||
@MinNumber(0.2)
|
||||
@MaxNumber(1)
|
||||
@Desc("Narrowest plan aspect of a chamber, the short axis as a fraction of the long axis; 1 makes every chamber circular in plan. Applies to grottos only.")
|
||||
private double aspectMinimum = 0.62D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(0.8)
|
||||
@Desc("How much the plan aspect may vary above aspectMinimum from one chamber to the next; 0 gives every chamber the same aspect. Applies to grottos only.")
|
||||
private double aspectRange = 0.2D;
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Controls low-volume cascades, falling faces, and organic receiving basins.")
|
||||
@Data
|
||||
public class IrisRiverDropShapeConfig {
|
||||
@MinNumber(1)
|
||||
@MaxNumber(16)
|
||||
@Desc("Preferred horizontal cascade run per block of head loss.")
|
||||
private int cascadeRunPerBlock = 2;
|
||||
|
||||
@MinNumber(0.25)
|
||||
@MaxNumber(6)
|
||||
@Desc("Exponent of the graded cascade profile. Values above one accelerate toward the receiver.")
|
||||
private double cascadeExponent = 1.4D;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(4)
|
||||
@Desc("Maximum head loss between adjacent underground drop faces. Exposed cascades always use one-block steps.")
|
||||
private int maximumCascadeStep = 2;
|
||||
|
||||
@MinNumber(0.25)
|
||||
@MaxNumber(1)
|
||||
@Desc("Drop-flow width as a fraction of the connected channel width.")
|
||||
private double flowWidthRatio = 0.45D;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(16)
|
||||
@Desc("Maximum wetted depth along a descending flow path.")
|
||||
private int maximumFlowDepth = 2;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(4)
|
||||
@Desc("Receiving-basin width as a fraction of the descending flow width.")
|
||||
private double basinWidthRatio = 1.8D;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(32)
|
||||
@Desc("Maximum receiving-basin depth after drop-scaled erosion.")
|
||||
private int maximumBasinDepth = 8;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(16)
|
||||
@Desc("Horizontal run in blocks an underground drop spreads over per block of head loss, so tall drops become long cascades; 0 keeps every underground drop at its shortest run.")
|
||||
private int undergroundCascadeRunPerBlock = 0;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@Desc("Bounds terrain removal outside the wet river channel.")
|
||||
public class IrisRiverExcavationConfig {
|
||||
@MinNumber(0)
|
||||
@MaxNumber(64)
|
||||
@Desc("Maximum blocks removed vertically from a dry bank column. Zero preserves dry bank heights.")
|
||||
private int maximumDepth = 8;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Desc("Maximum horizontal distance from the channel outline affected by shore and bank excavation.")
|
||||
private int maximumWidth = 16;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(8192)
|
||||
@Desc("Maximum dry bank blocks removed per block, measured over sixteen-block reaches. Courses exceeding this budget are rejected.")
|
||||
private int maximumVolumePerBlock = 256;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Controls organic river routing and contained cave geometry.")
|
||||
@Data
|
||||
public class IrisRiverGeometryConfig {
|
||||
@Desc("Surface and underground centerline meanders.")
|
||||
private IrisRiverMeanderConfig meanders = new IrisRiverMeanderConfig();
|
||||
|
||||
@Desc("Surface river bed shape for waterfall and cascade throats, and the wall shape shared with the erosion compiler; roughness fields default to the channel roughness.")
|
||||
private IrisSurfaceRiverShapeConfig surface = new IrisSurfaceRiverShapeConfig();
|
||||
|
||||
@Desc("Three-dimensional bank shelves above the protected riverbed and waterline.")
|
||||
private IrisRiverBank3DConfig banks3D = new IrisRiverBank3DConfig();
|
||||
|
||||
@Desc("Underground channel bed and wall shape.")
|
||||
private IrisRiverChannelShapeConfig underground = new IrisRiverChannelShapeConfig();
|
||||
|
||||
@Desc("Grotto pool bed and wall shape.")
|
||||
private IrisRiverChannelShapeConfig grottos = new IrisRiverChannelShapeConfig();
|
||||
|
||||
@Desc("Underground drop, sinkhole and receiving basin shape.")
|
||||
private IrisRiverDropShapeConfig drops = new IrisRiverDropShapeConfig();
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("An optional block palette painted over the top layers of one part of a river instead of the biome's own layers.")
|
||||
@Data
|
||||
public class IrisRiverMaterialConfig {
|
||||
@Desc("Paint this palette. When false the biome layers are used as before.")
|
||||
private boolean enabled = false;
|
||||
|
||||
@Desc("Blocks to paint. Any solid palette.")
|
||||
private IrisMaterialPalette palette = new IrisMaterialPalette();
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(8)
|
||||
@Desc("How many layers down from the surface the palette replaces, in blocks.")
|
||||
private int depth = 1;
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Controls multi-scale terrain-guided river meanders.")
|
||||
@Data
|
||||
public class IrisRiverMeanderConfig {
|
||||
@MinNumber(8)
|
||||
@MaxNumber(512)
|
||||
@Desc("Broad meander wavelength in blocks.")
|
||||
private int primaryWavelength = 64;
|
||||
|
||||
@MinNumber(4)
|
||||
@MaxNumber(128)
|
||||
@Desc("Fine worm wavelength in blocks. Smaller values change direction more frequently.")
|
||||
private int detailWavelength = 12;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(2)
|
||||
@Desc("Strength of broad meanders.")
|
||||
private double primaryStrength = 0.34D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(2)
|
||||
@Desc("Strength of fine worm movement.")
|
||||
private double detailStrength = 0.42D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("Maximum lateral route displacement as a fraction of one drainage edge.")
|
||||
private double maximumOffsetRatio = 0.48D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(4)
|
||||
@Desc("Terrain-safe centerline smoothing passes after route solving.")
|
||||
private int smoothingPasses = 1;
|
||||
|
||||
@MinNumber(10)
|
||||
@MaxNumber(150)
|
||||
@Desc("Maximum retained centerline turn angle in degrees.")
|
||||
private double maximumTurnDegrees = 82D;
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package art.arcane.iris.engine.object;
|
||||
|
||||
import art.arcane.iris.engine.object.annotations.Desc;
|
||||
import art.arcane.iris.engine.object.annotations.MaxNumber;
|
||||
import art.arcane.iris.engine.object.annotations.MinNumber;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Controls how a surface river meets the sea.")
|
||||
@Data
|
||||
public class IrisRiverMouthConfig {
|
||||
@MinNumber(1)
|
||||
@MaxNumber(4)
|
||||
@Desc("Width multiplier reached at the coastline over the final stretch of the river.")
|
||||
private double flareRatio = 1.6D;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(32)
|
||||
@Desc("Maximum number of blocks the recorded mouth footprint may enter the ocean before terminating.")
|
||||
private int maximumOceanApron = 8;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(256)
|
||||
@Desc("Blocks of river before the coast held at sea level as a drowned inlet, widened toward flareRatio over that reach. Zero ends the river at the shoreline with no inlet.")
|
||||
private int inletLength = 64;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(16)
|
||||
@Desc("Extra bed depth reached at the shoreline over the inlet, so the estuary is deeper than the river above it.")
|
||||
private int inletDepth = 3;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(128)
|
||||
@Desc("Deepest cut allowed in the inlet and its approach ramp, replacing channel.maximumIncision there, so the coast may be cut down to sea level through a rise of this height.")
|
||||
private int maximumIncision = 32;
|
||||
|
||||
@MinNumber(0.05)
|
||||
@MaxNumber(1)
|
||||
@Desc("Largest share of the river's exposed course the drowned inlet may occupy, so a short river keeps most of its length above sea level; the inlet is the shorter of inletLength and this share.")
|
||||
private double inletCourseFraction = 0.5D;
|
||||
|
||||
@MinNumber(0.1)
|
||||
@MaxNumber(4)
|
||||
@Desc("Blocks of head gained per station on the approach ramp climbing from the inlet back to the river's natural profile; 1 climbs one block per station, higher values grade the approach faster.")
|
||||
private double inletRampSlope = 1D;
|
||||
}
|
||||
Loaded 100 of 2666 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user