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) {
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user