Skip to content

Commit

Permalink
hide render distance and world border highlights while viewing other …
Browse files Browse the repository at this point in the history
…dimensions
  • Loading branch information
rfresh2 committed Jan 22, 2025
1 parent 188ebbd commit 86691ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import xaeroplus.Globals;
import xaeroplus.feature.render.Line;
import xaeroplus.module.Module;
import xaeroplus.util.ChunkUtils;
import xaeroplus.util.ColorHelper;

import java.util.Collections;
Expand Down Expand Up @@ -38,6 +39,7 @@ List<Line> getLines(final int windowRegionX, final int windowRegionZ, final int
Minecraft mc = Minecraft.getInstance();
var player = mc.player;
if (player == null) return Collections.emptyList();
if (dimension != ChunkUtils.getActualDimension()) return Collections.emptyList();
final int viewDistance = mc.options.serverRenderDistance;
final int width = viewDistance * 2 + 1;
final int middleChunkX = coordToChunkCoord(Mth.floor(player.getX()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ List<Line> getLines(final int windowRegionX, final int windowRegionZ, final int
Minecraft mc = Minecraft.getInstance();
var level = mc.level;
if (level == null) return Collections.emptyList();
if (level.dimension() != dimension) return Collections.emptyList();
var worldBorder = mc.level.getWorldBorder();
int minX = Mth.floor(worldBorder.getMinX());
int minZ = Mth.floor(worldBorder.getMinZ());
Expand Down

0 comments on commit 86691ae

Please sign in to comment.