Interface IModuleWithExternalBlocks
- All Superinterfaces:
IBuildingModule,IHasDirty
- All Known Implementing Classes:
BedHandlingModule,FurnaceUserModule
Module type to register specific blocks to a building (beds, workstations, etc).
-
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.core.BlockPos>Get the list of registered blocks.voidonBlockPlacedInBuilding(@NotNull net.minecraft.world.level.block.state.BlockState blockState, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.level.Level world) Attempt to register a specific block at a specific module.Methods inherited from interface com.minecolonies.api.colony.buildings.modules.IBuildingModule
getBuilding, getProducer, serializeToView, serializeToView, setBuilding, setProducerMethods inherited from interface com.minecolonies.api.util.IHasDirty
checkDirty, clearDirty, markDirty
-
Method Details
-
onBlockPlacedInBuilding
void onBlockPlacedInBuilding(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState blockState, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.Level world) Attempt to register a specific block at a specific module.- Parameters:
blockState- the state.pos- the position.world- the world.
-
getRegisteredBlocks
List<net.minecraft.core.BlockPos> getRegisteredBlocks()Get the list of registered blocks.- Returns:
- the list of positions of the blocks.
-