Skip to content

Block and Item Interfaces

MehVahdJukaar edited this page Jul 25, 2026 · 1 revision

Block and Item Interfaces

Small interfaces you implement so other mods' features work on your blocks.

None of these do anything by themselves. They're a shared vocabulary: implement IRecolorable and any mod's dye sprayer can recolor your block, implement IWashable and Supplementaries' soap works on it, implement IPistonMotionReact and your block can react to being pushed.

If you're writing a block that does something another mod might want to interact with, look here first before inventing your own hook.

Block interfaces

Interface Implement when your block
IRecolorable Can be dyed. tryRecolor(level, pos, state, color)
IColored Has a color to report
IWashable Can be washed clean (soap, water)
IWaxable Can be waxed like copper
ILightable Can be lit and extinguished
IGlowable Can be made to glow (glow ink)
IFlammable Has Forge style flammability that should also apply on Fabric
IPistonMotionReact Needs to react to being pushed or pulled
IRotatable / IAnalogRotatable Rotates in a non standard way (wrenches, rotation tools)
IBlockHolder Contains another blockstate, like a mimic
IOptionalEntityBlock Only needs a block entity for some states
IOwnerProtected Has an owner and should be protected from others
IOnePlayerInteractable Can only be edited by one player at a time, like a sign
IEntityCarry / ITileEntityCarry Can be picked up and carried
IBeeGrowable Can be grown by bees, mostly double crops
ISoftFluidProvider / ISoftFluidConsumer / ISoftFluidTankProvider Holds a soft fluid

Item interfaces

Mostly rendering, see Item Rendering. The odd one out is ILeftClickReact, which gives an item a left click callback vanilla doesn't have.

Ready made blocks

A few base classes for things that are annoying to write from scratch: MimicBlock and MimicBlockTile (a block that renders as another), ItemDisplayTile and OpenableContainerBlockTile (block entities holding items), ModStairBlock, ModLiquidBlock, WaterBlock, and DynamicRenderedBlockTile / DynamicRenderedItemDisplayTile.

Clone this wiki locally