1.21.9: Fix crash
This commit is contained in:
+1
-1
@@ -337,7 +337,7 @@ public class CloakFeatureRenderer extends FeatureRenderer<PlayerEntityRenderStat
|
||||
@Override
|
||||
public void render(MatrixStack matrices, OrderedRenderCommandQueue queue, int light, PlayerEntityRenderState state,
|
||||
float limbAngle, float limbDistance) {
|
||||
if (state.invisible || !state.capeVisible
|
||||
if (state.displayName == null || state.invisible || !state.capeVisible
|
||||
|| state.skinTextures.cape() != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ public class HatFeatureRenderer extends FeatureRenderer<PlayerEntityRenderState,
|
||||
// @Override
|
||||
public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light,
|
||||
PlayerEntityRenderState state, float limbAngle, float limbDistance) {
|
||||
if (state.displayName == null)
|
||||
return;
|
||||
|
||||
SaturnPlayer player = SaturnPlayer.get(state.displayName.getString());
|
||||
|
||||
if (state.invisible || player == null || player.hat.isEmpty()) {
|
||||
|
||||
@@ -35,6 +35,9 @@ public abstract class NameTagMixin<S extends EntityRenderState> {
|
||||
@Inject(method = "renderLabelIfPresent", at = @At("HEAD"), cancellable = true)
|
||||
protected void renderLabelIfPresent(S state, MatrixStack matrices, OrderedRenderCommandQueue queue,
|
||||
CameraRenderState cameraRenderState, CallbackInfo ci) {
|
||||
if (state.displayName == null)
|
||||
return;
|
||||
|
||||
UUID uuid = isSaturn(state);
|
||||
|
||||
if (uuid != null) {
|
||||
|
||||
Reference in New Issue
Block a user