本文整理汇总了Java中com.bioxx.tfc.api.TFCItems类的典型用法代码示例。如果您正苦于以下问题:Java TFCItems类的具体用法?Java TFCItems怎么用?Java TFCItems使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TFCItems类属于com.bioxx.tfc.api包,在下文中一共展示了TFCItems类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCrafting
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
@SubscribeEvent
public void onCrafting(ItemCraftedEvent e)
{
ItemStack itemstack = e.crafting;
Item item = itemstack.getItem();
IInventory inventory = e.craftMatrix;
if (item == null || inventory == null) return;
if(inventory != null)
{
if(item == ModItems.itemWoodenTwig)
com.bioxx.tfc.Handlers.CraftingHandler.handleItem(e.player, e.craftMatrix, Recipes.hammers);
if(item == TFCItems.stick)
com.bioxx.tfc.Handlers.CraftingHandler.handleItem(e.player, e.craftMatrix, Recipes.knives);
}
}
示例2: onItemRightClick
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
@Override
public ItemStack onItemRightClick(ItemStack is, World world, EntityPlayer player)
{
MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(world, player, false);
if (mop == null)
return is;
if (mop.typeOfHit == MovingObjectType.BLOCK)
{
int x = mop.blockX;
int y = mop.blockY;
int z = mop.blockZ;
if (!world.canMineBlock(player, x, y, z))
return is;
return new ItemStack(TFCItems.woodenBucketEmpty);
}
return is;
}
示例3: addKnappingAction
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
public addKnappingAction(ItemStack output, String[] pattern, int type)
{
this.outputStack = output;
this.pattern = pattern;
if(type == 0)
this.KnappingIS = new ItemStack(TFCItems.flatClay, 1, 1);
else if(type == 1)
this.KnappingIS = new ItemStack(TFCItems.flatLeather, 1);
else if(type == 2)
this.KnappingIS = new ItemStack(TFCItems.flatRock, 1, OreDictionary.WILDCARD_VALUE);
else if(type == 3)
this.KnappingIS = new ItemStack(TFCItems.flatClay, 1, 3);
this.recipe = createRecipe(outputStack, new Object[] {pattern[0], pattern[1], pattern[2], pattern[3], pattern[4], '#', this.KnappingIS});
}
示例4: removeKnappingAction
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
public removeKnappingAction(ItemStack output, String[] pattern, int type)
{
this.outputStack = output;
this.pattern = pattern;
if(type == 0)
this.KnappingIS = new ItemStack(TFCItems.flatClay, 1, 1);
else if(type == 1)
this.KnappingIS = new ItemStack(TFCItems.flatLeather, 1);
else if(type == 2)
this.KnappingIS = new ItemStack(TFCItems.flatRock, 1, OreDictionary.WILDCARD_VALUE);
else if(type == 3)
this.KnappingIS = new ItemStack(TFCItems.flatClay, 1, 3);
this.recipe = createRecipe(outputStack, new Object[] {pattern[0], pattern[1], pattern[2], pattern[3], pattern[4], '#', this.KnappingIS});
}
示例5: registerFluidContainers
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
public static void registerFluidContainers()
{
// if (FluidRegistry.getFluid("creosote")!= null)
FluidContainerRegistry.registerFluidContainer(new FluidStack(FluidRegistry.getFluid("creosote"), 1000), new ItemStack(TFCPPItems.itemWoodenBucket_Creozote), new ItemStack(TFCItems.woodenBucketEmpty));
// if (FluidRegistry.getFluid("oil")!= null)
FluidContainerRegistry.registerFluidContainer(new FluidStack(FluidRegistry.getFluid("oil"), 1000), new ItemStack(TFCPPItems.itemWoodenBucket_Oil), new ItemStack(TFCItems.woodenBucketEmpty));
FluidContainerRegistry.registerFluidContainer(new FluidStack(fluidLeachedUrainite, 1000), new ItemStack(TFCPPItems.itemRedSteelBucket_LeachedUranite), new ItemStack(TFCItems.redSteelBucketEmpty));
FluidContainerRegistry.registerFluidContainer(new FluidStack(solutionHydrochloricAcid, 1000), new ItemStack(TFCPPItems.itemRedSteelBucket_HydrochloricAcid), new ItemStack(TFCItems.redSteelBucketEmpty));
FluidContainerRegistry.registerFluidContainer(new FluidStack(liquidWeakBlackSteel, 1000), new ItemStack(TFCPPItems.itemBlueSteelBucket_WeakBlackSteel), new ItemStack(TFCItems.blueSteelBucketEmpty));
FluidContainerRegistry.registerFluidContainer(new FluidStack(liquidCarbonBlackSteel, 1000), new ItemStack(TFCPPItems.itemBlueSteelBucket_CarbonBlackSteel), new ItemStack(TFCItems.blueSteelBucketEmpty));
// if (FluidRegistry.getFluid("liquidblacksteel")!= null)
FluidContainerRegistry.registerFluidContainer(new FluidStack(liquidBlackSteel, 1000), new ItemStack(TFCPPItems.itemBlueSteelBucket_BlackSteel), new ItemStack(TFCItems.blueSteelBucketEmpty));
FluidContainerRegistry.registerFluidContainer(new FluidStack(liquidPigIron, 1000), new ItemStack(TFCPPItems.itemBlueSteelBucket_PigIron), new ItemStack(TFCItems.blueSteelBucketEmpty));
// if (FluidRegistry.getFluid("liquidsteel")!= null)
FluidContainerRegistry.registerFluidContainer(new FluidStack(FluidRegistry.getFluid("liquidsteel"), 1000), new ItemStack(TFCPPItems.itemBlueSteelBucket_Steel), new ItemStack(TFCItems.blueSteelBucketEmpty));
FluidContainerRegistry.registerFluidContainer(new FluidStack(fluidMundanePotion, 1000), new ItemStack(Items.potionitem,1,8192), new ItemStack(Items.glass_bottle));
FluidContainerRegistry.registerFluidContainer(new FluidStack(fluidAwkwardPotion, 1000), new ItemStack(Items.potionitem,1,16), new ItemStack(Items.glass_bottle));
// FluidContainerRegistry.registerFluidContainer(new FluidStack(liquidPigIron, 1000), new ItemStack(TFCPPItems.itemBlueSteelBucket_PigIron), new ItemStack(TFCItems.blueSteelBucketEmpty));
}
示例6: setupFluids
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
public void setupFluids()
{
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(TFCFluids.OLIVEOIL.getName()), new ItemStack(TFPItems.CustomBucketOliveOil), new ItemStack(TFCItems.woodenBucketEmpty));
if(Loader.isModLoaded("BuildCraft|Core"))
{
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(BuildCraftEnergy.fluidOil.getName()), new ItemStack(TFPItems.CustomBucketOil), new ItemStack(TFCItems.woodenBucketEmpty));
}
if(Loader.isModLoaded("necromancy"))
{
FluidContainerRegistry.registerFluidContainer(new FluidStack(TFPFluids.tfpFluidBlood, 1000), new ItemStack(TFPItems.CustomBucketBlood), new ItemStack(TFCItems.woodenBucketEmpty));
FluidContainerRegistry.registerFluidContainer(new FluidStack(TFPFluids.tfpFluidBlood, 250), ItemGeneric.getItemStackFromName("Jar of Blood"), new ItemStack(TFCItems.glassBottle));
}
if(Loader.isModLoaded("steamcraft2"))
{
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(TFPFluids.tfpFluidWhaleOil.getName()), new ItemStack(TFPItems.CustomBucketWhaleOil), new ItemStack(TFCItems.woodenBucketEmpty));
}
}
示例7: addInformation
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack is, EntityPlayer player, List arraylist, boolean flag)
{
ItemTerra.addSizeInformation(is, arraylist);
if (is.hasTagCompound())
{
if(TFC_ItemHeat.hasTemp(is))
{
float temp = TFC_ItemHeat.getTemp(is);
float meltTemp = TFC_ItemHeat.isCookable(is);
if(meltTemp != -1)
{
if(is.getItem() == TFCItems.stick)
arraylist.add(TFC_ItemHeat.getHeatColorTorch(temp, meltTemp));
else
arraylist.add(TFC_ItemHeat.getHeatColor(temp, meltTemp));
}
}
}
}
示例8: registerLanternRecipes
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
private static void registerLanternRecipes()
{
ItemStack stick = new ItemStack(TFCItems.stick, 1);
ItemStack yarn = new ItemStack(TFCItems.woolYarn, 1);
ItemStack glassPane = new ItemStack(Blocks.glass_pane, 1);
for(int i = 0; i < Constants.Lanterns.length; i++)
{
ItemStack lantern = new ItemStack(BlockList.Lanterns[i], 2);
Item lanternCore = ItemList.LanternCores[i];
for(int k = 0; k < FluidList.AlcoholFluids.length; k++)
{
ItemStack coreFilled = new ItemStack(lanternCore, 1, k + 1);
GameRegistry.addRecipe(lantern, new Object[] { "tgy", "gsg", "tgy", Character.valueOf('g'), glassPane, Character.valueOf('s'), coreFilled, Character.valueOf('t'), stick, Character.valueOf('y'), yarn });
GameRegistry.addRecipe(lantern, new Object[] { "ygt", "gsg", "ygt", Character.valueOf('g'), glassPane, Character.valueOf('s'), coreFilled, Character.valueOf('t'), stick, Character.valueOf('y'), yarn });
}
}
}
示例9: registerMudBrickRecipes
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
private static void registerMudBrickRecipes()
{
for(int i = 0; i < 16; i++)
{
GameRegistry.addShapelessRecipe(new ItemStack(BlockList.MudBrickRaws[i], 1, 0), new Object[] { new ItemStack(TFCBlocks.dirt, 1, i), new ItemStack(TFCItems.clayBall, 1, 0), new ItemStack(TFCItems.straw) });
GameRegistry.addShapelessRecipe(new ItemStack(BlockList.MudBrickRaws[i], 1, 0), new Object[] { new ItemStack(TFCBlocks.sand, 1, i), new ItemStack(TFCItems.clayBall, 1, 0), new ItemStack(TFCItems.straw) });
}
for(int i = 0; i < Global.STONE_ALL.length - 16; i++)
{
GameRegistry.addShapelessRecipe(new ItemStack(BlockList.MudBrickRaws[16 + i], 1, 0), new Object[] { new ItemStack(TFCBlocks.dirt2, 1, i), new ItemStack(TFCItems.clayBall, 1, 0), new ItemStack(TFCItems.straw) });
GameRegistry.addShapelessRecipe(new ItemStack(BlockList.MudBrickRaws[16 + i], 1, 0), new Object[] { new ItemStack(TFCBlocks.sand2, 1, i), new ItemStack(TFCItems.clayBall, 1, 0), new ItemStack(TFCItems.straw) });
}
for(int i = 0; i < 16; i++)
GameRegistry.addRecipe(new ItemStack(BlockList.MudBricks, 4, i), new Object[] { "mm", "mm", Character.valueOf('m'), new ItemStack(BlockList.MudBrickRaws[i], 1, 1) });
for(int i = 0; i < Global.STONE_ALL.length - 16; i++)
GameRegistry.addRecipe(new ItemStack(BlockList.MudBricks2, 4, i), new Object[] { "mm", "mm", Character.valueOf('m'), new ItemStack(BlockList.MudBrickRaws[16 + i], 1, 1) });
}
示例10: registerFluidContainers
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
public static void registerFluidContainers()
{
if(DecorationsMod.isLanternsEnabled)
{
for(int i = 0; i < Constants.Lanterns.length; i++)
{
Item core = ItemList.LanternCores[i];
ItemStack coreEmpty = new ItemStack(core, 1, 0);
for(int k = 0; k < FluidList.AlcoholFluids.length; k++)
{
FluidStack fluid = new FluidStack(AlcoholFluids[k], 2000);
ItemStack coreFilled = new ItemStack(core, 1, k + 1);
FluidContainerRegistry.registerFluidContainer(fluid, coreFilled, coreEmpty);
}
}
}
FluidContainerRegistry.registerFluidContainer(new FluidStack(Plaster, 1000), new ItemStack(ItemList.Plaster), new ItemStack(TFCItems.woodenBucketEmpty));
for(int i = 0; i < LiquidDyes.length; i++)
FluidContainerRegistry.registerFluidContainer(new FluidStack(LiquidDyes[i], 1000), new ItemStack(ItemList.LiquidDye, 1, i), new ItemStack(TFCItems.woodenBucketEmpty));
}
示例11: onItemRightClick
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
@Override
public ItemStack onItemRightClick(ItemStack is, World world, EntityPlayer player)
{
MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(world, player, false);
if (mop == null)
return is;
if (mop.typeOfHit == MovingObjectType.BLOCK)
{
int x = mop.blockX;
int y = mop.blockY;
int z = mop.blockZ;
if (!world.canMineBlock(player, x, y, z))
return is;
return new ItemStack(TFCItems.woodenBucketEmpty);
}
return is;
}
示例12: loadItems
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
public static void loadItems() {
CellarDoorItem = new ItemCellarDoor();
BismuthBronzeIceSawHead = new ItemIceSawHead().setUnlocalizedName("BismuthBronzeIceSawBlade");
BlackBronzeIceSawHead = new ItemIceSawHead().setUnlocalizedName("BlackBronzeIceSawBlade");
BlackSteelIceSawHead = new ItemIceSawHead().setUnlocalizedName("BlackSteelIceSawBlade");
BlueSteelIceSawHead = new ItemIceSawHead().setUnlocalizedName("BlueSteelIceSawBlade");
BronzeIceSawHead = new ItemIceSawHead().setUnlocalizedName("BronzeIceSawBlade");
CopperIceSawHead = new ItemIceSawHead().setUnlocalizedName("CopperIceSawBlade");
WroughtIronIceSawHead = new ItemIceSawHead().setUnlocalizedName("WroughtIronIceSawBlade");
RedSteelIceSawHead = new ItemIceSawHead().setUnlocalizedName("RedSteelIceSawBlade");
SteelIceSawHead = new ItemIceSawHead().setUnlocalizedName("SteelIceSawBlade");
BismuthBronzeIceSaw = new ItemIceSaw(TFCItems.bismuthBronzeToolMaterial).setUnlocalizedName("BismuthBronzeIceSaw").setMaxDamage(TFCItems.bismuthBronzeUses);
BlackBronzeIceSaw = new ItemIceSaw(TFCItems.blackBronzeToolMaterial).setUnlocalizedName("BlackBronzeIceSaw").setMaxDamage(TFCItems.blackBronzeUses);
BlackSteelIceSaw = new ItemIceSaw(TFCItems.blackSteelToolMaterial).setUnlocalizedName("BlackSteelIceSaw").setMaxDamage(TFCItems.blackSteelUses);
BlueSteelIceSaw = new ItemIceSaw(TFCItems.blueSteelToolMaterial).setUnlocalizedName("BlueSteelIceSaw").setMaxDamage(TFCItems.blueSteelUses);
BronzeIceSaw = new ItemIceSaw(TFCItems.bronzeToolMaterial).setUnlocalizedName("BronzeIceSaw").setMaxDamage(TFCItems.bronzeUses);
CopperIceSaw = new ItemIceSaw(TFCItems.copperToolMaterial).setUnlocalizedName("CopperIceSaw").setMaxDamage(TFCItems.copperUses);
WroughtIronIceSaw = new ItemIceSaw(TFCItems.ironToolMaterial).setUnlocalizedName("WroughtIronIceSaw").setMaxDamage(TFCItems.wroughtIronUses);
RedSteelIceSaw = new ItemIceSaw(TFCItems.redSteelToolMaterial).setUnlocalizedName("RedSteelIceSaw").setMaxDamage(TFCItems.redSteelUses);
SteelIceSaw = new ItemIceSaw(TFCItems.steelToolMaterial).setUnlocalizedName("SteelIceSaw").setMaxDamage(TFCItems.steelUses);
}
示例13: registerAnvilRecipes
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
public static void registerAnvilRecipes() {
String iceSawPlan = "icesaw";
Map map = AnvilManager.getInstance().getPlans();
if(map.containsKey(iceSawPlan)) {
return;
}
if(AnvilManager.world == null) {
return;
}
AnvilManager manager = AnvilManager.getInstance();
manager.addPlan(iceSawPlan, new PlanRecipe(new RuleEnum[]{RuleEnum.HITLAST, RuleEnum.UPSETSECONDFROMLAST, RuleEnum.DRAWNOTLAST}));
manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bismuthBronzeIngot2x), null, iceSawPlan, false, AnvilReq.BISMUTHBRONZE, new ItemStack(BismuthBronzeIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackBronzeIngot2x), null, iceSawPlan, false, AnvilReq.BLACKBRONZE, new ItemStack(BlackBronzeIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackSteelIngot2x), null, iceSawPlan, false, AnvilReq.BLACKSTEEL, new ItemStack(BlackSteelIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blueSteelIngot2x), null, iceSawPlan, false, AnvilReq.BLUESTEEL, new ItemStack(BlueSteelIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bronzeIngot2x), null, iceSawPlan, false, AnvilReq.BRONZE, new ItemStack(BronzeIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.copperIngot2x), null, iceSawPlan, false, AnvilReq.COPPER, new ItemStack(CopperIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.wroughtIronIngot2x), null, iceSawPlan, false, AnvilReq.WROUGHTIRON, new ItemStack(WroughtIronIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.redSteelIngot2x), null, iceSawPlan, false, AnvilReq.REDSTEEL, new ItemStack(RedSteelIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.steelIngot2x), null, iceSawPlan, false, AnvilReq.STEEL, new ItemStack(SteelIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
}
示例14: sandwichStack
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
public ItemStack sandwichStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
{
NBTTagCompound tag = accessor.getNBTData();
String breadType = tag.getString("breadType");
int breadMeta = 0;
if(TFCItems.cornBread.getUnlocalizedName().equals(breadType))
breadMeta = 1;
else if(TFCItems.oatBread.getUnlocalizedName().equals(breadType))
breadMeta = 2;
else if(TFCItems.riceBread.getUnlocalizedName().equals(breadType))
breadMeta = 3;
else if(TFCItems.ryeBread.getUnlocalizedName().equals(breadType))
breadMeta = 4;
else if(TFCItems.wheatBread.getUnlocalizedName().equals(breadType))
breadMeta = 5;
ItemStack stack = ItemTFCMealTransform.createTag(new ItemStack(CWTFCItems.ChickenSandwich, 1, breadMeta), 999, -24, new ItemStack[]{}, new float[]{});
return stack;
}
示例15: registerOres
import com.bioxx.tfc.api.TFCItems; //导入依赖的package包/类
protected static void registerOres()
{
final int WILD = OreDictionary.WILDCARD_VALUE;
//Flour
OreDictionary.registerOre("itemFlour", TFCItems.barleyGround);
OreDictionary.registerOre("itemFlour", TFCItems.cornmealGround);
OreDictionary.registerOre("itemFlour", TFCItems.oatGround);
OreDictionary.registerOre("itemFlour", TFCItems.riceGround);
OreDictionary.registerOre("itemFlour", TFCItems.ryeGround);
OreDictionary.registerOre("itemFlour", TFCItems.wheatGround);
//Bread
OreDictionary.registerOre("itemBread", TFCItems.barleyBread);
OreDictionary.registerOre("itemBread", TFCItems.cornBread);
OreDictionary.registerOre("itemBread", TFCItems.oatBread);
OreDictionary.registerOre("itemBread", TFCItems.riceBread);
OreDictionary.registerOre("itemBread", TFCItems.ryeBread);
OreDictionary.registerOre("itemBread", TFCItems.wheatBread);
//Wood
OreDictionary.registerOre("logWood", new ItemStack(CWTFCItems.logs, 1, WILD));
OreDictionary.registerOre("woodLumber", new ItemStack(CWTFCItems.singlePlank, 1, WILD));
OreDictionary.registerOre("treeSapling", new ItemStack(CWTFCBlocks.customSapling, 1, WILD));
OreDictionary.registerOre("plankWood", new ItemStack(CWTFCBlocks.woodPlank, 1, WILD));
}