本文整理了Java中net.minecraft.block.Block.setCreativeTab()
方法的一些代码示例,展示了Block.setCreativeTab()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.setCreativeTab()
方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:setCreativeTab
暂无
代码示例来源:origin: SleepyTrousers/EnderIO
/**
* Sets the creative tab to null. Helper to avoid annotation nonsense everywhere.
*/
@SuppressWarnings("null")
public static void setNoCreativeTab(Block block) {
block.setCreativeTab(null);
}
代码示例来源:origin: SleepyTrousers/EnderCore
@SuppressWarnings("null")
@Override
public @Nonnull Block setCreativeTab(@Nullable CreativeTabs tab) {
return super.setCreativeTab(tab);
}
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
@Nonnull
public <B extends Block> B apply(@Nonnull B blockIn) {
blockIn.setCreativeTab(EnderIOTab.tabEnderIOMachines);
return IModObjectBase.super.apply(blockIn);
}
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) {
blockIn.setCreativeTab(EnderIOTab.tabEnderIOConduits);
return IModObjectBase.super.apply(blockIn);
}
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) {
blockIn.setCreativeTab(EnderIOTab.tabEnderIOConduits);
return IModObjectBase.super.apply(blockIn);
}
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public final @Nonnull <B extends Block> B apply(@Nonnull B blockIn) {
blockIn.setCreativeTab(EnderIOTab.tabEnderIOInvpanel);
return IModObjectBase.super.apply(blockIn);
}
代码示例来源:origin: TerraFirmaCraft/TerraFirmaCraft
private static <T extends Block> T register(IForgeRegistry<Block> r, String name, T block, CreativeTabs ct)
{
block.setCreativeTab(ct);
return register(r, name, block);
}
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
block.setCreativeTab( this.creativeTab );
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
}.setLightLevel( 0.2f ).setCreativeTab( CreativeTabs.DECORATIONS ).setRegistryName( uvlblockR );
代码示例来源: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: Ellpeck/ActuallyAdditions
public static void registerBlock(Block block, ItemBlockBase itemBlock, String name, boolean addTab){
block.setTranslationKey(ActuallyAdditions.MODID+"."+name);
block.setRegistryName(ActuallyAdditions.MODID, name);
RegistryHandler.BLOCKS_TO_REGISTER.add(block);
itemBlock.setRegistryName(block.getRegistryName());
RegistryHandler.ITEMS_TO_REGISTER.add(itemBlock);
block.setCreativeTab(addTab ? CreativeTab.INSTANCE : null);
IMCHandler.doBlockIMC(block);
if(block instanceof IColorProvidingBlock){
ActuallyAdditions.PROXY.addColoredBlock(block);
}
}
代码示例来源:origin: Glitchfiend/SereneSeasons
public static void init()
{
greenhouse_glass = registerBlock( new BlockGreenhouseGlass(), "greenhouse_glass" );
season_sensors[0] = registerBlock( new BlockSeasonSensor(BlockSeasonSensor.DetectorType.SPRING), "season_sensor_spring" );
season_sensors[1] = registerBlock( new BlockSeasonSensor(BlockSeasonSensor.DetectorType.SUMMER), "season_sensor_summer" ).setCreativeTab(null);
season_sensors[2] = registerBlock( new BlockSeasonSensor(BlockSeasonSensor.DetectorType.AUTUMN), "season_sensor_autumn" ).setCreativeTab(null);
season_sensors[3] = registerBlock( new BlockSeasonSensor(BlockSeasonSensor.DetectorType.WINTER), "season_sensor_winter" ).setCreativeTab(null);
GameRegistry.registerTileEntity(TileEntitySeasonSensor.class, "season_sensor");
}
代码示例来源: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: 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) {
gpsBlock = new GPSBlock().setUnlocalizedName("gpsblock").setRegistryName(getModID(), "gpsblock").setCreativeTab(ValkyrienWarfareMod.vwTab);
event.getRegistry().register(gpsBlock);
}
代码示例来源:origin: MightyPirates/TIS-3D
public Block registerBlock(final String name, final Supplier<Block> constructor, final Class<? extends TileEntity> tileEntity) {
final Block block = constructor.get().
setHardness(5).
setResistance(10).
setUnlocalizedName(API.MOD_ID + "." + name).
setCreativeTab(API.creativeTab).
setRegistryName(name);
GameRegistry.register(block);
GameRegistry.registerTileEntityWithAlternatives(tileEntity, API.MOD_ID + ": " + name, name);
final Item itemBlock = new ItemBlock(block).
setRegistryName(name);
GameRegistry.register(itemBlock);
return block;
}
代码示例来源: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: Darkhax-Minecraft/Tesla
public static Block registerBlock (Block block, Class<? extends TileEntity> tileEntityClass, String name) {
block.setRegistryName(name);
GameRegistry.registerTileEntity(tileEntityClass, block.getRegistryName().toString());
block.setCreativeTab(tab);
registerItem(new ItemBlock(block), name);
blocks.add(block);
return block;
}
代码示例来源: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");
}
代码示例来源:origin: squeek502/VeganOption
@Override
public void create()
{
kapokTuft = new Item()
.setUnlocalizedName(ModInfo.MODID + ".kapokTuft")
.setCreativeTab(VeganOption.creativeTab)
.setRegistryName(ModInfo.MODID_LOWER, "kapokTuft");
GameRegistry.register(kapokTuft);
kapokBlock = (BlockColored) new BlockKapok(Material.CLOTH)
.setHardness(0.8F)
.setCreativeTab(VeganOption.creativeTab)
.setUnlocalizedName(ModInfo.MODID + ".kapok")
.setRegistryName(ModInfo.MODID_LOWER, "kapok");
GameRegistry.register(kapokBlock);
GameRegistry.register(new ItemCloth(kapokBlock).setRegistryName(kapokBlock.getRegistryName()));
}
内容来源于网络,如有侵权,请联系作者删除!