本文整理匯總了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));
}
示例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");
}
}
示例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);
}
}
示例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()));
}
示例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());
}
}
示例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);
}
示例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);
}
}
示例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());
}