fix: 客户端renderfix渲染修复,防止出现对air方块获取方向属性导致崩溃的问题
This commit is contained in:
parent
d177117eaa
commit
8317afd584
|
|
@ -35,8 +35,8 @@ public class RendererUtil {
|
||||||
public static <T extends LivingEntity> boolean warpRenderer(BlockPos seatPos, PlayerRenderer instance, @NotNull T entity, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource buffer, int packedLight, Operation<Void> original) {
|
public static <T extends LivingEntity> boolean warpRenderer(BlockPos seatPos, PlayerRenderer instance, @NotNull T entity, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource buffer, int packedLight, Operation<Void> original) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
BlockState blockState = entity.level().getBlockState(seatPos);
|
BlockState blockState = entity.level().getBlockState(seatPos);
|
||||||
Direction direction = blockState.getValue(ISeatBlock.FACING);
|
|
||||||
if (blockState.getBlock() instanceof ISeatBlock seatBlock) {
|
if (blockState.getBlock() instanceof ISeatBlock seatBlock) {
|
||||||
|
Direction direction = blockState.getValue(ISeatBlock.FACING);
|
||||||
ISeatType ISeatType = FurnitureHelper.getSeatType(blockState.getBlock());
|
ISeatType ISeatType = FurnitureHelper.getSeatType(blockState.getBlock());
|
||||||
if (ISeatType != null) {
|
if (ISeatType != null) {
|
||||||
translate(ISeatType, direction, poseStack);
|
translate(ISeatType, direction, poseStack);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user