當前位置: 首頁>>代碼示例>>Java>>正文


Java BlockFence.func_149825_a方法代碼示例

本文整理匯總了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);
    }
}
 
開發者ID:static7s,項目名稱:RTM,代碼行數:20,代碼來源:BlockPressureBlockWIP.java

示例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);
	}
}
 
開發者ID:TeamMonumental,項目名稱:FusionWarfare,代碼行數:14,代碼來源:BlockNetworkBeacon.java

示例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));
}
 
開發者ID:TeamMonumental,項目名稱:FusionWarfare,代碼行數:4,代碼來源:BlockNetworkBeacon.java

示例4: isBlockAFence

import net.minecraft.block.BlockFence; //導入方法依賴的package包/類
public static boolean isBlockAFence(Block block)
{
	return block == Fence || block == Fence2 || BlockFence.func_149825_a(block);
}
 
開發者ID:vidaj,項目名稱:TFCWaterCompatibility,代碼行數:5,代碼來源:TFCBlocks.java

示例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_));
}
 
開發者ID:static7s,項目名稱:RTM,代碼行數:8,代碼來源:BlockPressureSensorWIP.java


注:本文中的net.minecraft.block.BlockFence.func_149825_a方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。