本文整理匯總了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_));
}