本文整理匯總了Java中net.minecraftforge.fml.client.registry.RenderingRegistry類的典型用法代碼示例。如果您正苦於以下問題:Java RenderingRegistry類的具體用法?Java RenderingRegistry怎麽用?Java RenderingRegistry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RenderingRegistry類屬於net.minecraftforge.fml.client.registry包,在下文中一共展示了RenderingRegistry類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
@Override
public void init() {
for (Fluid fluid : Fluids.FLUIDS) {
ModelLoader.setBucketModelDefinition(Fluids.getBucket(fluid));
}
ThirdPartyManager.instance().clientInit();
RenderingRegistry.registerEntityRenderingHandler(EntityRing.class, RenderEntityRing.FACTORY);
EntityRegistry.registerModEntity(RL("ring"), EntityRing.class, Names.MOD_ID + ".ring", 100, PneumaticCraftRepressurized.instance, 80, 1, true);
registerModuleRenderers();
Blockss.setupColorHandlers();
BlockColorHandler.registerColorHandlers();
ItemColorHandler.registerColorHandlers();
super.init();
}
示例2: preInit
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
@Override
public void preInit() {
super.preInit();
GuiWirelessSniffer.loadColours(SaveManager.config().getTag("addon"));
TextureUtils.addIconRegister(new RenderWireless());
TextureUtils.addIconRegister(new RemoteTexManager());
TextureUtils.addIconRegister(new TriangTexManager());
PacketCustom.assignHandler(NET_CHANNEL, new WRClientPH());
MapRenderRegistry.registerMapRenderer(ModItems.itemWirelessMap, new WirelessMapRenderer());
RenderingRegistry.registerEntityRenderingHandler(EntityREP.class, manager -> new RenderSnowball<>(manager, itemRep, Minecraft.getMinecraft().getRenderItem()));
RenderingRegistry.registerEntityRenderingHandler(EntityWirelessTracker.class, RenderTracker::new);
registerModels();
}
示例3: preInitMod
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
@Override
public void preInitMod()
{
super.preInitMod();
iChunUtil.proxy.registerMinecraftKeyBind(Minecraft.getMinecraft().gameSettings.keyBindUseItem);
Torched.eventHandlerClient = new EventHandlerClient();
MinecraftForge.EVENT_BUS.register(Torched.eventHandlerClient);
RenderingRegistry.registerEntityRenderingHandler(EntityTorch.class, new RenderTorch.RenderFactory());
RenderingRegistry.registerEntityRenderingHandler(EntityTorchFirework.class, new RenderTorchFirework.RenderFactory());
}
示例4: registerModels
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
public void registerModels()
{
ItemModels.register();
//BlockModels.register();
ModelLoader.setCustomStateMapper(ModBlocks.thorns,new StateMap.Builder().ignore(BlockThorns.FACING).build());
ModelLoader.setCustomStateMapper(ModBlocks.brine, new BrineStateMapper());
ModelLoader.setCustomStateMapper(ModBlocks.aqueductWater, new StateMapperBase() {
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
return aqueductWaterLocation;
}
});
RenderingRegistry.registerEntityRenderingHandler(EntityGreatarrow.class, RenderGreatarrow.GREATARROW_RENDER);
RenderingRegistry.registerEntityRenderingHandler(EntityYa.class, RenderYa.YA_RENDER);
RenderingRegistry.registerEntityRenderingHandler(EntitySpirit.class, manager -> new RenderSpirit(manager));
RenderingRegistry.registerEntityRenderingHandler(EntityAncestryBottle.class, manager -> new RenderSnowball<>(manager,ModItems.ancestryBottle,Minecraft.getMinecraft().getRenderItem()));
RenderingRegistry.registerEntityRenderingHandler(EntityArtifactFrame.class, RenderArtifactFrame.ARTIFACEFRAME_RENDER);
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAlchDragon.class, new RenderAlchDragon());
}
示例5: register
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的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;
}
});
}
示例6: preInit
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
@Override
public void preInit(FMLPreInitializationEvent event) {
super.preInit(event);
OBJLoader.INSTANCE.addDomain(Constants.MOD_ID);
LaserRenderer.INSTANCE.getClass();
ScrewdriverOverlay.INSTANCE.getClass();
GunOverlay.INSTANCE.getClass();
EventHandlerClient.INSTANCE.getClass(); // ditto
ModBlocks.initModels();
ModItems.initModels();
RenderingRegistry.registerEntityRenderingHandler(EntityLaserPointer.class, RenderLaserPoint::new);
RenderingRegistry.registerEntityRenderingHandler(EntityPlasma.class, RenderPlasma::new);
RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, manager -> new RenderGrenade(manager, ModItems.GRENADE, Minecraft.getMinecraft().getRenderItem()));
}
示例7: preInit
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的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();
}
示例8: registerRendering
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
@SideOnly(Side.CLIENT)
public static void registerRendering() {
// living
RenderingRegistry.registerEntityRenderingHandler(EntityLCZombie.class, RenderLCZombie.FACTORY);
RenderingRegistry.registerEntityRenderingHandler(EntityDemonSoldier.class, RenderDemonSoldier.FACTORY);
RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldSlime.class, RenderUnderworldSlime.FACTORY);
RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldSkeleton.class, RenderUnderworldSkeleton.FACTORY);
RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldSilverfish.class, RenderUnderworldSilverfish.FACTORY);
RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldGhast.class, RenderUnderworldGhast.FACTORY);
RenderingRegistry.registerEntityRenderingHandler(EntityUnderworldCreeper.class, RenderUnderworldCreeper.FACTORY);
// non-living
RenderingRegistry.registerEntityRenderingHandler(EntityLCTNTPrimed.class, RenderLCTNTPrimed.FACTORY);
RenderingRegistry.registerEntityRenderingHandler(EntityLCElectricAttack.class, RenderLCElectricAttack.FACTORY);
}
示例9: registerEntities
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
private void registerEntities() {
//minecarts
//http://wiki.mcjty.eu/modding/index.php/Mobs-1.9
RenderingRegistry.registerEntityRenderingHandler(EntityGoldMinecart.class, RenderCyclicMinecart.FACTORY_GOLD);
RenderingRegistry.registerEntityRenderingHandler(EntityGoldFurnaceMinecart.class, RenderCyclicMinecart.FACTORY_GOLD_FURNACE);
RenderingRegistry.registerEntityRenderingHandler(EntityStoneMinecart.class, RenderCyclicMinecart.FACTORY_STONE_FURNACE);
RenderingRegistry.registerEntityRenderingHandler(EntityMinecartTurret.class, RenderCyclicMinecart.FACTORY_TURRET);
//the projectiles too
RenderingRegistry.registerEntityRenderingHandler(EntityLightningballBolt.class, new FactoryLightning());
RenderingRegistry.registerEntityRenderingHandler(EntitySnowballBolt.class, new FactorySnow());
RenderingRegistry.registerEntityRenderingHandler(EntityTorchBolt.class, new FactoryTorch());
RenderingRegistry.registerEntityRenderingHandler(EntityFishingBolt.class, new FactoryFish());
RenderingRegistry.registerEntityRenderingHandler(EntityShearingBolt.class, new FactoryShear());
RenderingRegistry.registerEntityRenderingHandler(EntityDungeonEye.class, new FactoryDungeon());
RenderingRegistry.registerEntityRenderingHandler(EntityDynamite.class, new FactoryDyn());
RenderingRegistry.registerEntityRenderingHandler(EntityBlazeBolt.class, new FactoryFire());
RenderingRegistry.registerEntityRenderingHandler(EntityDynamiteMining.class, new FactoryDynMining());
RenderingRegistry.registerEntityRenderingHandler(EntityDynamiteBlockSafe.class, new FactoryDynSafe());
RenderingRegistry.registerEntityRenderingHandler(EntityMagicNetFull.class, new FactoryBall());
RenderingRegistry.registerEntityRenderingHandler(EntityMagicNetEmpty.class, new FactoryBallEmpty());
RenderingRegistry.registerEntityRenderingHandler(EntityHomingProjectile.class, new FactoryMissile());
RenderingRegistry.registerEntityRenderingHandler(EntityEnderEyeUnbreakable.class, new EntityEnderEyeUnbreakable.FactoryMissile());
}
示例10: init
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
public static void init()
{
RenderingRegistry.registerEntityRenderingHandler(EntityDodoEgg.class,
new RenderSnowball(Minecraft.getMinecraft().getRenderManager(),
ARKCraftItems.dodo_egg, Minecraft.getMinecraft()
.getRenderItem()));
RenderingRegistry.registerEntityRenderingHandler(EntityRaptor.class,
new RenderRaptor(new ModelRaptor(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(
EntitySabertooth.class, new RenderSabertooth(
new ModelSabertooth(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityDodo.class,
new RenderDodo(new ModelDodo(), 0.3F));
RenderingRegistry.registerEntityRenderingHandler(
EntityBrontosaurus.class, new RenderBrontosaurus(
new ModelBrontosaurus(), 0.5f));
}
示例11: registerTileEntities
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
@Override
public void registerTileEntities() {
super.registerTileEntities();
IReloadableResourceManager IRRM = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
IRRM.registerReloadListener(this);
RenderManager rm = Minecraft.getMinecraft().getRenderManager();
RenderingRegistry.registerEntityRenderingHandler(EntityStone.class, new RenderEntityStone());
RenderingRegistry.registerEntityRenderingHandler(EntityMobHorse.class, new RenderHorse(rm, new ModelHorse(), 0.75f));
RenderingRegistry.registerEntityRenderingHandler(EntityForestSpider.class, new RenderForestSpider(rm));
RenderingRegistry.registerEntityRenderingHandler(EntityCoalPoweredMinecartVC.class, new RenderMinecart(rm));
RenderingRegistry.registerEntityRenderingHandler(EntityEmptyMinecartVC.class, new RenderMinecart(rm));
RenderingRegistry.registerEntityRenderingHandler(EntityCowVC.class, new RenderCow(rm, new ModelCowVC(), 0.7F));
RenderingRegistry.registerEntityRenderingHandler(EntitySheepVC.class, new RenderSheep(rm, new ModelSheep2(), 0.7F));
}
示例12: onPreInit
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
@Override
public void onPreInit(FMLPreInitializationEvent event) {
super.onPreInit(event);
// register dragon entity renderer
RenderingRegistry.registerEntityRenderingHandler(
EntityTameableDragon.class, DragonRenderer::new);
// register item renderer for dragon egg block variants
ResourceLocation eggModelItemLoc = new ResourceLocation(DragonMounts.AID, "dragon_egg");
Item itemBlockDragonEgg = Item.REGISTRY.getObject(eggModelItemLoc);
EnumDragonBreed.META_MAPPING.forEach((breed, meta) -> {
ModelResourceLocation eggModelLoc = new ModelResourceLocation(DragonMounts.AID + ":dragon_egg", "breed=" + breed.getName());
ModelLoader.setCustomModelResourceLocation(itemBlockDragonEgg, meta, eggModelLoc);
});
}
示例13: registerRenders
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
@Override
public void registerRenders(){
super.registerRenders();
RenderingRegistry.registerEntityRenderingHandler(EntityRook.class, new RenderChessPiece(new ModelRook(), 0.3F));
RenderingRegistry.registerEntityRenderingHandler(EntityKing.class, new RenderChessPiece(new ModelKing(), 0.3F));
RenderingRegistry.registerEntityRenderingHandler(EntityPawn.class, new RenderChessPiece(new ModelPawn(), 0.3F));
RenderingRegistry.registerEntityRenderingHandler(EntityKnight.class, new RenderChessPiece(new ModelKnight(), 0.3F));
RenderingRegistry.registerEntityRenderingHandler(EntityQueen.class, new RenderChessPiece(new ModelQueen(), 0.3F));
RenderingRegistry.registerEntityRenderingHandler(EntityBishop.class, new RenderChessPiece(new ModelBishop(), 0.3F));
RenderingRegistry.registerEntityRenderingHandler(EntityPickyXPOrb.class, new RenderXPOrb(Minecraft.getMinecraft().getRenderManager()));
MinecraftForge.EVENT_BUS.register(new MineChessDrawBlockHighlightHandler());
String[] names = new String[5];
for(int i = 0; i < 5; i++) {
String name = "chessmod:" + new ItemStack(MineChess.itemPieceMover, 1, i).getUnlocalizedName().substring(5);
names[i] = name;
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(MineChess.itemPieceMover, i, new ModelResourceLocation(name, "inventory"));
}
ModelBakery.addVariantName(MineChess.itemPieceMover, names);
}
示例14: registerEntityRenders
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的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);
}});
}
示例15: registerRenders
import net.minecraftforge.fml.client.registry.RenderingRegistry; //導入依賴的package包/類
private void registerRenders() {
RenderingRegistry.registerEntityRenderingHandler(EntityBrew.class, BrewRenderer::new);
RenderingRegistry.registerEntityRenderingHandler(EntityBrewLinger.class, EmptyRenderer::new);
RenderingRegistry.registerEntityRenderingHandler(EntitySpellCarrier.class, SpellRenderer::new);
ClientRegistry.bindTileEntitySpecialRenderer(TileCauldron.class, new TileRenderCauldron());
}