本文整理汇总了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;
}
示例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;
}
示例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);
}
}
}
示例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");
}
示例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;
}