Added villager data metadata

This commit is contained in:
themode 2021-02-02 21:03:25 +01:00
parent b6cce091e8
commit cb41b2e3d7

View File

@ -87,6 +87,16 @@ public class Metadata {
}); });
} }
public static Value<int[]> VillagerData(int villagerType,
int villagerProfession,
int level) {
return new Value<>(TYPE_VILLAGERDATA, new int[]{villagerType, villagerProfession, level}, writer -> {
writer.writeVarInt(villagerType);
writer.writeVarInt(villagerProfession);
writer.writeVarInt(level);
});
}
public static Value<Entity.Pose> Pose(@NotNull Entity.Pose value) { public static Value<Entity.Pose> Pose(@NotNull Entity.Pose value) {
return new Value<>(TYPE_POSE, value, writer -> writer.writeVarInt(value.ordinal())); return new Value<>(TYPE_POSE, value, writer -> writer.writeVarInt(value.ordinal()));
} }