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


Java IRenderFactory類代碼示例

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


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

示例1: register

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static <ENTITY extends Entity> void register(Class<ENTITY> classes, final Class<? extends Render<ENTITY>> render)
{
	RenderingRegistry.registerEntityRenderingHandler(classes, new IRenderFactory<ENTITY>() {

		@Override
		public Render<ENTITY> createRenderFor(RenderManager manager) 
		{
			try
			{
				return render.getConstructor(RenderManager.class).newInstance(manager);
			}
			catch (Exception e)
			{
				e.printStackTrace();
			}

			return null;
		}
	});
}
 
開發者ID:Modding-Legacy,項目名稱:Aether-Legacy,代碼行數:21,代碼來源:AetherEntityRenderingRegistry.java

示例2: preInit

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
@Override
public void preInit(FMLPreInitializationEvent evt) {
    MCDoom.instance.getGoreProperty().setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);
    MCDoom.instance.getMaxGoreParticles().setConfigEntryClass(GuiConfigEntries.NumberSliderEntry.class);

    MinecraftForge.EVENT_BUS.register(screenEventHandler);
    MinecraftForge.EVENT_BUS.register(soundEventsHandler);
    registerItems();

    RenderingRegistry.registerEntityRenderingHandler(PlasmaBallEntity.class, new IRenderFactory<PlasmaBallEntity>() {
        @Override
        public Render<? super PlasmaBallEntity> createRenderFor(RenderManager manager) {
            return new RenderPlasmaBall(manager);
        }
    });

    loadWeaponRenderers();
}
 
開發者ID:jglrxavpok,項目名稱:MCDoom,代碼行數:19,代碼來源:MCDoomClientProxy.java

示例3: registerEntityRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
@SideOnly(Side.CLIENT)
public static void registerEntityRenders() {
	RenderingRegistry.registerEntityRenderingHandler(EntityMobTest.class, new IRenderFactory() {
	@Override
	public Render createRenderFor(RenderManager manager) {
		return new RenderMobTest(manager, new ModelMobTest(), 0.4F);
	}});
}
 
開發者ID:CJMinecraft01,項目名稱:EntitiesTutorial,代碼行數:9,代碼來源:ModEntities.java

示例4: initModels

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
@SideOnly(Side.CLIENT)
public static void initModels() {
    RenderingRegistry.registerEntityRenderingHandler(EntityMeeCreeps.class, RenderMeeCreeps.FACTORY);

    RenderingRegistry.registerEntityRenderingHandler(EntityProjectile.class, new IRenderFactory<EntityProjectile>() {
        @Override
        public Render<? super EntityProjectile> createRenderFor(RenderManager manager) {
            return new RenderProjectile<EntityProjectile>(manager, Minecraft.getMinecraft().getRenderItem());
        }
    });
}
 
開發者ID:McJty,項目名稱:MeeCreeps,代碼行數:12,代碼來源:ModEntities.java

示例5: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
	System.out.println("registering renders");
	
	RenderingRegistry.registerEntityRenderingHandler(EntityBailey.class, new IRenderFactory<EntityBailey>() {
		@Override 
		public Render<EntityBailey> createRenderFor(RenderManager manager) { 
			return new RenderBailey(manager); 
		}
	});
}
 
開發者ID:ToroCraft,項目名稱:Dailies,代碼行數:11,代碼來源:Renders.java

示例6: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
  RenderingRegistry.registerEntityRenderingHandler(EntityKing.class, new IRenderFactory<EntityKing>() {
    @Override
    public Render<EntityKing> createRenderFor(RenderManager manager) {
      return new RenderKing(manager);
    }
  });
}
 
開發者ID:ToroCraft,項目名稱:ToroChess,代碼行數:9,代碼來源:EntityKing.java

示例7: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
  RenderingRegistry.registerEntityRenderingHandler(EntityRook.class, new IRenderFactory<EntityRook>() {
    @Override
    public Render<EntityRook> createRenderFor(RenderManager manager) {
      return new RenderRook(manager);
    }
  });
}
 
開發者ID:ToroCraft,項目名稱:ToroChess,代碼行數:9,代碼來源:EntityRook.java

示例8: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
  RenderingRegistry.registerEntityRenderingHandler(EntityPawn.class, new IRenderFactory<EntityPawn>() {
    @Override
    public Render<EntityPawn> createRenderFor(RenderManager manager) {
      return new RenderPawn(manager);
    }
  });
}
 
開發者ID:ToroCraft,項目名稱:ToroChess,代碼行數:9,代碼來源:EntityPawn.java

示例9: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
  RenderingRegistry.registerEntityRenderingHandler(EntityKnight.class, new IRenderFactory<EntityKnight>() {
    @Override
    public Render<EntityKnight> createRenderFor(RenderManager manager) {
      return new RenderKnight(manager);
    }
  });
}
 
開發者ID:ToroCraft,項目名稱:ToroChess,代碼行數:9,代碼來源:EntityKnight.java

示例10: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
  RenderingRegistry.registerEntityRenderingHandler(EntityBishop.class, new IRenderFactory<EntityBishop>() {
    @Override
    public Render<EntityBishop> createRenderFor(RenderManager manager) {
      return new RenderBishop(manager);
    }
  });
}
 
開發者ID:ToroCraft,項目名稱:ToroChess,代碼行數:9,代碼來源:EntityBishop.java

示例11: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
  RenderingRegistry.registerEntityRenderingHandler(EntityQueen.class, new IRenderFactory<EntityQueen>() {
    @Override
    public Render<EntityQueen> createRenderFor(RenderManager manager) {
      return new RenderQueen(manager);
    }
  });
}
 
開發者ID:ToroCraft,項目名稱:ToroChess,代碼行數:9,代碼來源:EntityQueen.java

示例12: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
	RenderingRegistry.registerEntityRenderingHandler(EntityRainbowKing.class, new IRenderFactory<EntityRainbowKing>() {
		@Override
		public Render<? super EntityRainbowKing> createRenderFor(RenderManager manager) {
			return new RenderRainbowKing(manager);
		}
	});
}
 
開發者ID:ToroCraft,項目名稱:ToroQuest,代碼行數:9,代碼來源:EntityRainbowKing.java

示例13: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
	RenderingRegistry.registerEntityRenderingHandler(EntityShopkeeper.class, new IRenderFactory<EntityShopkeeper>() {
		@Override
		public Render<EntityShopkeeper> createRenderFor(RenderManager manager) {
			return new RenderShopkeeper(manager);
		}
	});
}
 
開發者ID:ToroCraft,項目名稱:ToroQuest,代碼行數:9,代碼來源:EntityShopkeeper.java

示例14: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
	RenderingRegistry.registerEntityRenderingHandler(EntityVillageLord.class, new IRenderFactory<EntityVillageLord>() {
		@Override
		public Render<EntityVillageLord> createRenderFor(RenderManager manager) {
			return new RenderVillageLord(manager);
		}
	});
}
 
開發者ID:ToroCraft,項目名稱:ToroQuest,代碼行數:9,代碼來源:EntityVillageLord.java

示例15: registerRenders

import net.minecraftforge.fml.client.registry.IRenderFactory; //導入依賴的package包/類
public static void registerRenders() {
	RenderingRegistry.registerEntityRenderingHandler(EntityVampireBat.class, new IRenderFactory<EntityVampireBat>() {
		@Override
		public Render<EntityVampireBat> createRenderFor(RenderManager manager) {
			return new RenderVampireBat(manager);
		}
	});
}
 
開發者ID:ToroCraft,項目名稱:ToroQuest,代碼行數:9,代碼來源:EntityVampireBat.java


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