render entities from vanilla client models, add items, displays and leashes
- dump entity models straight from the unobfuscated client jar (tools/VanillaModelDump.java, tools/update-vanilla-models.sh): models posed by vanilla setupAnim, baby/variant/layer models, renderer transforms, default textures, pose variants (sitting, holding items, illager arms) and all layer definitions; the old CEM template is only a fallback now - fix adult zombies captured as babies, zero-thickness planes (wings, fins) and back faces in the entity intersector - held items, head items (pumpkins, skulls), shields, elytra, saddles and body equipment for every mount, armor following the pose - block/item/text display entities, dropped items, falling blocks, primed TNT, minecart contents, block entities inside displays, leash ropes - item models resolved from the 26.x item definitions with display transforms; generated items extruded like vanilla - bundle the vanilla font definitions as fallback so sign/text rendering works with packs that lack font/*.json - one failing entity no longer aborts the whole photo - edge-case test plugin (tools/edgecase-plugin) and offline harnesses
This commit is contained in:
1 parent
5904814e69
commit
32afe08f03
41 files changed
+3761
-370
No files matched your search
@@ -107,6 +107,20 @@ public final class Main extends JavaPlugin {
|
||||
} catch (Exception e) {
|
||||
getLogger().severe("Failed to load CEM entity models: " + e.getMessage());
|
||||
}
|
||||
// Vanilla models dumped from the client jar (tools/VanillaModelDump.java) override the CEM set: an
|
||||
// optional newer dump in the data folder (no recompile on MC updates), else the bundled copy.
|
||||
File dump = new File(getDataFolder(), "vanilla_entity_models.json");
|
||||
try (InputStream in =
|
||||
dump.isFile() ? new java.io.FileInputStream(dump) : getResource("cem/vanilla_entity_models.json")) {
|
||||
if (in != null) {
|
||||
int n = cemLoader.load(in, getLogger());
|
||||
getLogger()
|
||||
.info("Loaded vanilla entity models" + (dump.isFile() ? " from " + dump.getName() : "") + " ("
|
||||
+ n + " models total).");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
getLogger().severe("Failed to load vanilla entity models: " + e.getMessage());
|
||||
}
|
||||
SkinCache skinCache = new SkinCache();
|
||||
BitmapFont font = FontLoader.load(resourcePack, textures, getLogger());
|
||||
getLogger().info("Loaded sign font (" + (font.isEmpty() ? "no glyphs — text disabled" : "ok") + ").");
|
||||
|
||||
Reference in new issue
Block a user