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

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

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

Block.getRenderType介绍

暂无

代码示例

代码示例来源:origin: TerraFirmaCraft/TerraFirmaCraft

@Override
  public EnumBlockRenderType getRenderType(IBlockState state)
  {
    return super.getRenderType(state);
  }
}

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

@Override
public EnumBlockRenderType getRenderType() {
  return block.getRenderType(this);
}

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

@Override
public EnumBlockRenderType getRenderType() {
  return normalState.getBlock().getRenderType(this);
}

代码示例来源:origin: Electrical-Age/ElectricalAge

@Override
public boolean accept(ItemStack stack) {
  Block b = Block.getBlockFromItem(stack.getItem());
  if (b == null) return false;
  if (b instanceof BlockContainer) return false;
  return b.getRenderType() == 0 && stack.getItem() instanceof SixNodeItem == false;
}

代码示例来源:origin: CyclopsMC/EvilCraft

/**
 * If the given blockState can be set to an inner blockState of this.
 * @param blockState The blockState to set as inner blockState.
 * @param block The block to set as inner blockState.
 * @param world The world.
 * @param blockPos The position.
 * @return If the blockState can be set as inner blockState.
 */
public boolean canSetInnerBlock(IBlockState blockState, Block block, IBlockAccess world, BlockPos blockPos) {
  return block != null
      && !block.isAir(blockState, world, blockPos)
      && block.isOpaqueCube(blockState)
      && !block.hasTileEntity(world.getBlockState(blockPos))
      && block.getRenderType(blockState) == EnumBlockRenderType.MODEL;
}

代码示例来源:origin: WayofTime/BloodMagic

@Override
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
  TileEntity tile = world.getTileEntity(pos);
  if (tile instanceof TileMimic) {
    TileMimic mimic = (TileMimic) tile;
    ItemStack stack = mimic.getStackInSlot(0);
    if (stack.getItem() instanceof ItemBlock) {
      Block block = ((ItemBlock) stack.getItem()).getBlock();
      IBlockState mimicState = mimic.getReplacedState();
      if (block != this) {
        if (block.getRenderType(mimicState) == EnumBlockRenderType.ENTITYBLOCK_ANIMATED) {
          return RegistrarBloodMagicBlocks.BLOOD_LIGHT.getDefaultState(); //Small and invisible-ish, basically this is returned in order to not render over the animated block (TESR)
        }
        return block.getActualState(mimicState, world, pos);
      }
    }
  }
  return state;
}

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

EnumBlockRenderType type = block.getRenderType(state);
renderTE: {
  try {

代码示例来源:origin: Esteemed-Innovation/Esteemed-Innovation

EnumBlockRenderType renderType = block.getRenderType(state);
if (!block.hasTileEntity(state) &&
 renderType != EnumBlockRenderType.ENTITYBLOCK_ANIMATED && renderType != EnumBlockRenderType.LIQUID &&

相关文章

Block类方法