Class GeyserDefineCustomBlocksEvent

java.lang.Object
org.geysermc.geyser.api.event.lifecycle.GeyserDefineCustomBlocksEvent
All Implemented Interfaces:
org.geysermc.event.Event

public abstract class GeyserDefineCustomBlocksEvent extends Object implements org.geysermc.event.Event
Called on Geyser's startup when looking for custom blocks. Custom blocks must be registered through this event. This event will not be called if the "add-non-bedrock-items" setting is disabled in the Geyser config.
  • Constructor Details

    • GeyserDefineCustomBlocksEvent

      public GeyserDefineCustomBlocksEvent()
  • Method Details

    • register

      public abstract void register(@NonNull CustomBlockData customBlockData)
      Registers the given CustomBlockData as a custom block
      Parameters:
      customBlockData - the custom block to register
    • registerOverride

      public abstract void registerOverride(@NonNull String javaIdentifier, @NonNull CustomBlockState customBlockState)
      Registers the given CustomBlockState as an override for the given java state identifier Java state identifiers are listed in https://raw.githubusercontent.com/GeyserMC/mappings/master/blocks.json
      Parameters:
      javaIdentifier - the java state identifier to override
      customBlockState - the custom block state with which to override java state identifier
    • registerItemOverride

      public abstract void registerItemOverride(@NonNull String javaIdentifier, @NonNull CustomBlockData customBlockData)
      Registers the given CustomBlockData as an override for the given java item identifier
      Parameters:
      javaIdentifier - the java item identifier to override
      customBlockData - the custom block data with which to override java item identifier
    • registerOverride

      public abstract void registerOverride(@NonNull JavaBlockState javaBlockState, @NonNull CustomBlockState customBlockState)
      Registers the given CustomBlockState as an override for the given JavaBlockState
      Parameters:
      javaBlockState - the java block state for the non-vanilla block
      customBlockState - the custom block state with which to override java state identifier