mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-01-04 15:41:30 +00:00
example
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user