Class NeoForgeRegister.Blocks

java.lang.Object
net.xun.lib.common.api.registries.Register<net.minecraft.world.level.block.Block>
net.xun.lib.common.api.registries.Register.Blocks
net.xun.lib.neoforge.api.registries.NeoForgeRegister.Blocks
All Implemented Interfaces:
Iterable<net.minecraft.world.level.block.Block>
Enclosing class:
NeoForgeRegister<T>

public static class NeoForgeRegister.Blocks extends Register.Blocks
  • Constructor Details

    • Blocks

      public Blocks(String namespace)
  • Method Details

    • register

      public <B extends net.minecraft.world.level.block.Block> RegistryBlock<B> register(String name, Supplier<B> supplier)
      Description copied from class: Register.Blocks
      Registers a new block.
      Overrides:
      register in class Register.Blocks
      Type Parameters:
      B - The concrete block type
      Parameters:
      name - The name of the block (without namespace)
      supplier - Supplier providing the block instance
      Returns:
      A specialized block registry holder
    • register

      public void register()
      Description copied from class: Register
      Performs final registration by binding all holders to the actual registry.

      This should be called during mod initialization after the registry is available. Note: Certain registry types are bound immediately and skip this step.

      Overrides:
      register in class Register<net.minecraft.world.level.block.Block>