當前位置: 首頁>>代碼示例>>Java>>正文


Java IModelCustom類代碼示例

本文整理匯總了Java中net.minecraftforge.client.model.IModelCustom的典型用法代碼示例。如果您正苦於以下問題:Java IModelCustom類的具體用法?Java IModelCustom怎麽用?Java IModelCustom使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IModelCustom類屬於net.minecraftforge.client.model包,在下文中一共展示了IModelCustom類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registerItemRenderers

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
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")
                    }
            ));

}
 
開發者ID:katzenpapst,項目名稱:amunra,代碼行數:17,代碼來源:ClientProxy.java

示例2: registerRenderInformation

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
@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));
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:19,代碼來源:ClientProxyVenus.java

示例3: postInit

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
@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));
    }
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:31,代碼來源:MarsModuleClient.java

示例4: postInit

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
@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();
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:32,代碼來源:AsteroidsModuleClient.java

示例5: renderJet

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
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();
}
 
開發者ID:katzenpapst,項目名稱:amunra,代碼行數:37,代碼來源:ItemRendererJet.java

示例6: loadInstance

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
@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());
}
 
開發者ID:hea3ven,項目名稱:lib-colladamodel,代碼行數:14,代碼來源:ColladaModelLoader.java

示例7: render

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
@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);
}
 
開發者ID:flammpfeil,項目名稱:ExtraScepterStaff,代碼行數:15,代碼來源:ModelWandEx.java

示例8: SimpleBlockOBJRenderer

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
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;
}
 
開發者ID:ObsidianBox,項目名稱:Magma,代碼行數:9,代碼來源:SimpleBlockOBJRenderer.java

示例9: registerRenderInformation

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
@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));
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:10,代碼來源:ClientProxyMoons.java

示例10: registerRenderInformation

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
@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));
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:10,代碼來源:ClientProxyMercury.java

示例11: registerRenderInformation

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
@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));
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:12,代碼來源:ClientProxySedna.java

示例12: RenderCargoRocket

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
public RenderCargoRocket(IModelCustom model)
{
    this.shadowSize = 0.5F;
    this.rocketModel = model;
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:6,代碼來源:RenderCargoRocket.java

示例13: TileEntityCryogenicChamberRenderer

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
public TileEntityCryogenicChamberRenderer(IModelCustom model)
{
    this.model = model;
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:5,代碼來源:TileEntityCryogenicChamberRenderer.java

示例14: ItemRendererTier2Rocket

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
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;
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:6,代碼來源:ItemRendererTier2Rocket.java

示例15: ItemRendererMachine

import net.minecraftforge.client.model.IModelCustom; //導入依賴的package包/類
public ItemRendererMachine(IModelCustom model)
{
    this.model = model;
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:5,代碼來源:ItemRendererMachine.java


注:本文中的net.minecraftforge.client.model.IModelCustom類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。