fix missing a cast showing the overlay

This commit is contained in:
yrsegal@gmail.com 2022-04-25 10:24:22 -04:00
parent 4576afff65
commit f8714bc7d1

View file

@ -20,6 +20,7 @@ import net.minecraft.util.Mth;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderLevelLastEvent;
@ -169,7 +170,8 @@ public class HexAdditionalRenderers {
}
var hitRes = mc.hitResult;
if (hitRes instanceof BlockHitResult bhr) {
if (hitRes.getType() == HitResult.Type.BLOCK) {
var bhr = (BlockHitResult) hitRes;
var pos = bhr.getBlockPos();
var bs = mc.level.getBlockState(pos);