Standard Templates - landonjw/GooeyLibs GitHub Wiki
ChestTemplate
An example of using ChestTemplate
is:
GooeyButton diamond = GooeyButton.builder()
.display(new ItemStack(Items.DIAMOND))
.build();
GooeyButton emerald = GooeyButton.builder()
.display(new ItemStack(Items.EMERALD))
.build();
GooeyButton dirt = GooeyButton.builder()
.display(new ItemStack(Blocks.DIRT))
.build();
ChestTemplate template = ChestTemplate.builder(6) // Defines a chest template with 6 rows
.set(0, 0, diamond) // Sets a diamond button in the first row, first column of chest
.row(1, emerald) // Fills the entire second row with the emerald button
.fill(dirt) // Fills any empty slots in the chest with dirt button
.build();
This example will produce a template with the following results
BrewingStandTemplate
An example of using a BrewingStandTemplate
is:
GooeyButton diamond = GooeyButton.builder()
.display(new ItemStack(Items.DIAMOND))
.build();
GooeyButton emerald = GooeyButton.builder()
.display(new ItemStack(Items.EMERALD))
.build();
GooeyButton dirt = GooeyButton.builder()
.display(new ItemStack(Blocks.DIRT))
.build();
BrewingStandTemplate template = BrewingStandTemplate.builder()
.bottles(dirt) // Applies dirt button to all bottle slots
.bottle(0, diamond) // Applies diamond button to first bottle slot
.ingredient(emerald) // Applies emerald button to ingredient slot
.fuel(diamond) // Applies diamond button to fuel slot
.build();
This example will produce a template with the following results
CraftingTableTemplate
An example of using a CraftingTableTemplate
is:
GooeyButton diamond = GooeyButton.builder()
.display(new ItemStack(Items.DIAMOND))
.build();
GooeyButton emerald = GooeyButton.builder()
.display(new ItemStack(Items.EMERALD))
.build();
GooeyButton dirt = GooeyButton.builder()
.display(new ItemStack(Blocks.DIRT))
.build();
CraftingTableTemplate template = CraftingTableTemplate.builder()
.fillGrid(dirt) // Fills the crafting grid with dirt button
.setGrid(0, 0, emerald) // Applies dirt button to first row and first column in crafting grid
.setResultItem(diamond) // Sets the resulting slot to diamond button
.build();
This example will produce a template with the following results
DispenserTemplate
An example of using a DispenserTemplate
is:
GooeyButton diamond = GooeyButton.builder()
.display(new ItemStack(Items.DIAMOND))
.build();
GooeyButton emerald = GooeyButton.builder()
.display(new ItemStack(Items.EMERALD))
.build();
GooeyButton dirt = GooeyButton.builder()
.display(new ItemStack(Blocks.DIRT))
.build();
DispenserTemplate template = DispenserTemplate.builder()
.fill(dirt) // Fills all slots that are empty with dirt button
.set(0, diamond) // Sets the first slot to diamond button
.set(0, 1, emerald) // Sets the slot in first row and second column to emerald button
.build();
This example will produce a template with the following results
HopperTemplate
An example of using a HopperTemplate
is:
GooeyButton diamond = GooeyButton.builder()
.display(new ItemStack(Items.DIAMOND))
.build();
GooeyButton emerald = GooeyButton.builder()
.display(new ItemStack(Items.EMERALD))
.build();
GooeyButton dirt = GooeyButton.builder()
.display(new ItemStack(Blocks.DIRT))
.build();
HopperTemplate template = HopperTemplate.builder()
.set(0, diamond)
.set(1, emerald)
.set(2, dirt)
.build();
This example will produce a template with the following results
FurnaceTemplate
An example of using a FurnaceTemplate
is:
GooeyButton diamond = GooeyButton.builder()
.display(new ItemStack(Items.DIAMOND))
.build();
GooeyButton emerald = GooeyButton.builder()
.display(new ItemStack(Items.EMERALD))
.build();
GooeyButton dirt = GooeyButton.builder()
.display(new ItemStack(Blocks.DIRT))
.build();
FurnaceTemplate template = FurnaceTemplate.builder()
.inputMaterial(diamond)
.outputMaterial(emerald)
.fuel(dirt)
.build();
This example will produce a template with the following results