mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fix 1.18.2 Biomes
This commit is contained in:
parent
15bc964fcc
commit
aa4e574eef
@ -54,6 +54,7 @@ public interface INMSBinding {
|
|||||||
String getTrueBiomeBaseKey(Location location);
|
String getTrueBiomeBaseKey(Location location);
|
||||||
|
|
||||||
Object getCustomBiomeBaseFor(String mckey);
|
Object getCustomBiomeBaseFor(String mckey);
|
||||||
|
Object getCustomBiomeBaseHolderFor(String mckey);
|
||||||
|
|
||||||
String getKeyForBiomeBase(Object biomeBase);
|
String getKeyForBiomeBase(Object biomeBase);
|
||||||
|
|
||||||
|
@ -208,6 +208,10 @@ public class NMSBinding18_2 implements INMSBinding {
|
|||||||
public Object getCustomBiomeBaseFor(String mckey) {
|
public Object getCustomBiomeBaseFor(String mckey) {
|
||||||
return getCustomBiomeRegistry().get(new ResourceLocation(mckey));
|
return getCustomBiomeRegistry().get(new ResourceLocation(mckey));
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public Object getCustomBiomeBaseHolderFor(String mckey) {
|
||||||
|
return getCustomBiomeRegistry().getHolder(getTrueBiomeBaseId(getCustomBiomeRegistry().get(new ResourceLocation(mckey)))).get();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getKeyForBiomeBase(Object biomeBase) {
|
public String getKeyForBiomeBase(Object biomeBase) {
|
||||||
|
@ -112,6 +112,11 @@ public class NMSBinding1X implements INMSBinding {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getCustomBiomeBaseHolderFor(String mckey) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getKeyForBiomeBase(Object biomeBase) {
|
public String getKeyForBiomeBase(Object biomeBase) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -57,7 +57,7 @@ public class IrisBiomeActuator extends EngineAssignedActuator<Biome> {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch(Throwable e) {
|
} catch(Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -79,7 +79,7 @@ public class IrisBiomeActuator extends EngineAssignedActuator<Biome> {
|
|||||||
if(ib.isCustom()) {
|
if(ib.isCustom()) {
|
||||||
try {
|
try {
|
||||||
IrisBiomeCustom custom = ib.getCustomBiome(rng, x, 0, z);
|
IrisBiomeCustom custom = ib.getCustomBiome(rng, x, 0, z);
|
||||||
Object biomeBase = INMS.get().getCustomBiomeBaseFor(getDimension().getLoadKey() + ":" + custom.getId());
|
Object biomeBase = INMS.get().getCustomBiomeBaseHolderFor(getDimension().getLoadKey() + ":" + custom.getId());
|
||||||
//
|
//
|
||||||
if(biomeBase == null || !injectBiome(h, x, 0, z, biomeBase)) {
|
if(biomeBase == null || !injectBiome(h, x, 0, z, biomeBase)) {
|
||||||
throw new RuntimeException("Cant inject biome!");
|
throw new RuntimeException("Cant inject biome!");
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package com.volmit.iris.engine.data.chunk;
|
package com.volmit.iris.engine.data.chunk;
|
||||||
|
|
||||||
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.nms.BiomeBaseInjector;
|
import com.volmit.iris.core.nms.BiomeBaseInjector;
|
||||||
import com.volmit.iris.core.nms.INMS;
|
import com.volmit.iris.core.nms.INMS;
|
||||||
import com.volmit.iris.util.data.IrisBiomeStorage;
|
import com.volmit.iris.util.data.IrisBiomeStorage;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user