public class BlockAction extends ConfigurableTypeActionForge<BlockConfig,net.minecraft.world.level.block.Block>
The action used for BlockConfig.
See Also:
  • Constructor Details

    • BlockAction

      public BlockAction()
  • Method Details

    • register

      public static void register(@Nullable BiFunction<BlockConfig,net.minecraft.world.level.block.Block,? extends net.minecraft.world.item.Item> itemBlockConstructor, BlockConfig config, @Nullable Callable<?> callback)
      Registers a block and its optional item block.
      Parameters:
      itemBlockConstructor - The optional item block constructor.
      config - The config.
      callback - A callback that will be called when the entry is registered.
    • onRegisterForgeFilled

      public void onRegisterForgeFilled(BlockConfig eConfig)
      Description copied from class: ConfigurableTypeAction
      Logic to register things before Forge registries are being filled.
      Overrides:
      onRegisterForgeFilled in class ConfigurableTypeActionForge<BlockConfig,net.minecraft.world.level.block.Block>
      Parameters:
      eConfig - The config to be registered.
    • onModelRegistryLoad

      public static void onModelRegistryLoad(net.neoforged.neoforge.client.event.ModelEvent.RegisterAdditional event)
    • onModelBakeEvent

      public static void onModelBakeEvent(net.neoforged.neoforge.client.event.ModelEvent.ModifyBakingResult event)
    • onRegisterColorHandlers

      public static void onRegisterColorHandlers(net.neoforged.neoforge.client.event.RegisterColorHandlersEvent.Block event)
    • handleDynamicBlockModel

      public static void handleDynamicBlockModel(BlockConfig extendedConfig)
    • polish

      protected void polish(BlockConfig config)