Compacting Recipe
This allows you to register a compacting recipe for the Compacting Drawer.
INFO
Contents of this page are from the FTB docs.
To register a recipe send a scriptevent with id ftb_sd:register_compacting_recipe as json with data
| Name | Type | Description |
|---|---|---|
topSlot | string | The top slot of the drawer item |
bottomSlot | string | The bottom slot of the drawer item - This is the item that will be compacted into the top slot |
bottomSlotCount | number | The amount of the bottom slot item that will be compacted into the top slot |
Code Example
ts
interface CompactingRecipe {
topSlot: string;
bottomSlot: string;
bottomSlotCount: number;
}
function registerRecipe(recipe: CompactingRecipe): void {
system.sendScriptEvent("ftb_sd:register_compacting_recipe", JSON.stringify(recipe));
}
world.afterEvents.worldInitialize.subscribe((event) => {
registerRecipe({
topSlot: "minecraft:diamond_block",
bottomSlot: "minecraft:diamond",
bottomSlotCount: 9,
});
});js
function registerRecipe(recipe) {
system.sendScriptEvent("ftb_sd:register_compacting_recipe", JSON.stringify(recipe));
}
world.afterEvents.worldInitialize.subscribe((event) => {
registerRecipe({
topSlot: "minecraft:diamond_block",
bottomSlot: "minecraft:diamond",
bottomSlotCount: 9,
});
});Command Example
WARNING
Please note if using commands to register the recipe you must run the command at least once every time you load the world.
txt
/scriptevent ftb_sd:register_compacting_recipe '{"topSlot":"minecraft:diamond_block","bottomSlot":"minecraft:diamond","bottomSlotCount":9}'