From 559b8d2e6e166b3314cabcb77f64c18db0c7d771 Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 29 Aug 2023 01:09:01 +0100 Subject: [PATCH] Try to fix visibility of hair on disguised players --- .../entity/player/dummy/DummyClientPlayerEntity.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/dummy/DummyClientPlayerEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/player/dummy/DummyClientPlayerEntity.java index c5da9103..f7ee0cde 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/dummy/DummyClientPlayerEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/dummy/DummyClientPlayerEntity.java @@ -11,6 +11,7 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.AbstractClientPlayerEntity; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.PlayerListEntry; +import net.minecraft.client.render.entity.PlayerModelPart; import net.minecraft.client.world.ClientWorld; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.player.PlayerEntity; @@ -63,6 +64,11 @@ public class DummyClientPlayerEntity extends AbstractClientPlayerEntity implemen return !InteractionManager.instance().isClientPlayer(getMaster()); } + @Override + public boolean isPartVisible(PlayerModelPart modelPart) { + return owner == null ? super.isPartVisible(modelPart) : owner.isPartVisible(modelPart); + } + @Override @Nullable public PlayerEntity getMaster() {