entity state poses from the vanilla dump: sleeping/sitting/crouching/swimming/gliding, fox/cat/panda/parrot/bat/camel/sniffer poses with pose transforms, per-sub-model poses (baby pivots), armor-stand part poses and body pitch via rotation bindings, fish in water, beds, shoulder parrots, pose test scenes

This commit is contained in:
MineTec committed 2026-11-04 17:51:01 +01:00
1 parent 6660ebe557
commit 45d033bd89
10 files changed
+1108 -110

No files matched your search

+24 -1
View File
@@ -269,10 +269,33 @@ public class EntityTestRender {
String equip = plain ? EQUIP.get(key) : null;
boolean arms = flags.contains("arms");
int collar = flags.contains("tame") ? 0xFFB02E26 : 0;
// Pose flags: "p:<state pose>" (sleeping, sitting, lying, …), "pitch:<deg>", "passenger", "shoulder"
// (red + blue parrot on the shoulders), "stand" (custom armor-stand part poses), "mouth" (sweet berries).
List<String> poses = new ArrayList<>();
float pitch = 0;
for (String f : flags) {
if (f.startsWith("p:")) poses.add(f.substring(2));
if (f.startsWith("pitch:")) pitch = Float.parseFloat(f.substring(6));
}
Collections.sort(poses);
Map<String, float[]> partPoses = null;
if (flags.contains("stand")) {
partPoses = new HashMap<>();
partPoses.put("headPose", new float[] {-20, 30, 0});
partPoses.put("bodyPose", new float[] {10, 20, 0});
partPoses.put("rightArmPose", new float[] {-90, 0, 0});
partPoses.put("leftArmPose", new float[] {-30, 0, -40});
partPoses.put("leftLegPose", new float[] {30, 0, -10});
partPoses.put("rightLegPose", new float[] {-40, 0, 0});
}
boolean shoulder = flags.contains("shoulder");
ItemSpec mouth = flags.contains("mouth") ? new ItemSpec("sweet_berries", null, null, false) : null;
return new EntityState(key, 0, 0, 0, yaw, baby, 0.8, 1.0,
isPlayer, null, false, variant, tint, 1.0, PROF.get(key), LVL.getOrDefault(key, 0),
plain ? MARK.get(key) : null, saddle, chest, arms, equip, armor,
plain && !baby && INVISIBLE.contains(key), 0, 0, tint2, false, null, null, null, collar, false, null);
plain && !baby && INVISIBLE.contains(key), pitch, 0, tint2, flags.contains("passenger"), null, null, null,
collar, false, mouth, poses.isEmpty() ? null : String.join("+", poses), partPoses,
shoulder ? "red_blue" : null, shoulder ? "blue" : null);
}
static BufferedImage labelCell(String key, BufferedImage v1, BufferedImage v2) {