2025-11-24 22:52:51 +03:00

62 lines
1.3 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.mojang.serialization.Codec
*/
package net.minecraft.world.entity.player;
import com.mojang.serialization.Codec;
import net.minecraft.network.chat.Component;
import net.minecraft.util.StringRepresentable;
public enum PlayerModelPart implements StringRepresentable
{
CAPE(0, "cape"),
JACKET(1, "jacket"),
LEFT_SLEEVE(2, "left_sleeve"),
RIGHT_SLEEVE(3, "right_sleeve"),
LEFT_PANTS_LEG(4, "left_pants_leg"),
RIGHT_PANTS_LEG(5, "right_pants_leg"),
HAT(6, "hat");
public static final Codec<PlayerModelPart> CODEC;
private final int bit;
private final int mask;
private final String id;
private final Component name;
private PlayerModelPart(int bit, String name) {
this.bit = bit;
this.mask = 1 << bit;
this.id = name;
this.name = Component.translatable("options.modelPart." + name);
}
public int getMask() {
return this.mask;
}
public int getBit() {
return this.bit;
}
public String getId() {
return this.id;
}
public Component getName() {
return this.name;
}
@Override
public String getSerializedName() {
return this.id;
}
static {
CODEC = StringRepresentable.fromEnum(PlayerModelPart::values);
}
}