Class FabricBlockEntityTypeBuilder<T extends net.minecraft.block.entity.BlockEntity>
java.lang.Object
net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder<T>
public final class FabricBlockEntityTypeBuilder<T extends net.minecraft.block.entity.BlockEntity>
extends Object
Fabric's version of BlockEntityType.Builder.
Removes the need to use an access widener on the BlockEntityFactory
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
FabricBlockEntityTypeBuilder.Factory<T extends net.minecraft.block.entity.BlockEntity>
-
Method Summary
Modifier and TypeMethodDescriptionaddBlock
(net.minecraft.block.Block block) Adds a supported block for the block entity type.addBlocks
(net.minecraft.block.Block... blocks) Adds supported blocks for the block entity type.net.minecraft.block.entity.BlockEntityType<T>
build()
net.minecraft.block.entity.BlockEntityType<T>
build
(com.mojang.datafixers.types.Type<?> type) static <T extends net.minecraft.block.entity.BlockEntity>
FabricBlockEntityTypeBuilder<T>create
(FabricBlockEntityTypeBuilder.Factory<? extends T> factory, net.minecraft.block.Block... blocks)
-
Method Details
-
create
public static <T extends net.minecraft.block.entity.BlockEntity> FabricBlockEntityTypeBuilder<T> create(FabricBlockEntityTypeBuilder.Factory<? extends T> factory, net.minecraft.block.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
-
build
-
build
public net.minecraft.block.entity.BlockEntityType<T> build(com.mojang.datafixers.types.Type<?> type)
-