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

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

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

Block.getLocalizedName介绍

暂无

代码示例

代码示例来源:origin: EngineHub/WorldEdit

@Nullable
@Override
public String getName(BlockType blockType) {
  return Block.REGISTRY.getObject(new ResourceLocation(blockType.getId())).getLocalizedName();
}

代码示例来源:origin: Funwayguy/BetterQuesting

@Override
public String getName()
{
  return BetterQuesting.submitStation.getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@SuppressWarnings("null")
@Override
public @Nonnull String getTitle() {
 return block_enchanter.getBlock().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@SuppressWarnings("null")
@Override
public @Nonnull String getTitle() {
 return MachineObject.block_solar_panel.getBlock().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@SuppressWarnings("null")
@Override
public @Nonnull String getTitle() {
 return MachineObject.block_stirling_generator.getBlock().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@SuppressWarnings("null")
@Override
public @Nonnull String getTitle() {
 return MachineObject.block_combustion_generator.getBlock().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@SuppressWarnings("null")
@Override
public @Nonnull String getTitle() {
 return MachineObject.block_zombie_generator.getBlock().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public @Nonnull String getTitle() {
 return block_sag_mill.getBlockNN().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public @Nonnull String getTitle() {
 return block_alloy_smelter.getBlockNN().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@SuppressWarnings("null")
@Override
public @Nonnull String getTitle() {
 return MachineObject.block_ender_generator.getBlock().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@SuppressWarnings("null")
@Override
public @Nonnull String getTitle() {
 return MachineObject.block_lava_generator.getBlock().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@SuppressWarnings("null")
@Override
public @Nonnull String getTitle() {
 return block_tank.getBlock().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public @Nonnull String getTitle() {
 return block_painter.getBlockNN().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public @Nonnull String getTitle() {
 return block_soul_binder.getBlockNN().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public @Nonnull String getTitle() {
 return MachineObject.block_weather_obelisk.getBlockNN().getLocalizedName();
}

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public @Nonnull String getLocalizedName() {
 return getParent().getBlockNN().getLocalizedName();
}

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

@Nonnull
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
  return new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES).setStackDisplayName(TextHelper.getFormattedText(RegistrarBloodMagicBlocks.ALCHEMY_ARRAY.getLocalizedName()));
}

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

/**
 * The interior is any block that does not touch blocks outside the machine.
 *
 * @param world World object for the world in which this controller is located.
 * @param pos   coordinate of the block being tested
 * @throws MultiblockValidationException if the tested block is not allowed in the machine's interior
 */
protected void isBlockGoodForInterior(World world, BlockPos pos) throws MultiblockValidationException {
  Block block = world.getBlockState(pos).getBlock();
  throw new MultiblockValidationException(Translator.translateToLocalFormatted("for.multiblock.error.invalid.interior", block.getLocalizedName()), pos);
}

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

/**
 * @param level the level of the block on the multiblock, starting at 0 for the bottom.
 * @param world World object for the world in which this controller is located.
 * @param pos   coordinate of the block being tested
 * @throws MultiblockValidationException if the tested block is not allowed on the machine's side faces
 */
protected void isBlockGoodForExteriorLevel(int level, World world, BlockPos pos) throws MultiblockValidationException {
  Block block = world.getBlockState(pos).getBlock();
  throw new MultiblockValidationException(Translator.translateToLocalFormatted("for.multiblock.error.invalid.interior", block.getLocalizedName()), pos);
}

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

private void registerFarmable(Block plantBlock, Item plantItem, ItemStack product, String identifier) {
    IProperty<Integer> growthProperty = BlockUtil.getProperty(plantBlock, "growth", Integer.class);
    if (growthProperty == null) {
      Log.error("Could not find the growth property of {}.", plantBlock.getLocalizedName());
    } else {
      IFarmRegistry registry = FarmRegistry.getInstance();
      int harvestAge = Collections.max(growthProperty.getAllowedValues());
      int replantAge = plantBlock.getDefaultState().getValue(growthProperty);
      registry.registerFarmables(identifier, new FarmableAgingCrop(new ItemStack(plantItem), plantBlock, product, growthProperty, harvestAge, replantAge));
    }
  }
}

相关文章

Block类方法