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


Java RenderPlayer.addLayer方法代碼示例

本文整理匯總了Java中net.minecraft.client.renderer.entity.RenderPlayer.addLayer方法的典型用法代碼示例。如果您正苦於以下問題:Java RenderPlayer.addLayer方法的具體用法?Java RenderPlayer.addLayer怎麽用?Java RenderPlayer.addLayer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.client.renderer.entity.RenderPlayer的用法示例。


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

示例1: init

import net.minecraft.client.renderer.entity.RenderPlayer; //導入方法依賴的package包/類
@Override
public void init()
{
    ClientRegistry.registerKeyBinding(keyOpenToolMenu =
            new KeyBinding("key.toolbelt.open", Keyboard.KEY_R, "key.toolbelt.category"));
    //keyOpenToolMenu.

    ClientRegistry.registerKeyBinding(keyCycleToolMenuL =
            new KeyBinding("key.toolbelt.cycle.left", 0, "key.toolbelt.category"));

    ClientRegistry.registerKeyBinding(keyCycleToolMenuR =
            new KeyBinding("key.toolbelt.cycle.right", 0, "key.toolbelt.category"));

    Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();

    RenderPlayer render = skinMap.get("default");
    render.addLayer(new LayerToolBelt(render));

    render = skinMap.get("slim");
    render.addLayer(new LayerToolBelt(render));
}
 
開發者ID:gigaherz,項目名稱:ToolBelt,代碼行數:22,代碼來源:ClientProxy.java

示例2: register

import net.minecraft.client.renderer.entity.RenderPlayer; //導入方法依賴的package包/類
public static void register(Map p_register_0_)
{
    Set set = p_register_0_.keySet();
    boolean flag = false;

    for (Object object : set)
    {
        Object object1 = p_register_0_.get(object);

        if (object1 instanceof RenderPlayer)
        {
            RenderPlayer renderplayer = (RenderPlayer)object1;
            renderplayer.addLayer(new PlayerItemsLayer(renderplayer));
            flag = true;
        }
    }

    if (!flag)
    {
        Config.warn("PlayerItemsLayer not registered");
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:23,代碼來源:PlayerItemsLayer.java

示例3: replaceCapeLayer

import net.minecraft.client.renderer.entity.RenderPlayer; //導入方法依賴的package包/類
private static void replaceCapeLayer(@Nonnull RenderPlayer renderLivingBase) {
  try {
    List<LayerRenderer<AbstractClientPlayer>> value = ReflectionHelper.getPrivateValue(RenderLivingBase.class, renderLivingBase, "layerRenderers",
        "field_177097_h");
    if (value != null) {
      LayerRenderer<AbstractClientPlayer> capeLayer = null;
      for (LayerRenderer<AbstractClientPlayer> layerRenderer : value) {
        if (layerRenderer instanceof LayerCape && !(layerRenderer instanceof CapeFilterLayer)) {
          capeLayer = layerRenderer;
          break;
        }
      }
      if (capeLayer != null) {
        renderLivingBase.addLayer(new CapeFilterLayer(capeLayer));
        value.remove(capeLayer);
      }
    }
  } catch (UnableToAccessFieldException e) {
    Log.warn("Unable to access RenderLivingBase.layerRenderers, reason: " + e);
  }
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:22,代碼來源:UpgradeRenderManager.java

示例4: initializePlayerLayers

import net.minecraft.client.renderer.entity.RenderPlayer; //導入方法依賴的package包/類
public static void initializePlayerLayers()
{
	RenderPlayer slim_render = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("slim");
	slim_render.addLayer(new AccessoriesLayer(true, (ModelPlayer) slim_render.getMainModel()));

	RenderPlayer default_render = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("default");
	default_render.addLayer(new AccessoriesLayer(false, (ModelPlayer) default_render.getMainModel()));
}
 
開發者ID:Modding-Legacy,項目名稱:Aether-Legacy,代碼行數:9,代碼來源:AetherEntityRenderingRegistry.java

示例5: init

import net.minecraft.client.renderer.entity.RenderPlayer; //導入方法依賴的package包/類
@Override
public void init() {
    super.init();
    PacketCustom.assignHandler(EnderStorageCPH.channel, new EnderStorageCPH());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEnderChest.class, new RenderTileEnderChest());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEnderTank.class, new RenderTileEnderTank());

    for (RenderPlayer renderPlayer : Minecraft.getMinecraft().getRenderManager().getSkinMap().values()) {
        renderPlayer.addLayer(new TankLayerRenderer());
    }
}
 
開發者ID:TheCBProject,項目名稱:EnderStorage,代碼行數:12,代碼來源:ProxyClient.java

示例6: init

import net.minecraft.client.renderer.entity.RenderPlayer; //導入方法依賴的package包/類
@Override
public void init(){
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDGhead.class, new TileEntityDirectionalRenderer(new ModelDGhead(), "abyssalcraft:textures/model/depths_ghoul.png"));
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPhead.class, new TileEntityDirectionalRenderer(new ModelDGhead(), "abyssalcraft:textures/model/depths_ghoul_pete.png"));
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWhead.class, new TileEntityDirectionalRenderer(new ModelDGhead(), "abyssalcraft:textures/model/depths_ghoul_wilson.png"));
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOhead.class, new TileEntityDirectionalRenderer(new ModelDGhead(), "abyssalcraft:textures/model/depths_ghoul_orange.png"));
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRitualAltar.class, new TileEntityAltarBlockRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRitualPedestal.class, new TileEntityPedestalBlockRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEnergyPedestal.class, new TileEntityPedestalBlockRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySacrificialAltar.class, new TileEntityAltarBlockRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTieredEnergyPedestal.class, new TileEntityPedestalBlockRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTieredSacrificialAltar.class, new TileEntityAltarBlockRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJzaharSpawner.class, new TileEntityJzaharSpawnerRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRendingPedestal.class, new TileEntityPedestalBlockRenderer());

	RenderPlayer render1 = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("default");
	render1.addLayer(new LayerStarSpawnTentacles(render1));
	RenderPlayer render2 = Minecraft.getMinecraft().getRenderManager().getSkinMap().get("slim");
	render2.addLayer(new LayerStarSpawnTentacles(render2));
	Minecraft.getMinecraft().getItemColors().registerItemColorHandler((stack, tintIndex) -> ACLib.crystalColors[stack.getItemDamage()], ACItems.crystal, ACItems.crystal_shard, ACItems.crystal_fragment, Item.getItemFromBlock(ACBlocks.crystal_cluster));
	Minecraft.getMinecraft().getItemColors().registerItemColorHandler((stack, tintIndex) -> ACLib.crystalColors[stack.getItemDamage() + 16], Item.getItemFromBlock(ACBlocks.crystal_cluster2));
	Minecraft.getMinecraft().getItemColors().registerItemColorHandler((stack, tintIndex) -> 0xE8E8E8, ACItems.coin, ACItems.elder_engraved_coin, ACItems.cthulhu_engraved_coin, ACItems.hastur_engraved_coin, ACItems.jzahar_engraved_coin,
			ACItems.azathoth_engraved_coin, ACItems.nyarlathotep_engraved_coin, ACItems.yog_sothoth_engraved_coin, ACItems.shub_niggurath_engraved_coin);
	Minecraft.getMinecraft().getItemColors().registerItemColorHandler((stack, tintIndex) -> tintIndex == 1  && stack.hasTagCompound() ? SpellRegistry.instance().getSpell(stack.getTagCompound().getString("Spell")).getColor() : 16777215, ACItems.scroll);
	Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler((state, world, pos, tintIndex) -> ACLib.crystalColors[state.getBlock().getMetaFromState(state)], ACBlocks.crystal_cluster);
	Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler((state, world, pos, tintIndex) -> ACLib.crystalColors[state.getBlock().getMetaFromState(state) + 16], ACBlocks.crystal_cluster2);
}
 
開發者ID:Shinoow,項目名稱:AbyssalCraft,代碼行數:28,代碼來源:ClientProxy.java

示例7: onPlayerRenderPre

import net.minecraft.client.renderer.entity.RenderPlayer; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
@SubscribeEvent
public static void onPlayerRenderPre(RenderPlayerEvent.Pre event) {
  final RenderPlayer renderer = event.getRenderer();
  if (renderer != null && !injected.containsKey(renderer)) {
    UpgradeRenderManager.replaceCapeLayer(renderer);
    renderer.addLayer(new UpgradeRenderDispatcher(renderer));
    injected.put(renderer, null);
  }
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:11,代碼來源:UpgradeRenderManager.java

示例8: init_RenderPlayer

import net.minecraft.client.renderer.entity.RenderPlayer; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
@Hook(value = "net.minecraft.client.renderer.entity.RenderPlayer#<init>", type = Hook.Type.TAIL)
public static final void init_RenderPlayer(RenderPlayer renderPlayer, RenderManager renderManager, boolean useSmallArms) {
	renderPlayer.addLayer(new BaublesRenderLayer());
}
 
開發者ID:NekoCaffeine,項目名稱:Alchemy,代碼行數:6,代碼來源:CapabilityBauble.java


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