本文整理汇总了Java中thaumcraft.api.ItemApi类的典型用法代码示例。如果您正苦于以下问题:Java ItemApi类的具体用法?Java ItemApi怎么用?Java ItemApi使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemApi类属于thaumcraft.api包,在下文中一共展示了ItemApi类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: render
import thaumcraft.api.ItemApi; //导入依赖的package包/类
@Override
public void render( EntityLivingBase entity, ItemStack stack, String modName, float par2, float par3, float par4, float par5, float par6, float par7 )
{
TextureManager re = Minecraft.getMinecraft().getTextureManager();
ItemStack harnessStack = ItemApi.getItem( "itemHoverHarness", 0 );
Item harnessItem = harnessStack.getItem();
if ( entity instanceof EntityPlayer )
{
EntityPlayer player = ( EntityPlayer ) entity;
harnessStack.setTagCompound( stack.getTagCompound() );
ItemStack old = player.inventory.armorInventory[ 2 ];
player.inventory.armorInventory[ 2 ] = harnessStack;
try
{
re.bindTexture( new ResourceLocation( harnessItem.getArmorTexture( harnessStack, entity, 1, "overlay" ) ) );
harnessItem.getArmorModel( entity, harnessStack, 1 ).render( entity, 0, 0, 0, 0, 0, par7 );
}
finally
{
player.inventory.armorInventory[ 2 ] = old;
}
}
}
开发者ID:spacechase0,项目名称:ComponentEquipment,代码行数:28,代码来源:HoverHarnessRenderer.java
示例2: tickEnd
import thaumcraft.api.ItemApi; //导入依赖的package包/类
@SubscribeEvent
public void tickEnd( RenderTickEvent event )
{
if ( !event.phase.equals( TickEvent.Phase.END ) )
{
return;
}
Minecraft mc = FMLClientHandler.instance().getClient();
if ( mc.currentScreen != null || renderObj == null || renderMethod == null )
{
return;
}
EntityPlayer player = mc.thePlayer;
ItemStack chestplate = player.getCurrentArmor( 2 );
if ( chestplate == null || chestplate.getItem() != ComponentEquipment.items.chestplate )
{
return;
}
ArmorItem armor = ( ArmorItem ) chestplate.getItem();
if ( armor.armor.getModifierLevel( chestplate, "hoverHarness" ) <= 0 )
{
return;
}
ItemStack harnessStack = ItemApi.getItem( "itemHoverHarness", 0 );
harnessStack.setTagCompound( chestplate.getTagCompound() );
try
{
renderMethod.invoke( renderObj, ( Float ) event.renderTickTime, player, System.currentTimeMillis(), harnessStack );
}
catch ( Exception exception )
{
exception.printStackTrace();
}
}
开发者ID:spacechase0,项目名称:ComponentEquipment,代码行数:41,代码来源:HarnessFuelRenderer.java
示例3: init
import thaumcraft.api.ItemApi; //导入依赖的package包/类
@Override
public void init()
{
Material.addType( new ExtraModMaterial( "thaumium", ItemApi.getItem( "itemResource", 2 ), 250, 1.1f, 20, 7.f, 3, 2, 15, EnumChatFormatting.DARK_PURPLE ) );
boreSlotChanger = new ArcaneBoreSlotChanger();
FMLCommonHandler.instance().bus().register( boreSlotChanger );
}
开发者ID:spacechase0,项目名称:ComponentEquipment,代码行数:9,代码来源:Compatibility.java
示例4: getCraftingItem
import thaumcraft.api.ItemApi; //导入依赖的package包/类
@Override
public ItemStack getCraftingItem() {
return ItemApi.getItem("itemGoggles", 0);
}
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:5,代码来源:UpgradeThaumScanner.java
示例5: getCraftingItem
import thaumcraft.api.ItemApi; //导入依赖的package包/类
@Override
public ItemStack getCraftingItem() {
return ItemApi.getItem("itemWandCastingAdept", OreDictionary.WILDCARD_VALUE);
}
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:5,代码来源:UpgradeWand.java
示例6: registerUpgradeRecipes
import thaumcraft.api.ItemApi; //导入依赖的package包/类
@Override
public void registerUpgradeRecipes() {
UpgradeRegistry.registerRecipe(new Recipe(gogglesOfRevealing, "iii", "igi", "iii", 'i', "ingotIron", 'g', ItemApi.getItem("itemGoggles", 0)).setModid("Thaumcraft"));
UpgradeRegistry.registerRecipe(new Recipe(visDiscount, "c c", "ccc", "ccc", 'c', ItemApi.getItem("itemResource", 7)).setModid("Thaumcraft"));
}
开发者ID:chbachman,项目名称:ModularArmour,代码行数:6,代码来源:Thaumcraft.java
示例7: postInit
import thaumcraft.api.ItemApi; //导入依赖的package包/类
@EventHandler // used in 1.6.2
//@PostInit // used in 1.5.2
public void postInit(FMLPostInitializationEvent event) {
// Stub Method
recipes.put("ThaumiumShears", GameRegistry.addShapedRecipe(new ItemStack(thaumiumShearsItem, 1), " S", "S ", Character.valueOf('S'), ItemApi.getItem("itemResource", 2)));
/*GameRegistry.addRecipe(new ItemStack(thaumiumRodItem, 2), "S", "S", Character.valueOf('S'), ItemApi.getItem("itemResource", 2)); */
recipes.put("ThaumiumFishingPole", oreDictRecipe(new ItemStack(thaumiumFishingPoleItem, 1), new Object[] { " T", " TS", "K S", Character.valueOf('T'), ItemApi.getItem("itemResource", 2), Character.valueOf('S'), new ItemStack(Item.silk), Character.valueOf('K'), "stickWood"}));
recipes.put("ThaumiumPoleandCarrot", GameRegistry.addShapedRecipe(new ItemStack(thaumiumPoleandCarrotItem, 1), "F", "C", Character.valueOf('F'), new ItemStack(thaumiumFishingPoleItem), Character.valueOf('C'), new ItemStack(Item.carrot)));
registerResearchItemInfused("InfusedPole", new ItemStack(infusedFishingPoleItem, 1), 3, new AspectList().add(Aspect.WATER, 8).add(Aspect.SENSES, 8).add(Aspect.BEAST,8), new ItemStack(thaumiumFishingPoleItem, 1), ItemApi.getItem("itemShard", 2), ItemApi.getItem("itemShard", 4), new ItemStack(Item.diamond), new ItemStack(Item.compass));
MinecraftForge.EVENT_BUS.register(new RenderTimer());
TTResearchItem ri = new TTResearchItem("MORETHAUMIUM", "ALCHEMY",
(new AspectList()),
-2, 2, 2,
new ItemStack(thaumiumShearsItem, 1));
ri.setTitle("More Thaumium Tools");
ri.setInfo("Shears, Poles, Hammers, Oh My!");
//ri.setSiblings("THAUMIUM");
ri.setAutoUnlock();
ri.setPages(new ResearchPage("You've discovered Thaumium can make all sorts of tools, " +
"and here's a few more. Most Thaumium tools are enchantable, though some enchants " +
"may act differently depending on the tool.\n\n" +
"For example, Efficiency on a Thaumium Fishing Pole will draw fish to the hook " +
"faster, and Silk Touch will ensure the fish keeps the hook in its mouth longer."),
new ResearchPage((IRecipe)recipes.get("ThaumiumShears")),
new ResearchPage((IRecipe)recipes.get("ThaumiumFishingPole")),
new ResearchPage((IRecipe)recipes.get("ThaumiumPoleandCarrot")));
//ri.setConcealed();
ri.registerResearchItem();
//new ResearchItem("MORETHAUMIUM", "ALCHEMY", new AspectList(), -2, 2, 2, new ItemStack(thaumiumShearsItem, 1)).setPages(new ResearchPage[] { new ResearchPage("tc.research_page.MORETHAUMIUM.1"), new ResearchPage((IRecipe)recipes.get("ThaumiumShears")), new ResearchPage((IRecipe)recipes.get("ThaumiumFishingPole")), new ResearchPage((IRecipe)recipes.get("ThaumiumPoleandCarrot"))}).setParents(new String[] { "THAUMIUM" }).registerResearchItem();
TTResearchItem ri2 = new TTResearchItem("INFUSEDPOLE", "ARTIFICE",
(new AspectList().add(Aspect.WATER,2).add(Aspect.SENSES, 2).add(Aspect.BEAST,2)),
-7, 2, 2,
new ItemStack(infusedFishingPoleItem, 1));
ri2.setTitle("Fishing Pole of the Augur");
ri2.setInfo("Fishing with senses!");
ri2.setParentsHidden("MORETHAUMIUM", "INFUSION");
ri2.setConcealed();
ri2.setPages(new ResearchPage("You've discovered how to enchance a Thaumium Fishing Pole so that " +
"you can sense a fish approaching it."),
new ResearchPage((InfusionRecipe)recipes.get("InfusedPole")));
ri2.registerResearchItem();
}
开发者ID:LezChap,项目名称:Thaumic-Tools,代码行数:49,代码来源:ThaumicTools.java
示例8: getIsRepairable
import thaumcraft.api.ItemApi; //导入依赖的package包/类
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
{
return par2ItemStack.isItemEqual((ItemApi.getItem("itemResource",2))) ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
}
开发者ID:LezChap,项目名称:Thaumic-Tools,代码行数:5,代码来源:ItemThaumiumShears.java
注:本文中的thaumcraft.api.ItemApi类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论