当前位置: 首页>>代码示例>>Java>>正文


Java TFCItems.woodenBucketEmpty方法代码示例

本文整理汇总了Java中com.bioxx.tfc.api.TFCItems.woodenBucketEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java TFCItems.woodenBucketEmpty方法的具体用法?Java TFCItems.woodenBucketEmpty怎么用?Java TFCItems.woodenBucketEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.bioxx.tfc.api.TFCItems的用法示例。


在下文中一共展示了TFCItems.woodenBucketEmpty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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;
}
 
开发者ID:Wahazar,项目名称:TFCPrimitiveTech,代码行数:23,代码来源:WoodenBucket_BasePotashLiquor.java

示例2: 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;
}
 
开发者ID:Aleksey-Terzi,项目名称:DecorationsTFC,代码行数:26,代码来源:ItemPlaster.java

示例3: onFillBucket

import com.bioxx.tfc.api.TFCItems; //导入方法依赖的package包/类
@SubscribeEvent
public void onFillBucket(FillBucketEvent event)
{
	ItemStack itemInHand = event.entityPlayer.getCurrentEquippedItem();

	if(event.getResult() != Result.DENY && itemInHand.getItem() == TFCItems.woodenBucketEmpty)
	{
		if(event.result != null && event.result.getItem() == BuildCraftEnergy.bucketOil)
		{
			event.result = new ItemStack(TFPItems.CustomBucketOil);
		}
	}
}
 
开发者ID:StrayWolfe,项目名称:TerrafirmaPunk-Tweaks,代码行数:14,代码来源:PlayerInteractionHandler.java

示例4: registerItems

import com.bioxx.tfc.api.TFCItems; //导入方法依赖的package包/类
private static void registerItems() {
	GameRegistry.registerItem(WoodenCreosoteBucket, "woodenCreosoteBucket");
	FluidContainerRegistry.FluidContainerData container = new FluidContainerRegistry.FluidContainerData(Fluids.CREOSOTE.get(1000), new ItemStack(WoodenCreosoteBucket), new ItemStack(TFCItems.woodenBucketEmpty));
	FluidContainerRegistry.registerFluidContainer(container);
	
	GameRegistry.registerItem(WoodenMinecartChest, "woodenMinecartChest");
}
 
开发者ID:vidaj,项目名称:TFCRailcraft,代码行数:8,代码来源:ModItems.java

示例5: getContainerItem

import com.bioxx.tfc.api.TFCItems; //导入方法依赖的package包/类
@Override
public ItemStack getContainerItem(ItemStack is)
{
	if(is.getItemDamage() == 0)
		return new ItemStack(TFCItems.woodenBucketEmpty);
	else if(is.getItemDamage() == 2 || is.getItemDamage() == 3 || is.getItemDamage() == 4)
		return new ItemStack(BCTFCItems.Buckets, 1, 1);
	else if(is.getItemDamage() == 6 || is.getItemDamage() == 7)
		return new ItemStack(BCTFCItems.Buckets, 1, 5);

	return null;
}
 
开发者ID:emris,项目名称:BCTFCcrossover,代码行数:13,代码来源:ItemBuckets.java


注:本文中的com.bioxx.tfc.api.TFCItems.woodenBucketEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。