Class NeoForgeRegistryCallbacks.BlockCallbacks
java.lang.Object
net.neoforged.neoforge.registries.NeoForgeRegistryCallbacks.BlockCallbacks
- All Implemented Interfaces:
AddCallback<Block>
,BakeCallback<Block>
,ClearCallback<Block>
,RegistryCallback<Block>
- Enclosing class:
NeoForgeRegistryCallbacks
static class NeoForgeRegistryCallbacks.BlockCallbacks
extends Object
implements AddCallback<Block>, ClearCallback<Block>, BakeCallback<Block>
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
-
Field Summary
Modifier and TypeFieldDescription(package private) static final NeoForgeRegistryCallbacks.BlockCallbacks.ClearableObjectIntIdentityMap
<BlockState> (package private) static final NeoForgeRegistryCallbacks.BlockCallbacks
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when an entry is added to the registry.void
Called when the registry is frozen, and all registration is finished.void
Called when the registry is cleared before anything is done to the registry.
-
Field Details
-
INSTANCE
-
BLOCKSTATE_TO_ID_MAP
static final NeoForgeRegistryCallbacks.BlockCallbacks.ClearableObjectIntIdentityMap<BlockState> BLOCKSTATE_TO_ID_MAP -
addedBlocks
-
-
Constructor Details
-
BlockCallbacks
BlockCallbacks()
-
-
Method Details
-
onAdd
Description copied from interface:AddCallback
Called when an entry is added to the registry.- Specified by:
onAdd
in interfaceAddCallback<Block>
- Parameters:
registry
- the registryid
- the integer ID assigned to the entrykey
- the resource key for the entryvalue
- the entry's value
-
onClear
Description copied from interface:ClearCallback
Called when the registry is cleared before anything is done to the registry.- Specified by:
onClear
in interfaceClearCallback<Block>
- Parameters:
registry
- the registryfull
- iftrue
, all entries in the registry will be cleared. iffalse
, only integer IDs in the registry will be cleared.
-
onBake
Description copied from interface:BakeCallback
Called when the registry is frozen, and all registration is finished.- Specified by:
onBake
in interfaceBakeCallback<Block>
- Parameters:
registry
- the registry
-