Skip to content
Jodim edited this page Jul 7, 2026 · 4 revisions

Crates

Crates can be used to contain sugarcane and eggs and are small enough that hoppers can pick up items that are on top of them.

Every Type of Crate

Empty Crates

Empty Crates can be bought from the Vendor villager profession for 2 emeralds. Empty Crates can also be bought from the Hermit. By interacting with them with paper in one hand and sugar cane/eggs in the other hand they can be turned into the corresponding crate.

Filled Crates

can be crafted with an empty crate, paper, and the item that it is going to be filled with. when made they will be empty but have a picture of what they will contain on the side and can then be filled up with that item. when their item is dropped on it the item will go into the crate. When powered the crate will drop any items in it. When A Filled Crate is sheared it will drop paper and the item that the crate holds along with an items that were in it. Also it will then converted into an Empty Crate.

Sugar Cane Crate

can hold up to 14 Sugar Cane

Egg Crate

Can Hold Up to 9 eggs

Adding new Crates

To add a new crate first extend TemplateCrateBlock. Then override the functions getItem and getMax like shown

@Override
public Item getItem() {
    return Items.APPLE; // the item that the crate will hold
}

@Override
public int getMax() {
    return 2; // what ever the maximum amount of items the crate can store is
}

This example would create a crate that can hold up to 2 apples. After this is done then the block would just need to be registered and the models and recipes made. Items are stored through BlockStates instead of an inventory.

Clone this wiki locally