fix: 客户端renderfix渲染修复,防止出现对air方块获取方向属性导致崩溃的问题

This commit is contained in:
叁玖领域 2026-03-02 23:02:14 +08:00
parent d177117eaa
commit 8317afd584
2 changed files with 2 additions and 2 deletions

View File

@ -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) {
if (enabled) {
BlockState blockState = entity.level().getBlockState(seatPos);
Direction direction = blockState.getValue(ISeatBlock.FACING);
if (blockState.getBlock() instanceof ISeatBlock seatBlock) {
Direction direction = blockState.getValue(ISeatBlock.FACING);
ISeatType ISeatType = FurnitureHelper.getSeatType(blockState.getBlock());
if (ISeatType != null) {
translate(ISeatType, direction, poseStack);

View File

@ -40,7 +40,7 @@ public class EDGDamageTypes {
public static @NotNull DamageSource causeFuckedDamage(@NotNull RegistryAccess registryAccess) {
return new DamageSourceRandomMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(FUCKED), 2);
}
@Contract("_, _ -> new")
@Contract("_, _ -> new")
public static @NotNull DamageSource causeFuckedDamage(@NotNull RegistryAccess registryAccess, Entity source) {
return new DamageSourceRandomMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(FUCKED), source, 2);
}