Repository navigation
Compostables
satisfy edited this page Oct 9, 2026
·
1 revision
Make your items compostable. Foundation applies them during common setup on Fabric and NeoForge. Since Foundation 1.0.5.
Why not ComposterBlock.COMPOSTABLES.put(...)? NeoForge ignores that map and only reads the neoforge:compostables data map, so on NeoForge the item would not compost at all. Foundation covers both loaders.
Register in your mod's common init(). Items are passed as Suppliers and only resolved later.
FoundationCompostables.low(ModItems.WILD_HERB);
FoundationCompostables.medium(ModItems.CHEESE_SLICE, ModItems.BREAD_SLICE);
FoundationCompostables.high(ModItems.APPLE_PIE);
FoundationCompostables.register(0.6F, ModItems.DRIED_WHEAT);| Method | Chance | Vanilla equivalent |
|---|---|---|
low() |
0.3 | seeds, grass |
medium() |
0.5 | melon slice, vines |
high() |
0.65 | apple, potato |
veryHigh() |
0.85 | bread, baked potato |
full() |
1.0 | cake, pumpkin pie |
- Items that resolve to air (missing compat items) are skipped.
- Registering after setup still works, the item is applied right away.
- A
neoforge:compostablesdata map entry (e.g. from a datapack) wins over the Foundation value.