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

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

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

Block.setUnlocalizedName介绍

暂无

代码示例

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

@Override
public Block setUnlocalizedName(String name) {
  this.name = name;
  name = modName + "." + name;
  return super.setUnlocalizedName(name);
}

代码示例来源:origin: JurassiCraftTeam/JurassiCraft2

public static void registerBlock(Block block, String registryname) {
  block.setRegistryName(registryname);
  block.setUnlocalizedName(registryname);
  blocksToReg.add(block);
}

代码示例来源:origin: RS485/LogisticsPipes

public static <T extends Block> T setName(T block, String name) {
  block.setRegistryName(LPConstants.LP_MOD_ID, name);
  block.setUnlocalizedName(String.format("%s.%s", LPConstants.LP_MOD_ID, name));
  return block;
}

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

block.setUnlocalizedName( "appliedenergistics2." + this.registryName );

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

@Override
public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) {
 blockIn.setUnlocalizedName(getUnlocalisedName());
 blockIn.setRegistryName(getRegistryName());
 return blockIn;
}

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

@Override
public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) {
 blockIn.setUnlocalizedName(getUnlocalisedName());
 blockIn.setRegistryName(getRegistryName());
 return blockIn;
}

代码示例来源:origin: JurassiCraftTeam/JurassiCraft2

public static void registerBlockWithItem(Block block, String registryname) {
  block.setRegistryName(JurassiCraft.MODID, registryname);
  block.setUnlocalizedName(registryname);
  ItemBlock ib = new ItemBlock(block);
  ib.setRegistryName(JurassiCraft.MODID, registryname);
  blocksToReg.add(block);
  itemsToReg.add(ib);
  blockItems.put(block, ib);
}

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

@Override
public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) {
 blockIn.setUnlocalizedName(getUnlocalisedName());
 blockIn.setRegistryName(getRegistryName());
 return blockIn;
}

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

@Override
default @Nonnull <B extends Block> B apply(@Nonnull B block) {
 block.setUnlocalizedName(getUnlocalisedName());
 block.setRegistryName(getRegistryName());
 return block;
}

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

@Override
public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) {
 blockIn.setUnlocalizedName(getUnlocalisedName());
 blockIn.setRegistryName(getRegistryName());
 return blockIn;
}

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

@Override
public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) {
 blockIn.setUnlocalizedName(getUnlocalisedName());
 blockIn.setRegistryName(getRegistryName());
 return blockIn;
}

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

@Override
public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) {
 blockIn.setUnlocalizedName(getUnlocalisedName());
 blockIn.setRegistryName(getRegistryName());
 return blockIn;
}

代码示例来源:origin: joshiejack/Mariculture

/** Register this block WITHOUT assigning the item **/
default T registerWithoutItem(String name) {
  Block block = (Block) this;
  block.setUnlocalizedName(name.replace("_", "."));
  block.setRegistryName(new ResourceLocation(MODID, name));
  GameRegistry.register(block);
  return (T) this;
}

代码示例来源:origin: AlgorithmX2/Chisels-and-Bits

protected void registerBlock(
      final Block block,
      final ItemBlock item,
      final String name )
  {
    block.setCreativeTab( creativeTab );

    item.setRegistryName( ChiselsAndBits.MODID, name );
    block.setRegistryName( ChiselsAndBits.MODID, name );

    block.setUnlocalizedName( unlocalizedPrefix + name );
    item.setUnlocalizedName( unlocalizedPrefix + name );

    registeredBlocks.add( block );
    registeredItems.add( item );
  }
}

代码示例来源:origin: ExtraCells/ExtraCells2

BlockEnum(String internalName, Block block, Function<Block, ItemBlock> factory, Integration.Mods mod) {
  this.internalName = internalName;
  this.block = block;
  this.block.setUnlocalizedName("extracells.block." + this.internalName);
  this.block.setRegistryName(internalName);
  this.item = factory.apply(block);
  this.item.setRegistryName(block.getRegistryName());
  this.mod = mod;
  if (mod == null || mod.isEnabled()) {
    this.block.setCreativeTab(CreativeTabEC.INSTANCE);
  }
}

代码示例来源:origin: joshiejack/Mariculture

/** Register this block **/
default T register(String name) {
  Block block = (Block) this;
  block.setUnlocalizedName(name.replace("_", "."));
  block.setRegistryName(new ResourceLocation(MODID, name));
  GameRegistry.register(block);
  getItemBlock().register(name); //Register the item block
  return (T) this;
}

代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped

public void registerBlocks(RegistryEvent.Register<Block> event) {
  physicsInfuser = new BlockPhysicsInfuser(Material.ROCK).setHardness(12f).setUnlocalizedName("shipblock")
      .setRegistryName(MODID, "shipblock").setCreativeTab(vwTab);
  physicsInfuserCreative = new BlockPhysicsInfuserCreative(Material.ROCK).setHardness(12f)
      .setUnlocalizedName("shipblockcreative").setRegistryName(MODID, "shipblockcreative")
      .setCreativeTab(vwTab);
  event.getRegistry().register(physicsInfuser);
  event.getRegistry().register(physicsInfuserCreative);
}

代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped

@Override
public void registerBlocks(RegistryEvent.Register<Block> event) {
  fakecannonblock = new FakeCannonBlock(Material.IRON).setHardness(5f).setUnlocalizedName("fakecannonblock").setRegistryName(getModID(), "fakecannonblock");
  event.getRegistry().register(fakecannonblock);
}

代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped

@Override
public void registerBlocks(RegistryEvent.Register<Block> event) {
  etheriumOre = new BlockEtheriumOre(Material.ROCK).setHardness(3f).setUnlocalizedName("etheriumore").setRegistryName(getModID(), "etheriumore").setCreativeTab(ValkyrienWarfareMod.vwTab);
  skydungeon_controller = new BlockSkyTempleController(Material.GLASS).setHardness(15f).setUnlocalizedName("skydungeon_controller").setRegistryName(getModID(), "skydungeon_controller").setCreativeTab(ValkyrienWarfareMod.vwTab);
  quartz_fence = new BlockQuartzFence(Material.GLASS).setHardness(8f).setUnlocalizedName("quartz_fence").setRegistryName(getModID(), "quartz_fence").setCreativeTab(ValkyrienWarfareMod.vwTab);
  event.getRegistry().register(etheriumOre);
  event.getRegistry().register(skydungeon_controller);
  event.getRegistry().register(quartz_fence);
}

代码示例来源:origin: squeek502/VeganOption

@Override
public void create()
{
  basin = new BlockBasin(Material.IRON)
    .setHardness(2.5F)
    .setUnlocalizedName(ModInfo.MODID + ".basin")
    .setCreativeTab(VeganOption.creativeTab)
    .setRegistryName(ModInfo.MODID_LOWER, "basin");
  GameRegistry.register(basin);
  GameRegistry.register(new ItemBlock(basin).setRegistryName(basin.getRegistryName()));
  GameRegistry.registerTileEntity(TileEntityBasin.class, ModInfo.MODID + ".basin");
}

相关文章

Block类方法