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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidregister(@NonNull CustomBlockData customBlockData)Registers the givenCustomBlockDataas a custom blockabstract voidregisterItemOverride(@NonNull String javaIdentifier, @NonNull CustomBlockData customBlockData)Registers the givenCustomBlockDataas an override for the given java item identifierabstract voidregisterOverride(@NonNull String javaIdentifier, @NonNull CustomBlockState customBlockState)Registers the givenCustomBlockStateas an override for the given java state identifier Java state identifiers are listed hereabstract voidregisterOverride(@NonNull JavaBlockState javaBlockState, @NonNull CustomBlockState customBlockState)Registers the givenCustomBlockStateas an override for the givenJavaBlockState
-
Constructor Details
-
GeyserDefineCustomBlocksEvent
public GeyserDefineCustomBlocksEvent()
-
-
Method Details
-
register
Registers the givenCustomBlockDataas a custom block- Parameters:
customBlockData- the custom block to register
-
registerOverride
public abstract void registerOverride(@NonNull String javaIdentifier, @NonNull CustomBlockState customBlockState)Registers the givenCustomBlockStateas an override for the given java state identifier Java state identifiers are listed here- Parameters:
javaIdentifier- the java state identifier to overridecustomBlockState- the custom block state with which to override java state identifier
-
registerItemOverride
public abstract void registerItemOverride(@NonNull String javaIdentifier, @NonNull CustomBlockData customBlockData)Registers the givenCustomBlockDataas an override for the given java item identifier- Parameters:
javaIdentifier- the java item identifier to overridecustomBlockData- the custom block data with which to override java item identifier
-
registerOverride
public abstract void registerOverride(@NonNull JavaBlockState javaBlockState, @NonNull CustomBlockState customBlockState)Registers the givenCustomBlockStateas an override for the givenJavaBlockState- Parameters:
javaBlockState- the java block state for the non-vanilla blockcustomBlockState- the custom block state with which to override java state identifier
-