Fix runner ClipContext ambiguity
All checks were successful
Build / build (push) Successful in 8m4s

This commit is contained in:
MrSphay
2026-05-09 19:37:12 +02:00
parent 70eae6f0f1
commit 58ecd6eef0
2 changed files with 5 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.core.BlockPos;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.block.Blocks;
@@ -71,7 +72,7 @@ public class GroundDustEffect {
new Vec3(checkX, this.center.y - 15.0, checkZ),
ClipContext.Block.COLLIDER,
ClipContext.Fluid.NONE,
null));
(Entity)null));
if (hit.getType() == HitResult.Type.BLOCK) {
Color color = getDustColorForState(this.level.getBlockState(hit.getBlockPos()));
if (color != null) {
@@ -94,7 +95,7 @@ public class GroundDustEffect {
new Vec3(x, this.center.y - 15.0, z),
ClipContext.Block.COLLIDER,
ClipContext.Fluid.NONE,
null));
(Entity)null));
if (hit.getType() != HitResult.Type.BLOCK) {
continue;
}

View File

@@ -7,6 +7,7 @@ import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
@@ -67,7 +68,7 @@ public class GroundMistEffect {
if (i % this.raycastFrequency == 0) {
Vec3 from = new Vec3(x, this.center.y + 15.0, z);
Vec3 to = new Vec3(x, this.center.y - 15.0, z);
BlockHitResult hit = this.level.clip(new ClipContext(from, to, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, null));
BlockHitResult hit = this.level.clip(new ClipContext(from, to, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, (Entity)null));
if (hit.getType() != HitResult.Type.BLOCK) {
continue;
}