mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fix eb & biome context
This commit is contained in:
parent
f93c158caa
commit
67711bcb0d
@ -267,9 +267,17 @@ public class CommandStudio implements DecreeExecutor {
|
||||
@Param(contextual = true, description = "The biome to edit")
|
||||
IrisBiome biome
|
||||
) {
|
||||
if (noStudio()) return;
|
||||
if (noStudio()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if(biome.getLoadFile() == null)
|
||||
{
|
||||
sender().sendMessage(C.GOLD + "Cannot find the file for the biome you are in! Perhaps it was not loaded directly from a file?");
|
||||
return;
|
||||
}
|
||||
|
||||
Desktop.getDesktop().open(biome.getLoadFile());
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
@ -678,6 +678,14 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
||||
return getSurfaceBiome(x, z);
|
||||
}
|
||||
|
||||
default IrisBiome getBiomeOrMantle(int x, int y, int z) {
|
||||
if (y <= getHeight(x, z) - 2) {
|
||||
return getCaveOrMantleBiome(x, y, z);
|
||||
}
|
||||
|
||||
return getSurfaceBiome(x, z);
|
||||
}
|
||||
|
||||
default String getObjectPlacementKey(int x, int y, int z) {
|
||||
PlacedObject o = getObjectPlacement(x, y, z);
|
||||
|
||||
@ -718,4 +726,9 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
||||
}
|
||||
|
||||
int getCacheID();
|
||||
|
||||
default IrisBiome getBiomeOrMantle(Location l)
|
||||
{
|
||||
return getBiomeOrMantle(l.getBlockX(), l.getBlockY(), l.getBlockZ());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user