/** * Use this to convert TechneModel to it's static representation */ @SuppressWarnings("unchecked") public static Map<String, GroupObject> bakeModel(TechneModel model, float scale, Matrix4f m, boolean rotateYFirst) { Map<String, ModelRenderer> parts = (Map<String, ModelRenderer>) ObfuscationReflectionHelper.getPrivateValue(TechneModel.class, model, "parts"); Map<String, GroupObject> res = Maps.newHashMap(); for (Map.Entry<String, ModelRenderer> e : parts.entrySet()) { GroupObject obj = bakeModel(e.getValue(), model, scale, m, rotateYFirst).get(0); res.put(e.getKey(), obj); } return res; }
public static List<GroupObject> bakeModel(ModelRenderer model, TechneModel supermodel) { return bakeModel(model, supermodel, 1); }
public static List<GroupObject> bakeModel(ModelRenderer model, TechneModel supermodel, float scale) { return bakeModel(model, supermodel, scale, new Matrix4f()); }
public static List<GroupObject> bakeModel(ModelRenderer model, TechneModel supermodel, float scale, Matrix4f matrix) { return bakeModel(model, supermodel, scale, matrix, false); }
public static Map<String, GroupObject> bakeModel(TechneModel model) { return bakeModel(model, 1); }
public static Map<String, GroupObject> bakeModel(TechneModel model, float scale) { return bakeModel(model, scale, new Matrix4f()); }
public static Map<String, GroupObject> bakeModel(TechneModel model, float scale, Matrix4f m) { return bakeModel(model, scale, m, false); }
public static Map<String, GroupObject> getModel(String modid, String modelPath) { TechneModel tm = (TechneModel) modelLoader.loadInstance(new ResourceLocation(modid.toLowerCase(Locale.US), modelPath + ".tcn")); return TechneUtil.bakeModel(tm, 1f / 16, new Matrix4f().scale(new Vector3f(-1, -1, 1))); }
public static Collection<GroupObject> getModelAll(String modid, String modelPath) { TechneModel tm = (TechneModel) modelLoader.loadInstance(new ResourceLocation(modid.toLowerCase(Locale.US), modelPath + ".tcn")); return TechneUtil.bakeModel(tm, 1f / 16, new Matrix4f().scale(new Vector3f(-1, -1, 1))).values(); }