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

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

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

Block.getBoundingBox介绍

暂无

代码示例

代码示例来源:origin: Vazkii/Quark

@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
  return Blocks.LADDER.getBoundingBox(state, source, pos);
}

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

@Override
public AxisAlignedBB getBoundingBox(IBlockAccess blockAccess, BlockPos pos) {
  return block.getBoundingBox(this, blockAccess, pos);
}

代码示例来源:origin: Direwolf20-MC/BuildingGadgets

@Override
@Deprecated
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
  IBlockState mimicBlock = getActualMimicBlock(source, pos);
  if (mimicBlock == null) {
    return super.getBoundingBox(state, source, pos);
  }
  try {
    return mimicBlock.getBlock().getBoundingBox(mimicBlock, source, pos);
  } catch (Exception var8) {
    return super.getBoundingBox(state, source, pos);
  }
}

代码示例来源:origin: Direwolf20-MC/BuildingGadgets

@Override
@Nullable
@Deprecated
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos) {
  IBlockState mimicBlock = getActualMimicBlock(worldIn, pos);
  if (mimicBlock == null) {
    return super.getBoundingBox(blockState, worldIn, pos);
  }
  try {
    return mimicBlock.getBlock().getBoundingBox(mimicBlock, worldIn, pos);
  } catch (Exception var8) {
    return super.getBoundingBox(blockState, worldIn, pos);
  }
}

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

@Override
public AxisAlignedBB getBoundingBox(IBlockAccess blockAccess, BlockPos pos) {
  return normalState.getBlock().getBoundingBox(this, blockAccess, pos);
}

代码示例来源:origin: Vazkii/Botania

AxisAlignedBB aabb = ModBlocks.lightRelay.getBoundingBox(world.getBlockState(pos), world, pos).offset(pos);
float range = 0.5F;
List<EntityEnderPearl> enderPearls = world.getEntitiesWithinAABB(EntityEnderPearl.class, aabb.grow(range));

代码示例来源:origin: TheCBProject/EnderStorage

@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
  TileEntity tile = source.getTileEntity(pos);
  if (tile != null && tile instanceof TileFrequencyOwner) {
    TileFrequencyOwner owner = (TileFrequencyOwner) tile;
    if (!owner.getIndexedCuboids().isEmpty()) {
      return owner.getIndexedCuboids().get(0).aabb();
    }
  }
  return super.getBoundingBox(state, source, pos);
}

代码示例来源:origin: CoFH/ThermalExpansion

@Override
public boolean rotateBlock() {
  if (world.getEntitiesWithinAABB(Entity.class, getBlockType().getBoundingBox(world.getBlockState(pos), world, pos)).size() != 0) {
    return false;
  }
  facing++;
  facing %= 6;
  updateAdjacentHandlers();
  markChunkDirty();
  sendTilePacket(Side.CLIENT);
  return true;
}

相关文章

Block类方法