Java 类net.minecraftforge.client.model.IModelCustom 实例源码

项目:amunra    文件:ClientProxy.java   
public static void registerItemRenderers()
{
    MinecraftForgeClient.registerItemRenderer(ARItems.shuttleItem, new ItemRendererShuttle(rocketModel));

    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ARBlocks.blockShuttleDock.getBlock()), new ItemRendererSpecial1());


    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ARBlocks.metaBlockMothershipEngineJet), new ItemRendererJet(
            new IModelCustom[]{engineModel, engineModelIon},
            new ResourceLocation[] {
                    new ResourceLocation(AmunRa.instance.ASSETPREFIX, "textures/model/jet.png"),
                    new ResourceLocation(AmunRa.instance.ASSETPREFIX, "textures/model/jet-ion.png")
                    }
            ));

}
项目:4-Space-Legacy    文件:ClientProxyVenus.java   
@Override
public void registerRenderInformation()
{
    ClientRegistry.bindTileEntitySpecialRenderer(SCVenusTileEntityTreasureChest.class, new SCVenusTileEntityTreasureChestRenderer());

    RenderingRegistry.addNewArmourRendererPrefix("gem");
    RenderingRegistry.addNewArmourRendererPrefix("sulfer");
    RenderingRegistry.addNewArmourRendererPrefix("jetpack");

    RenderingRegistry.registerEntityRenderingHandler(SCVenusEntityVenusianVillager.class, new SCVenusRenderVenusianVillager());
    RenderingRegistry.registerEntityRenderingHandler(SCVenusEntityFlameling.class, new SCVenusRenderFlameling());
    RenderingRegistry.registerEntityRenderingHandler(SCVenusEntityEvolvedBlaze.class, new SCVenusRenderEvolvedBlaze());

    IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel("/assets/galacticraftmars/models/cargoRocket.obj");

    RenderingRegistry.registerEntityRenderingHandler(SCVenusEntityRocketT3.class, new GCCoreRenderSpaceship(new SCCoreModelSpaceshipTier3(), VenusCore.ASSET_DOMAIN, "rocketT3"));
    MinecraftForgeClient.registerItemRenderer(VenusItems.spaceshipT3.itemID, new SCVenusItemRendererSpaceshipT3(cargoRocketModel));
}
项目:4Space-5    文件:MarsModuleClient.java   
@Override
    public void postInit(FMLPostInitializationEvent event)
    {
        IModelCustom chamberModel = AdvancedModelLoader.loadModel(new ResourceLocation(MarsModule.ASSET_PREFIX, "models/chamber.obj"));
        IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel(new ResourceLocation(MarsModule.ASSET_PREFIX, "models/cargoRocket.obj"));

        // Tile Entity Renderers
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTreasureChestMars.class, new TileEntityTreasureChestRenderer());
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCryogenicChamber.class, new TileEntityCryogenicChamberRenderer(chamberModel));
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTerraformer.class, new TileEntityBubbleProviderRenderer(0.25F, 1.0F, 0.25F));

        // Entities
        RenderingRegistry.registerEntityRenderingHandler(EntitySludgeling.class, new RenderSludgeling());
        RenderingRegistry.registerEntityRenderingHandler(EntitySlimeling.class, new RenderSlimeling());
        RenderingRegistry.registerEntityRenderingHandler(EntityCreeperBoss.class, new RenderCreeperBoss());
        RenderingRegistry.registerEntityRenderingHandler(EntityTier2Rocket.class, new RenderTier1Rocket(new ModelTier2Rocket(), MarsModule.ASSET_PREFIX, "rocketT2"));
//        RenderingRegistry.registerEntityRenderingHandler(EntityTerraformBubble.class, new RenderBubble(0.25F, 1.0F, 0.25F));
        RenderingRegistry.registerEntityRenderingHandler(EntityProjectileTNT.class, new RenderProjectileTNT());
        RenderingRegistry.registerEntityRenderingHandler(EntityLandingBalloons.class, new RenderLandingBalloons());
        RenderingRegistry.registerEntityRenderingHandler(EntityLandingBalloons.class, new RenderLandingBalloons());
        RenderingRegistry.registerEntityRenderingHandler(EntityCargoRocket.class, new RenderCargoRocket(cargoRocketModel));

        // Add Armor Renderer Prefix
        RenderingRegistry.addNewArmourRendererPrefix("desh");

        // Item Renderers
        MinecraftForgeClient.registerItemRenderer(MarsItems.spaceship, new ItemRendererTier2Rocket(cargoRocketModel));
        MinecraftForgeClient.registerItemRenderer(MarsItems.key, new ItemRendererKey(new ResourceLocation(MarsModule.ASSET_PREFIX, "textures/model/treasure.png")));
        MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MarsBlocks.machine), new ItemRendererMachine(chamberModel));
    }
项目:4Space-5    文件:AsteroidsModuleClient.java   
@Override
public void postInit(FMLPostInitializationEvent event)
{
    RenderingRegistry.registerEntityRenderingHandler(EntitySmallAsteroid.class, new RenderSmallAsteroid());
    RenderingRegistry.registerEntityRenderingHandler(EntityGrapple.class, new RenderGrapple());
    IModelCustom podModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/pod.obj"));
    RenderingRegistry.registerEntityRenderingHandler(EntityEntryPod.class, new RenderEntryPod(podModel));
    IModelCustom rocketModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/tier3rocket.obj"));
    RenderingRegistry.registerEntityRenderingHandler(EntityTier3Rocket.class, new RenderTier3Rocket(rocketModel, AsteroidsModule.ASSET_PREFIX, "tier3rocket"));
    RenderingRegistry.registerEntityRenderingHandler(EntityAstroMiner.class, new RenderAstroMiner());
    IModelCustom grappleModel = AdvancedModelLoader.loadModel(new ResourceLocation(AsteroidsModule.ASSET_PREFIX, "models/grapple.obj"));
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.grapple, new ItemRendererGrappleHook(grappleModel));
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.beamReceiver), new ItemRendererBeamReceiver());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.beamReflector), new ItemRendererBeamReflector());
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.tier3Rocket, new ItemRendererTier3Rocket(rocketModel));
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.astroMiner, new ItemRendererAstroMiner());
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.thermalPadding, new ItemRendererThermalArmor());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.shortRangeTelepad), new ItemRendererShortRangeTelepad());
    MinecraftForgeClient.registerItemRenderer(AsteroidsItems.heavyNoseCone, new ItemRendererHeavyNoseCone());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.blockWalkway), new ItemRendererWalkway());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.blockWalkwayOxygenPipe), new ItemRendererWalkway());
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(AsteroidBlocks.blockWalkwayWire), new ItemRendererWalkway());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBeamReflector.class, new TileEntityBeamReflectorRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBeamReceiver.class, new TileEntityBeamReceiverRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMinerBase.class, new TileEntityMinerBaseRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShortRangeTelepad.class, new TileEntityShortRangeTelepadRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTreasureChestAsteroids.class, new TileEntityTreasureChestRenderer());

    if (Loader.isModLoaded("craftguide"))
        CraftGuideIntegration.register();
}
项目:amunra    文件:ItemRendererJet.java   
protected void renderJet(ItemRenderType type, RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
{
    // TODO get a better idea how to do this
    ResourceLocation texture = textures[item.getItemDamage()];
    IModelCustom model = models[item.getItemDamage()];

    switch(type) {
    case ENTITY:
        GL11.glScaled(0.53, 0.53, 0.53);
        GL11.glTranslated(0.0, 1.0, 1.0);
        break;
    case EQUIPPED:
        GL11.glScaled(0.53, 0.53, 0.53);
        GL11.glTranslated(2.0, 0.8, 1.5);
        GL11.glRotated(90, 0, 1, 0);
        break;
    case EQUIPPED_FIRST_PERSON:
        GL11.glScaled(0.53, 0.53, 0.53);
        GL11.glTranslated(1.9, 1.0, 1.0);
        GL11.glRotated(90, 0, 1, 0);
        break;
    case INVENTORY:
        GL11.glTranslated(0.5, 0.35, 0.0);
        GL11.glScaled(0.53, 0.53, 0.53);
        GL11.glRotated(180, 0, 1, 0);
        break;
    default:
        break;
    }
    GL11.glPushMatrix();
    GL11.glEnable(GL11.GL_TEXTURE_2D);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    Minecraft.getMinecraft().renderEngine.bindTexture(texture);
    model.renderAll();
    GL11.glPopMatrix();
}
项目:lib-colladamodel    文件:ColladaModelLoader.java   
@Override
public IModelCustom loadInstance(ResourceLocation resource)
        throws ModelFormatException {
    IResource res;
    try {
        res = Minecraft.getMinecraft().getResourceManager()
                .getResource(resource);
    } catch (IOException e) {
        throw new ModelFormatException("IO Exception reading model format",
                e);
    }
    return LoadFromStream(res.getInputStream());
}
项目:ExtraScepterStaff    文件:ModelWandEx.java   
@Override
public void render(ItemStack wandStack) {
    if(RenderManager.instance.renderEngine == null)
        return;
    ItemWandCasting wand = (ItemWandCasting)wandStack.getItem();

    String tag = wand.getRod(wandStack).getTag();
    if(CustomModels.containsKey(tag)){
        IModelCustom model = CustomModels.get(tag);

        render(wandStack,model);
    }else
        super.render(wandStack);
}
项目:Magma    文件:SimpleBlockOBJRenderer.java   
public SimpleBlockOBJRenderer(Addon addon, int renderID, ResourceLocation modelLocation) {
    super(addon, renderID);
    final IModelCustom temp = AdvancedModelLoader.loadModel(modelLocation);
    if (!(temp instanceof WavefrontObject)) {
        throw new IllegalArgumentException("SimpleBlockOBJRenderer is only for WaveFrontObjects (.obj)!");
    }
    model = (WavefrontObject) temp;
}
项目:Magma    文件:SimpleBlockOBJRenderer.java   
/**
 * Creates a renderer using properties from a {@link org.obsidianbox.magma.block.SimpleBlock}
 *
 * This will also set the render type for that block
 * @param addon The addon creating the block
 * @param renderID The render type used by Forge
 * @param block Block being rendered
 */
public SimpleBlockOBJRenderer(Addon addon, int renderID, SimpleBlock block) {
    super(addon, renderID);
    final IModelCustom temp = AdvancedModelLoader.loadModel(new ResourceLocation(addon.getDescription().getIdentifier(), "models/blocks/" + block.getIdentifier() + ".obj"));
    if (!(temp instanceof WavefrontObject)) {
        throw new IllegalArgumentException("SimpleBlockOBJRenderer is only for WaveFrontObjects (.obj)!");
    }
    model = (WavefrontObject) temp;
    block.setRenderType(renderID);
}
项目:4-Space-Legacy    文件:ClientProxyMoons.java   
@Override
public void registerRenderInformation()
{
    IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel("/assets/galacticraftmars/models/cargoRocket.obj");
    // TODO remove internal cargo rocket codes

    RenderingRegistry.registerEntityRenderingHandler(SCJupiterEntityRocketT5.class, new GCCoreRenderSpaceship(new SCJupiterModelSpaceshipTier5(), MoonsCore.ASSET_DOMAIN, "rocketT5"));
    MinecraftForgeClient.registerItemRenderer(JupiterItems.spaceshipT5.itemID, new SCJupiterItemRendererSpaceshipT5(cargoRocketModel));
}
项目:4-Space-Legacy    文件:ClientProxyMercury.java   
@Override
public void registerRenderInformation()
{
    IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel("/assets/galacticraftmars/models/cargoRocket.obj");
    // TODO remove internal cargo rocket codes

    RenderingRegistry.registerEntityRenderingHandler(SCMercuryEntityRocketT4.class, new GCCoreRenderSpaceship(new SCMercuryModelSpaceshipTier4(), MercuryCore.ASSET_DOMAIN, "rocketT4"));
    MinecraftForgeClient.registerItemRenderer(MercuryItems.spaceshipT4.itemID, new SCMercuryItemRendererSpaceshipT4(cargoRocketModel));
}
项目:4-Space-Legacy    文件:ClientProxySedna.java   
@Override
public void registerRenderInformation()
{
    RenderingRegistry.addNewArmourRendererPrefix("gravity");

    IModelCustom cargoRocketModel = AdvancedModelLoader.loadModel("/assets/galacticraftmars/models/cargoRocket.obj");
    // TODO remove internal cargo rocket codes

    RenderingRegistry.registerEntityRenderingHandler(SCSednaEntityRocketT6.class, new GCCoreRenderSpaceship(new SCSednaModelSpaceshipTier6(), SednaCore.ASSET_DOMAIN, "rocketT6"));
    MinecraftForgeClient.registerItemRenderer(SednaItems.spaceshipT6.itemID, new SCSednaItemRendererSpaceshipT6(cargoRocketModel));
}
项目:4Space-5    文件:RenderCargoRocket.java   
public RenderCargoRocket(IModelCustom model)
{
    this.shadowSize = 0.5F;
    this.rocketModel = model;
}
项目:4Space-5    文件:TileEntityCryogenicChamberRenderer.java   
public TileEntityCryogenicChamberRenderer(IModelCustom model)
{
    this.model = model;
}
项目:4Space-5    文件:ItemRendererTier2Rocket.java   
public ItemRendererTier2Rocket(IModelCustom cargoRocketModel)
{
    super(new EntityTier2Rocket(FMLClientHandler.instance().getClient().theWorld), new ModelTier2Rocket(), new ResourceLocation(MarsModule.ASSET_PREFIX, "textures/model/rocketT2.png"));
    this.cargoRocketModel = cargoRocketModel;
}
项目:4Space-5    文件:ItemRendererMachine.java   
public ItemRendererMachine(IModelCustom model)
{
    this.model = model;
}
项目:4Space-5    文件:RenderEntryPod.java   
public RenderEntryPod(IModelCustom model)
{
    modelEntryPod = model;
}
项目:4Space-5    文件:RenderTier3Rocket.java   
public RenderTier3Rocket(IModelCustom spaceshipModel, String textureDomain, String texture)
{
    this.rocketModelObj = spaceshipModel;
    this.rocketTexture = new ResourceLocation(textureDomain, "textures/model/" + texture + ".png");
    this.shadowSize = 2F;
}
项目:4Space-5    文件:ItemRendererTier3Rocket.java   
public ItemRendererTier3Rocket(IModelCustom model)
{
    this.modelSpaceship = model;
}
项目:4Space-5    文件:ItemRendererGrappleHook.java   
public ItemRendererGrappleHook(IModelCustom modelGrapple)
{
    ItemRendererGrappleHook.modelGrapple = modelGrapple;
}
项目:4Space-5    文件:TileEntityAluminumWireRenderer.java   
public void renderModelAt(TileEntityAluminumWire tileEntity, double d, double d1, double d2, float f)
{
    // Texture file
    FMLClientHandler.instance().getClient().renderEngine.bindTexture(TileEntityAluminumWireRenderer.aluminumWireTexture);
    GL11.glPushMatrix();
    GL11.glTranslatef((float) d + 0.5F, (float) d1 + 0.5F, (float) d2 + 0.5F);
    GL11.glScalef(1.0F, -1F, -1F);

    TileEntity[] adjecentConnections = EnergyUtil.getAdjacentPowerConnections(tileEntity);

    int metadata = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);

    IModelCustom model = null;

    if (metadata == 0)
    {
        model = this.model;
    }
    else
    {
        model = this.model2;
    }

    if (adjecentConnections[0] != null)
    {
        model.renderPart("Top");
    }

    if (adjecentConnections[1] != null)
    {
        model.renderPart("Bottom");
    }

    if (adjecentConnections[2] != null)
    {
        model.renderPart("Front");
    }

    if (adjecentConnections[3] != null)
    {
        model.renderPart("Back");
    }

    if (adjecentConnections[4] != null)
    {
        model.renderPart("Right");
    }

    if (adjecentConnections[5] != null)
    {
        model.renderPart("Left");
    }

    model.renderPart("Middle");
    GL11.glPopMatrix();
}
项目:4Space-5    文件:RenderTier1Rocket.java   
public RenderTier1Rocket(IModelCustom spaceshipModel, String textureDomain, String texture)
{
    this(new ResourceLocation(textureDomain, "textures/model/" + texture + ".png"));
    this.modelSpaceshipObj = spaceshipModel;
}
项目:TRHS_Club_Mod_2016    文件:ObjModelLoader.java   
@Override
public IModelCustom loadInstance(ResourceLocation resource) throws ModelFormatException
{
    return new WavefrontObject(resource);
}
项目:TRHS_Club_Mod_2016    文件:TechneModelLoader.java   
@Override
public IModelCustom loadInstance(ResourceLocation resource) throws ModelFormatException
{
    return new TechneModel(resource);
}
项目:LambdaLib    文件:CustomPartedModel.java   
public CustomPartedModel(IModelCustom _model) {
    this(_model, null);
}
项目:LambdaLib    文件:CustomPartedModel.java   
public CustomPartedModel(IModelCustom _model, String _part) {
    model = _model;
    name = _part;
}
项目:LambdaLib    文件:TileEntityModelCustom.java   
public TileEntityModelCustom(IModelCustom model) {
    theModel = model;
}
项目:LambdaLib    文件:ItemModelCustom.java   
public ItemModelCustom(IModelCustom model) {
    theModel = model;
}
项目:CauldronGit    文件:ObjModelLoader.java   
@Override
public IModelCustom loadInstance(ResourceLocation resource) throws ModelFormatException
{
    return new WavefrontObject(resource);
}
项目:CauldronGit    文件:TechneModelLoader.java   
@Override
public IModelCustom loadInstance(ResourceLocation resource) throws ModelFormatException
{
    return new TechneModel(resource);
}
项目:amunra    文件:ItemRendererShuttle.java   
public ItemRendererShuttle(IModelCustom model)
{
    this.modelSpaceship = model;
}
项目:amunra    文件:ItemRendererJet.java   
public ItemRendererJet(IModelCustom[] models, ResourceLocation[] textures) {
    // TODO find a better idea
    this.models = models;
    this.textures = textures;
}
项目:amunra    文件:RenderMothershipJet.java   
public RenderMothershipJet(IModelCustom leModel, ResourceLocation texture) {
    this.model = leModel;
    this.texture = texture;
}
项目:amunra    文件:RenderShuttle.java   
public RenderShuttle(IModelCustom spaceshipModel, String textureDomain, String texture)
{
    this.rocketModelObj = spaceshipModel;
    this.rocketTexture = new ResourceLocation(textureDomain, "textures/model/" + texture + ".png");
    this.shadowSize = 2F;
}
项目:It-s-About-Time-Minecraft-Mod    文件:ModelObjRenderer.java   
public ModelObjRenderer(ModelBase bass, IModelCustom shape) {
    this(bass, shape, 1F);
}
项目:It-s-About-Time-Minecraft-Mod    文件:ModelObjRenderer.java   
public ModelObjRenderer(ModelBase bass, IModelCustom shape, float scale) {
    super(bass);
    theScale = scale;
    model = shape;
}
项目:MC-MineAPI.Java    文件:TechneModelLoader.java   
@Override
public IModelCustom loadInstance(String resourceName, URL resource) throws ModelFormatException
{
    return new TechneModel( resourceName,
                            resource );
}
项目:MateriaMuto    文件:TechneModelLoader.java   
@Override
public IModelCustom loadInstance(ResourceLocation resource) throws ModelFormatException {
    return new TechneModel(resource);
}
项目:Cauldron    文件:ObjModelLoader.java   
@Override
public IModelCustom loadInstance(ResourceLocation resource) throws ModelFormatException
{
    return new WavefrontObject(resource);
}
项目:Cauldron    文件:TechneModelLoader.java   
@Override
public IModelCustom loadInstance(ResourceLocation resource) throws ModelFormatException
{
    return new TechneModel(resource);
}