Skip to content

Commit b989ba1

Browse files
committed
fixed bridges
1 parent ec24032 commit b989ba1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/main/java/com/solegendary/reignofnether/cursor/CursorClientEvents.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,12 @@ private static BlockHitResult clip(ClientLevel level, ClipContext pContext) {
474474
BlockHitResult result = d0 <= d1 ? blockhitresult : blockhitresult1;
475475

476476
if (result != null) {
477-
Block block = level.getBlockState(result.getBlockPos()).getBlock();
477+
BlockState bs = level.getBlockState(result.getBlockPos());
478478
if (OrthoviewClientEvents.shouldHideLeaves() && level.getBlockState(result.getBlockPos()).getBlock() instanceof LeavesBlock)
479479
result = null;
480-
else if (!MiscUtil.isSolidBlocking(level, result.getBlockPos()))
480+
else if (!MiscUtil.isSolidBlocking(level, result.getBlockPos()) && bs.getFluidState().isEmpty())
481481
result = null;
482-
else if (block instanceof SnowLayerBlock)
482+
else if (bs.getBlock() instanceof SnowLayerBlock)
483483
result = null;
484484
}
485485
return result;

src/main/java/com/solegendary/reignofnether/resources/ResourcesClientEvents.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.mojang.blaze3d.vertex.PoseStack;
44
import com.mojang.math.Axis;
5+
import net.minecraft.network.chat.Style;
56
import org.joml.Vector3f;
67
import com.solegendary.reignofnether.hud.HudClientEvents;
78
import com.solegendary.reignofnether.keybinds.Keybindings;
@@ -163,6 +164,7 @@ public static void onRenderLevel(RenderLevelStageEvent evt) {
163164
poseStack.scale(-0.05F, -0.05F, 0.05F);
164165
}
165166
Font font = MC.font;
167+
166168
float f2 = (float) (-font.width(component) / 2);
167169
float f1 = Minecraft.getInstance().options.getBackgroundOpacity(0.25F);
168170
float alphaPercent =
@@ -176,7 +178,7 @@ public static void onRenderLevel(RenderLevelStageEvent evt) {
176178
int textCol = 0x00FFFFFF + ((int) (0xFF * alphaPercent) << 24);
177179
int bgCol = (int) (f1 * 255.0F * alphaPercent) << 24;
178180

179-
font.drawInBatch(component.getString(),
181+
font.drawInBatch(component,
180182
f2,
181183
0,
182184
textCol,
@@ -185,7 +187,7 @@ public static void onRenderLevel(RenderLevelStageEvent evt) {
185187
MC.renderBuffers().bufferSource(),
186188
Font.DisplayMode.NORMAL,
187189
bgCol,
188-
255, false
190+
255
189191
);
190192

191193
poseStack.popPose();

0 commit comments

Comments
 (0)