Skip to content

Additional Item Placements

MehVahdJukaar edited this page Jul 25, 2026 · 1 revision

Additional Item Placements

Make an existing item place a block, without replacing the item.

Vanilla ties one item to one block. If you add a "flower pot with a flower in it" block, the flower item still can't place it, and you can't turn the flower into a BlockItem without breaking every other mod that references it. This attaches a placement behavior to an item that's already registered, so right clicking with it can place your block, while the item stays exactly what it was.

Getting Started

From mod setup:

AdditionalItemPlacementsAPI.registerSimplePlacement(Items.SUGAR_CANE, MY_SUGAR_CANE_BLOCK.get());

For placement logic that isn't just "place this block", subclass AdditionalItemPlacement and override what you need (overrideGetPlacementState, overridePlace, overrideUseOn, overrideUpdatePlacementContext):

AdditionalItemPlacementsAPI.registerPlacement(Items.APPLE, new AdditionalItemPlacement(MY_BLOCK.get()) {
    @Override
    public BlockState overrideGetPlacementState(BlockPlaceContext context) {
        return MY_BLOCK.get().defaultBlockState();
    }
});

Important

Register during mod setup, on both client and server. Only one placement per item: registering a second one replaces the first and logs a warning.

Clone this wiki locally