fix missing a cast showing the overlay

This commit is contained in:
yrsegal@gmail.com 2022-04-25 10:24:22 -04:00
parent 7614e01b75
commit cdd27c68eb

View file

@ -20,6 +20,7 @@ import net.minecraft.util.Mth;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
@ -162,7 +163,8 @@ public class HexAdditionalRenderers {
} }
var hitRes = mc.hitResult; var hitRes = mc.hitResult;
if (hitRes instanceof BlockHitResult bhr) { if (hitRes.getType() == HitResult.Type.BLOCK) {
var bhr = (BlockHitResult) hitRes;
var pos = bhr.getBlockPos(); var pos = bhr.getBlockPos();
var bs = mc.level.getBlockState(pos); var bs = mc.level.getBlockState(pos);