本文整理汇总了Java中net.minecraft.block.BlockFence.func_149825_a方法的典型用法代码示例。如果您正苦于以下问题:Java BlockFence.func_149825_a方法的具体用法?Java BlockFence.func_149825_a怎么用?Java BlockFence.func_149825_a使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.BlockFence
的用法示例。
在下文中一共展示了BlockFence.func_149825_a方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onNeighborBlockChange
import net.minecraft.block.BlockFence; //导入方法依赖的package包/类
/**
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
* their own) Args: x, y, z, neighbor Block
*/
public void onNeighborBlockChange(World world, int x, int y, int z, Block p_149695_5_)
{
boolean flag = false;
if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) && !BlockFence.func_149825_a(world.getBlock(x, y - 1, z)))
{
flag = true;
}
if (flag)
{
this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
world.setBlockToAir(x, y, z);
}
}
示例2: onNeighborBlockChange
import net.minecraft.block.BlockFence; //导入方法依赖的package包/类
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighborBlock) {
boolean flag = false;
if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) && !BlockFence.func_149825_a(world.getBlock(x, y - 1, z))) {
flag = true;
}
if (flag) {
this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
world.setBlockToAir(x, y, z);
}
}
示例3: canPlaceBlockAt
import net.minecraft.block.BlockFence; //导入方法依赖的package包/类
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
return World.doesBlockHaveSolidTopSurface(world, x, y - 1, z) || BlockFence.func_149825_a(world.getBlock(x, y - 1, z));
}
示例4: isBlockAFence
import net.minecraft.block.BlockFence; //导入方法依赖的package包/类
public static boolean isBlockAFence(Block block)
{
return block == Fence || block == Fence2 || BlockFence.func_149825_a(block);
}
示例5: canPlaceBlockAt
import net.minecraft.block.BlockFence; //导入方法依赖的package包/类
/**
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
*/
public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
{
return World.doesBlockHaveSolidTopSurface(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) || BlockFence.func_149825_a(p_149742_1_.getBlock(p_149742_2_, p_149742_3_ - 1, p_149742_4_));
}