mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-01 23:47:21 +00:00
fix iris what commands
This commit is contained in:
parent
42a26a1de2
commit
b440d0257d
@ -74,22 +74,22 @@ public class CommandWhat implements DecreeExecutor {
|
|||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
Iris.reportError(e);
|
Iris.reportError(e);
|
||||||
sender().sendMessage("Non-Iris Biome: " + player().getLocation().getBlock().getBiome().name());
|
sender().sendMessage("Non-Iris Biome: " + player().getLocation().getBlock().getBiome().name());
|
||||||
|
var loc = player().getLocation();
|
||||||
if (player().getLocation().getBlock().getBiome().equals(Biome.CUSTOM)) {
|
var sender = sender();
|
||||||
try {
|
Iris.platform.getRegionScheduler().run(loc, () -> {
|
||||||
sender().sendMessage("Data Pack Biome: " + INMS.get().getTrueBiomeBaseKey(player().getLocation()) + " (ID: " + INMS.get().getTrueBiomeBaseId(INMS.get().getTrueBiomeBase(player().getLocation())) + ")");
|
var biome = loc.getBlock().getBiome();
|
||||||
} catch (Throwable ee) {
|
if (biome != Biome.CUSTOM && biome.getKey().getNamespace().equals("minecraft"))
|
||||||
Iris.reportError(ee);
|
return;
|
||||||
}
|
sender.sendMessage("Data Pack Biome: " + INMS.get().getTrueBiomeBaseKey(loc) + " (ID: " + INMS.get().getTrueBiomeBaseId(INMS.get().getTrueBiomeBase(loc)) + ")");
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Decree(description = "What region am i in?", origin = DecreeOrigin.PLAYER)
|
@Decree(description = "What region am i in?", origin = DecreeOrigin.PLAYER)
|
||||||
public void region() {
|
public void region() {
|
||||||
try {
|
try {
|
||||||
Chunk chunk = world().getChunkAt(player().getLocation().getBlockZ() / 16, player().getLocation().getBlockZ() / 16);
|
var loc = player().getLocation();
|
||||||
IrisRegion r = engine().getRegion(chunk);
|
IrisRegion r = engine().getRegion(loc);
|
||||||
sender().sendMessage("IRegion: " + r.getLoadKey() + " (" + r.getName() + ")");
|
sender().sendMessage("IRegion: " + r.getLoadKey() + " (" + r.getName() + ")");
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user