Add GeckoLib Support

This commit is contained in:
Kam committed 2023-11-16 16:01:32 -05:00
1 parent 6f8d99d94a
commit c67a8e43cb
13 files changed
+565 -16

No files matched your search

@@ -156,6 +156,7 @@ public class CustomNpcs {
registerNpc(EntityNPCEnderman.class, "npcEnderman");
registerNpc(EntityNPCGolem.class, "npcGolem");
registerNpc(EntityCustomNpc.class, "CustomNpc");
registerCustomModel(EntityGeckoModel.class, "CustomModel");
registerNewEntity(EntityChairMount.class, "CustomNpcChairMount", 64, 10, false);
registerNewEntity(EntityProjectile.class, "throwableitem", 64, 3, true);
@@ -254,6 +255,11 @@ public class CustomNpcs {
EntityList.stringToClassMapping.put(name, cl);
}
private void registerCustomModel(Class<? extends Entity> cl, String name) {
EntityRegistry.registerModEntity(cl, name, NewEntityStartId++, this, 64, 10, false);
EntityList.stringToClassMapping.put(name, cl);
}
private void registerNewEntity(Class<? extends Entity> cl, String name, int range, int update, boolean velocity) {
EntityRegistry.registerModEntity(cl, name, NewEntityStartId++, this, range, update, velocity);
}