A Error while trying to create a block entity
DanielGolan-mc opened this issue ยท 2 comments
The Error:
error: BlockEntityFactory is not public in BlockEntityType; cannot be accessed from outside package
TYPE = Registry.register(Registry.BLOCK_ENTITY_TYPE, "boson:fuel_chest", BlockEntityType.Builder.create(FuelChest.Entity::new, BosonElements.Blocks.FUEL_CHEST).build(null));
^
TYPE
is a variable, FuelChest.Entity
is the BlockEntity
, And the block FUEL_CHEST
variable is stored in BosonElements.Blocks
.
You can use FabricBlockEntityTypeBuilder
from fabric-object-builder-api-v1 instead of BlockEntityType.Builder
to fix this.