9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-28 11:39:07 +00:00
This commit is contained in:
repixelatedmc
2024-08-19 20:33:26 +02:00
parent 3f66634e5f
commit 8a753b42f8
3 changed files with 35 additions and 2 deletions

View File

@@ -127,6 +127,10 @@ public interface INMSBinding {
boolean registerBiome(String dimensionId, IrisBiomeCustom biome, boolean replace);
default boolean registerReplacement(String dimensionId, String key, Biome biome) {
throw new IllegalStateException("Unsupported registerReplacement");
}
boolean dumpRegistry(File... folders);
void injectBukkit();

View File

@@ -22,6 +22,7 @@ import com.volmit.iris.Iris;
import com.volmit.iris.core.gui.components.RenderType;
import com.volmit.iris.core.loader.IrisData;
import com.volmit.iris.core.loader.IrisRegistrant;
import com.volmit.iris.core.nms.INMS;
import com.volmit.iris.engine.IrisComplex;
import com.volmit.iris.engine.data.cache.AtomicCache;
import com.volmit.iris.engine.framework.Engine;
@@ -195,8 +196,13 @@ public class IrisBiome extends IrisRegistrant implements IRare {
}
public KList<IrisBiomeCustom> getCustomDerivitives() {
if (customDerivitives == null || customDerivitives.isEmpty())
setCustomDerivitives(new KList<>(new IrisBiomeCustom().setId(getLoadKey().replaceAll("\\s", "").replaceAll("[^a-z0-9/._-]", ""))));
if (customDerivitives == null || customDerivitives.isEmpty()) {
String biomeID = getLoadKey().replaceAll("\\s", "").replaceAll("[^a-z0-9/._-]", "");
setCustomDerivitives(new KList<>(new IrisBiomeCustom().setId(biomeID)));
String dimID = getLoader().getEngine().getDimension().getLoadKey();
String x = getLoader().getEngine().getDimension().getLoadKey() + ":" + biomeID;
INMS.get().registerReplacement(dimID, x, this.getDerivative());
}
return customDerivitives;
}