Try to fix visibility of hair on disguised players

This commit is contained in:
Sollace 2023-08-29 01:09:01 +01:00
parent 9f7050ef28
commit 559b8d2e6e
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -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() {