Java 类net.minecraftforge.client.model.techne.TechneModel 实例源码

项目:EnderCore    文件:TechneUtil.java   
/**
 * 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;
}
项目:EnderCore    文件:TechneUtil.java   
public static List<GroupObject> bakeModel(ModelRenderer model, TechneModel supermodel) {
  return bakeModel(model, supermodel, 1);
}
项目:EnderCore    文件:TechneUtil.java   
public static List<GroupObject> bakeModel(ModelRenderer model, TechneModel supermodel, float scale) {
  return bakeModel(model, supermodel, scale, new Matrix4f());
}
项目:EnderCore    文件:TechneUtil.java   
public static List<GroupObject> bakeModel(ModelRenderer model, TechneModel supermodel, float scale, Matrix4f matrix) {
  return bakeModel(model, supermodel, scale, matrix, false);
}
项目:EnderCore    文件:TechneUtil.java   
public static Map<String, GroupObject> bakeModel(TechneModel model) {
  return bakeModel(model, 1);
}
项目:EnderCore    文件:TechneUtil.java   
public static Map<String, GroupObject> bakeModel(TechneModel model, float scale) {
  return bakeModel(model, scale, new Matrix4f());
}
项目:EnderCore    文件:TechneUtil.java   
public static Map<String, GroupObject> bakeModel(TechneModel model, float scale, Matrix4f m) {
  return bakeModel(model, scale, m, false);
}
项目:EnderCore    文件:TechneUtil.java   
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)));
}
项目:EnderCore    文件:TechneUtil.java   
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();
}