Class FabricBlockEntityTypeBuilder<T extends BlockEntity>
java.lang.Object
net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder<T>
Use this builder to create a
BlockEntityType
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionAdds a supported block for the block entity type.addBlocks
(Collection<? extends Block> blocks) Adds supported blocks for the block entity type.Adds supported blocks for the block entity type.build()
build
(@Nullable com.mojang.datafixers.types.Type<?> type) Deprecated.canPotentiallyExecuteCommands
(boolean canPotentiallyExecuteCommands) static <T extends BlockEntity>
FabricBlockEntityTypeBuilder<T> create
(FabricBlockEntityTypeBuilder.Factory<? extends T> factory, Block... blocks)
-
Method Details
-
create
public static <T extends BlockEntity> FabricBlockEntityTypeBuilder<T> create(FabricBlockEntityTypeBuilder.Factory<? extends T> factory, Block... blocks) -
addBlock
Adds a supported block for the block entity type.- Parameters:
block
- the supported block- Returns:
- this builder
-
addBlocks
Adds supported blocks for the block entity type.- Parameters:
blocks
- the supported blocks- Returns:
- this builder
-
addBlocks
Adds supported blocks for the block entity type.- Parameters:
blocks
- the supported blocks- Returns:
- this builder
-
canPotentiallyExecuteCommands
public FabricBlockEntityTypeBuilder<T> canPotentiallyExecuteCommands(boolean canPotentiallyExecuteCommands) - Parameters:
canPotentiallyExecuteCommands
- whether the block entity is able to execute commands- Returns:
- this builder
-
build
-
build
@Deprecated public BlockEntityType<T> build(@Nullable @Nullable com.mojang.datafixers.types.Type<?> type) Deprecated.Usebuild()
instead.
-
build()
instead.