Assigns the custom native block entity type by its given numeric ID, to the block by its given numeric ID. It means every time the block with given ID is placed, a tile of type of given ID will be created for this block, also calling a TileEntityCreationCallback you specified while registering this block entity type.
Registers new custom native block entity type
unique string identifier of the new block entity type, traditionally in snake case
function that will be called every time the custom tile is about to be created, and must return the Java wrapper object of the tile
generated numeric ID for the created block entity type. Should be stored somewhere in your code in order to assign this type for a block later using registerForBlock.
Generated using TypeDoc
Module to register custom block entity types and assign them for specific blocks.
Unlike InnerCore's TileEntity, these entities are registered as vanilla tile types like chest, hopper, brewing stand, furnace etc., via native code.
A block entity type must be represented by a non-abstract Java class inherited from
vsdum.kex.modules.tileentity.BlockActor
(despite the latter class doesn't have any abstract methods required to implement).After creating a tile entity class, register the numeric ID for it using TileEntityModule.registerTileEntityType method. You must store the returned value in order to use it later for the blocks that will have this tile entity type.
So, for example:
Then in JS/TS:
4.0