Skip to content

Commit

Permalink
fix: Don't render lootrun path chests on air or barriers [skip ci] (#…
Browse files Browse the repository at this point in the history
…2400)

feat: Don't render lootrun path chests on air or barriers
  • Loading branch information
JamieCallan117 committed Apr 10, 2024
1 parent 8fa3e3a commit 404ea39
Showing 1 changed file with 7 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright © Wynntils 2023.
* Copyright © Wynntils 2023-2024.
* This file is released under LGPLv3. See LICENSE for full license details.
*/
package com.wynntils.services.lootrunpaths;
Expand Down Expand Up @@ -34,6 +34,8 @@
import net.minecraft.util.FormattedCharSequence;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
import org.joml.Matrix4f;
import org.joml.Quaternionf;
Expand Down Expand Up @@ -138,6 +140,10 @@ private static void renderChests(PoseStack poseStack, LootrunPathInstance lootru
float blue = ((float) FastColor.ARGB32.blue(color)) / 255;

for (BlockPos chest : chests) {
// Wynncraft requested that chest highlights are not rendered on these blocks
BlockState block = McUtils.mc().level.getBlockState(chest);
if (block.is(Blocks.BARRIER) || block.is(Blocks.AIR)) continue;

LevelRenderer.renderLineBox(poseStack, consumer, new AABB(chest), red, green, blue, 1f);
}

Expand Down

0 comments on commit 404ea39

Please sign in to comment.