Interface FabricBlock.FabricProperties
- Enclosing interface:
FabricBlock
public static interface FabricBlock.FabricProperties
Fabric-provided extensions for
BlockBehaviour.Properties.
This interface is automatically implemented on all block properties via Mixin and interface injection.-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> blockId()Return the id of block that was defined byBlockBehaviour.Properties.setId(ResourceKey).default net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> Return the id of block that was defined byBlockBehaviour.Properties.setId(ResourceKey).
-
Method Details
-
blockId
default @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> blockId()Return the id of block that was defined byBlockBehaviour.Properties.setId(ResourceKey).- Returns:
- currently stored block id or null, if not set
-
blockIdOrThrow
default net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block> blockIdOrThrow()Return the id of block that was defined byBlockBehaviour.Properties.setId(ResourceKey).- Returns:
- currently stored block id
- Throws:
NullPointerException- if id is not set
-