Skip to content

Commit 0c89128

Browse files
authored
fix biome parser (#380)
1 parent 1033194 commit 0c89128

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/com/cleanroommc/groovyscript/compat/vanilla/command/infoparser/InfoParserBiome.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ public String text(@NotNull Biome entry, boolean colored, boolean prettyNbt) {
2626

2727
@Override
2828
public void parse(InfoParserPackage info) {
29-
if (info.getPos() == null || info.getEntity() == null) return;
30-
instance.add(info.getMessages(), info.getEntity().getEntityWorld().getBiome(info.getPos()), info.isPrettyNbt());
29+
var position = info.getEntity() == null ? info.getPos() : info.getEntity().getPosition();
30+
if (position == null) return;
31+
instance.add(info.getMessages(), info.getPlayer().getEntityWorld().getBiome(position), info.isPrettyNbt());
3132
}
3233
}

0 commit comments

Comments
 (0)