本文整理了Java中net.minecraft.block.Block.isFullBlock()
方法的一些代码示例,展示了Block.isFullBlock()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.isFullBlock()
方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:isFullBlock
暂无
代码示例来源:origin: DimensionalDevelopment/VanillaFix
@Override
public boolean isFullBlock() {
return block.isFullBlock(this);
}
代码示例来源:origin: DimensionalDevelopment/VanillaFix
@Override
public boolean isFullBlock() {
return normalState.getBlock().isFullBlock(this);
}
代码示例来源:origin: Vazkii/Quark
private int getStrength(IBlockAccess world, BlockPos pos) {
IBlockState state = world.getBlockState(pos);
if(state.getBlock().isFullBlock(state))
return 3;
if(state.getPropertyKeys().contains(SIZE))
return state.getValue(SIZE).strength;
return 0;
}
代码示例来源:origin: SonarSonic/Calculator
private EnumFacing getDefaultFacing(IBlockAccess world, BlockPos pos, IBlockState state) {
if (world != null) {
Iterator<EnumFacing> iterator = EnumFacing.Plane.VERTICAL.iterator();
boolean vertical = false;
do {
if (!iterator.hasNext()) {
vertical = true;
iterator = EnumFacing.Plane.HORIZONTAL.iterator();
}
EnumFacing facing = iterator.next();
IBlockState stateOff = world.getBlockState(pos.offset(facing));
Block block = stateOff.getBlock();
if (block.isFullBlock(stateOff)) {
return facing;
}
} while (iterator.hasNext() || !vertical);
}
return EnumFacing.DOWN;
}
代码示例来源:origin: SonarSonic/Calculator
private EnumFacing getDefaultFacing(IBlockAccess world, BlockPos pos, IBlockState state) {
if (world != null) {
Iterator<EnumFacing> iterator = EnumFacing.Plane.VERTICAL.iterator();
boolean vertical = false;
do {
if (!iterator.hasNext()) {
if (!vertical) {
vertical = true;
iterator = EnumFacing.Plane.HORIZONTAL.iterator();
} else {
return EnumFacing.DOWN;
}
}
EnumFacing facing = iterator.next();
IBlockState stateOff = world.getBlockState(pos.offset(facing));
Block block = stateOff.getBlock();
if (block.isFullBlock(stateOff)) {
return facing;
}
} while (iterator.hasNext() || !vertical);
}
return EnumFacing.DOWN;
}
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
public boolean isBlockSolid(World world, BlockPos pos) {
IBlockState block = world.getBlockState(pos);
if (block.getBlock() == Blocks.LOG || block.getBlock() == Blocks.LOG2 && block.getBlock() == Blocks.LEAVES2 || block.getBlock() == Blocks.LEAVES) {
return false;
}
return block.getBlock().isFullBlock(block);
}
代码示例来源:origin: AlgorithmX2/Chisels-and-Bits
boolean isFullBlock = blk.isFullBlock( state ) || blkClass == BlockStainedGlass.class || blkClass == BlockGlass.class || blk == Blocks.SLIME_BLOCK || blk == Blocks.ICE;
代码示例来源:origin: Vazkii/Quark
private boolean findAndPlaceSpeleothem(Random random, World world, BlockPos pos) {
if(!world.isAirBlock(pos))
return false;
int off = world.provider.isNether() ? -1000 : 0;
boolean up = random.nextBoolean();
EnumFacing diff = (up ? EnumFacing.UP : EnumFacing.DOWN);
if(!up && world.canBlockSeeSky(pos))
return false;
IBlockState stateAt = null;
do {
pos = pos.offset(diff);
stateAt = world.getBlockState(pos);
off++;
} while(pos.getY() > 4 && pos.getY() < 200 && !stateAt.getBlock().isFullBlock(stateAt) && off < 10);
Block type = getSpeleothemType(stateAt);
placeSpeleothem(random, world, pos, type, !up);
return true;
}
代码示例来源:origin: Esteemed-Innovation/Esteemed-Innovation
if (!block.hasTileEntity(state) &&
renderType != EnumBlockRenderType.ENTITYBLOCK_ANIMATED && renderType != EnumBlockRenderType.LIQUID &&
block.isOpaqueCube(state) && (block.isFullBlock(state) || (block == Blocks.GLASS &&
tile instanceof TileEntitySteamPipe))) {
if (tile instanceof TileEntitySteamPipe) {
内容来源于网络,如有侵权,请联系作者删除!