net.minecraft.block.Block.isFullCube()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中net.minecraft.block.Block.isFullCube()方法的一些代码示例,展示了Block.isFullCube()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.isFullCube()方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:isFullCube

Block.isFullCube介绍

暂无

代码示例

代码示例来源:origin: DimensionalDevelopment/VanillaFix

@Override
public boolean isFullCube() {
  return block.isFullCube(this);
}

代码示例来源:origin: DimensionalDevelopment/VanillaFix

@Override
public boolean isFullCube() {
  return normalState.getBlock().isFullCube(this);
}

代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2

final boolean isFullCube = block.isFullCube( defaultState );

代码示例来源:origin: PenguinSquad/Harvest-Festival

@SuppressWarnings("deprecation")
private boolean isValidBlock(PlaceableBlock placeable) {
  if (placeable == null || placeable.getBlock() == null || placeable.getBlock() == Blocks.AIR) return false;
  if (HFBuildings.FULL_BUILDING_RENDER) return true;
  else {
    Block block = placeable.getBlock();
    return block.isFullCube(block.getDefaultState()) || block instanceof BlockStairs || block instanceof BlockSlab || block instanceof BlockPane || block instanceof BlockLeaves || block instanceof BlockFence || block instanceof BlockWall;
  }
}

代码示例来源:origin: TheGreyGhost/MinecraftByExample

/** returns true if the web should connect to this block
 * Copied from BlockFence...
 * @param worldIn
 * @param pos
 * @return
 */
private boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
{
 IBlockState iblockstate = worldIn.getBlockState(pos);
 Block block = iblockstate.getBlock();
 if (block == Blocks.BARRIER) return false;
 if (block == StartupCommon.block3DWeb) return true;
 if (block.getMaterial(iblockstate).isOpaque() && block.isFullCube(iblockstate) && block.getMaterial(iblockstate) != Material.GOURD) return true;
 return false;
}

代码示例来源:origin: P3pp3rF1y/AncientWarfare2

public void setDisguiseState(ItemStack itemStack) {
  Block block = Block.getBlockFromItem(itemStack.getItem());
  if (block != AWStructureBlocks.SOUND_BLOCK && block.isFullCube(null) && block.isOpaqueCube(null)) {
    disguiseState = block.getStateFromMeta(itemStack.getMetadata());
    BlockTools.notifyBlockUpdate(this);
    world.notifyNeighborsRespectDebug(pos, this.blockType, true);
    markDirty();
  }
}

代码示例来源:origin: McJtyMods/LostCities

private boolean isValidStandingPosition(World world, BlockPos pos) {
  IBlockState state = world.getBlockState(pos);
  return state.getBlock().isTopSolid(state) && state.getBlock().isFullCube(state) && state.getBlock().isOpaqueCube(state) && world.isAirBlock(pos.up()) && world.isAirBlock(pos.up(2));
}

相关文章

Block类方法