9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2026-01-04 15:41:30 +00:00
This commit is contained in:
Julian Krings
2024-08-19 20:43:30 +02:00
parent 8a753b42f8
commit 19c6f4f2ba
3 changed files with 21 additions and 6 deletions

View File

@@ -197,12 +197,11 @@ public class IrisBiome extends IrisRegistrant implements IRare {
public KList<IrisBiomeCustom> getCustomDerivitives() {
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());
}
var key = getLoadKey();
if (key == null) key = getVanillaDerivative().getKey().getKey();
String biomeID = key.replaceAll("\\s", "").replaceAll("[^a-z0-9/._-]", "");
setCustomDerivitives(new KList<>(new IrisBiomeReplacement().setId(biomeID)));
}
return customDerivitives;
}

View File

@@ -0,0 +1,13 @@
package com.volmit.iris.engine.object;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.bukkit.block.Biome;
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class IrisBiomeReplacement extends IrisBiomeCustom {
private Biome biome;
}