Package net.minecraft.client.model

Examples of net.minecraft.client.model.ModelBase


      }
      if(info == null)
      {
        Morph.console("Cannot find ModelInfo for " + clz.getName() + ". Attempting to generate one.", true);
        Render rend = RenderManager.instance.getEntityClassRenderObject(clz);
        ModelBase base = ModelHelper.getPossibleModel(rend);
        info = new ModelInfo(clz, rend, base);
        ModelList.addModelInfo(clz, info);
      }
    }
    return info;
View Full Code Here


          for(Field f : fields)
          {
            f.setAccessible(true);
            if(ModelBase.class.isAssignableFrom(f.getType()))
            {
              ModelBase base = (ModelBase)f.get(rend);
              if(base != null)
              {
                priorityLevel.add(base); // Add normal parent fields
              }
            }
            else if(ModelBase[].class.isAssignableFrom(f.getType()))
            {
              ModelBase[] modelBases = (ModelBase[])f.get(rend);
              if(modelBases != null)
              {
                for(ModelBase base : modelBases)
                {
                  priorityLevel.add(base);
                }
              }
            }
          }
         
          models.add(priorityLevel);
         
          if(clz == RendererLivingEntity.class)
          {
            ArrayList<ModelBase> topPriority = new ArrayList<ModelBase>();
            for(Field f : fields)
            {
              f.setAccessible(true);
              if(ModelBase.class.isAssignableFrom(f.getType()) && (f.getName().equalsIgnoreCase("mainModel") || f.getName().equalsIgnoreCase("field_77045_g")))
              {
                ModelBase base = (ModelBase)f.get(rend);
                if(base != null)
                {
                  topPriority.add(base);
                }
              }
            }
            models.add(topPriority);
          }
          clz = clz.getSuperclass();
        }
      }
      catch(Exception e)
      {
        throw new UnableToAccessFieldException(new String[0], e);
      }
    }

    ModelBase base1 = null;
    int priorityLevel = -1;
    int size = -1;

    int currentPriority = 0;
   
View Full Code Here

    bindEntityTexture(bullet);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) d, (float) d1, (float) d2);
    GL11.glRotatef(f, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(90F -bullet.prevRotationPitch - (bullet.rotationPitch - bullet.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0F);
    ModelBase model = (ModelBase) bullet.type.model;
    if(model != null)
      model.render(bullet, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
  }
View Full Code Here

          for(; dRoll <= -180F; dRoll += 360F) {}
          GL11.glRotatef(180F - grenade.prevRotationYaw - dYaw * f1, 0.0F, 1.0F, 0.0F);
          GL11.glRotatef(grenade.prevRotationPitch + dPitch * f1, 0.0F, 0.0F, 1.0F);
      GL11.glRotatef(grenade.prevRotationRoll + dRoll * f1, 1.0F, 0.0F, 0.0F);
        }
    ModelBase model = grenade.type.model;
    if(model != null)
      model.render(grenade, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
  }
View Full Code Here

        }
        default : break;
        }
       
        Minecraft.getMinecraft().renderEngine.bindTexture(FlansModResourceHandler.getTexture(grenadeType));
        ModelBase model = grenadeType.model;
        model.render(null, 0F, 0F, 0F, 0F, 0F, 1F / 16F);
      }
    }
    GL11.glPopMatrix();
  }
View Full Code Here

    bindEntityTexture(entity);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) d0, (float) d1, (float) d2);
    GL11.glRotatef(-f, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-entity.prevRotationPitch - (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0F);
    ModelBase model = ((EntityParachute)entity).type.model;
    model.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
  }
View Full Code Here

        maint.setTexture(RailcraftConstants.CART_TEXTURE_FOLDER + "cart_track_relayer.png");
        modelsContents.put(EntityCartTrackRelayer.class, maint);
    }

    public static ModelBase getCoreModel(Class eClass) {
        ModelBase render = modelsCore.get(eClass);
        if (render == null && eClass != EntityMinecart.class) {
            render = getCoreModel(eClass.getSuperclass());
            if (render == null) {
                render = modelMinecart;
            }
View Full Code Here

        if (texture == null)
            texture = minecartTextures;
        renderer.bindTex(texture);

        ModelBase core = CartModelManager.getCoreModel(cart.getClass());
        core.render(cart, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
        GL11.glPopMatrix();
        return true;
    }
View Full Code Here

TOP

Related Classes of net.minecraft.client.model.ModelBase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.