From 98c3c96881e111d6e352a5c266ae1819cbb58939 Mon Sep 17 00:00:00 2001 From: piexel Date: Wed, 28 Oct 2026 03:29:50 +0100 Subject: [PATCH] Drop DecoratorLoad and LayerLoad They sat in the exposed package only so Iris could colour the decorator and layer map modes, which are cut. --- .../iris/builtin/decorant/DecoratorLoad.java | 52 ------------------- .../iris/builtin/terrain/LayerLoad.java | 33 ------------ 2 files changed, 85 deletions(-) delete mode 100644 src/main/java/art/arcane/iris/builtin/decorant/DecoratorLoad.java delete mode 100644 src/main/java/art/arcane/iris/builtin/terrain/LayerLoad.java diff --git a/src/main/java/art/arcane/iris/builtin/decorant/DecoratorLoad.java b/src/main/java/art/arcane/iris/builtin/decorant/DecoratorLoad.java deleted file mode 100644 index a73ef0c18..000000000 --- a/src/main/java/art/arcane/iris/builtin/decorant/DecoratorLoad.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Iris is a World Generator for Minecraft Servers - * Copyright (c) 2026 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 . - */ -package art.arcane.iris.builtin.decorant; - -/** How loaded with decorating a biome is, which studio's decorator load view colours it by. */ -public final class DecoratorLoad { - private static final int COLUMNS_PER_CHUNK = 256; - - private DecoratorLoad() { - } - - /** The sum of the decorators' chances times their stack heights, at least one block each; 0 for a biome without decorators. */ - public static double of(DecorantSettings settings) { - if (settings == null) { - return 0D; - } - - double load = 0D; - for (Decorator decorator : settings.decorators()) { - load += Math.max(decorator.stackMax(), 1) * decorator.chance(); - } - return load; - } - - /** The sum of the decorators' chances over a chunk's columns, which is how strongly the view colours the biome. */ - public static double colour(DecorantSettings settings) { - if (settings == null) { - return 0D; - } - - double load = 0D; - for (Decorator decorator : settings.decorators()) { - load += decorator.chance() * Math.min(1, decorator.stackMax()) * COLUMNS_PER_CHUNK; - } - return load; - } -} diff --git a/src/main/java/art/arcane/iris/builtin/terrain/LayerLoad.java b/src/main/java/art/arcane/iris/builtin/terrain/LayerLoad.java deleted file mode 100644 index 8cf6d635a..000000000 --- a/src/main/java/art/arcane/iris/builtin/terrain/LayerLoad.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Iris is a World Generator for Minecraft Servers - * Copyright (c) 2026 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 . - */ -package art.arcane.iris.builtin.terrain; - -import java.util.List; - -/** The layers of a biome's surface, which studio's layer view counts. */ -public final class LayerLoad { - private static final LayersSettings DEFAULT_LAYERS = new LayersSettings(); - - private LayerLoad() { - } - - /** The layers of the biome's surface, top first; a biome that declares no layers has the one layer of grass the settings default to. */ - public static List layersOf(LayersSettings declared) { - return (declared == null ? DEFAULT_LAYERS : declared).layers(); - } -}