本文整理汇总了Java中net.minecraft.init.Blocks.vine方法的典型用法代码示例。如果您正苦于以下问题:Java Blocks.vine方法的具体用法?Java Blocks.vine怎么用?Java Blocks.vine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.init.Blocks
的用法示例。
在下文中一共展示了Blocks.vine方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_94545_a
import net.minecraft.init.Blocks; //导入方法依赖的package包/类
public void func_94545_a()
{
this.func_94542_g();
if (this.fighter.isOnLadder())
{
Block block = this.fighter.worldObj.getBlockState(new BlockPos(this.fighter.posX, this.fighter.getEntityBoundingBox().minY, this.fighter.posZ)).getBlock();
if (block == Blocks.ladder)
{
this.field_94551_f = "ladder";
}
else if (block == Blocks.vine)
{
this.field_94551_f = "vines";
}
}
else if (this.fighter.isInWater())
{
this.field_94551_f = "water";
}
}
示例2: isOnLadder
import net.minecraft.init.Blocks; //导入方法依赖的package包/类
/**
* returns true if this entity is by a ladder, false otherwise
*/
public boolean isOnLadder()
{
int i = MathHelper.floor_double(this.posX);
int j = MathHelper.floor_double(this.getEntityBoundingBox().minY);
int k = MathHelper.floor_double(this.posZ);
Block block = this.worldObj.getBlockState(new BlockPos(i, j, k)).getBlock();
return (block == Blocks.ladder || block == Blocks.vine) && (!(this instanceof EntityPlayer) || !((EntityPlayer)this).isSpectator());
}
示例3: onBlockDestroyed
import net.minecraft.init.Blocks; //导入方法依赖的package包/类
/**
* Called when a Block is destroyed using this Item. Return true to trigger the "Use Item" statistic.
*/
public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLivingBase playerIn)
{
if (blockIn.getMaterial() != Material.leaves && blockIn != Blocks.web && blockIn != Blocks.tallgrass && blockIn != Blocks.vine && blockIn != Blocks.tripwire && blockIn != Blocks.wool)
{
return super.onBlockDestroyed(stack, worldIn, blockIn, pos, playerIn);
}
else
{
stack.damageItem(1, playerIn);
return true;
}
}
示例4: func_150523_a
import net.minecraft.init.Blocks; //导入方法依赖的package包/类
protected boolean func_150523_a(Block p_150523_1_)
{
Material material = p_150523_1_.getMaterial();
return material == Material.air || material == Material.leaves || p_150523_1_ == Blocks.grass || p_150523_1_ == Blocks.dirt || p_150523_1_ == Blocks.log || p_150523_1_ == Blocks.log2 || p_150523_1_ == Blocks.sapling || p_150523_1_ == Blocks.vine;
}