当前位置: 首页>>代码示例>>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;未经允许,请勿转载。