Package com.ryandw11.structure.schematic
Class LootTableReplacer
java.lang.Object
com.ryandw11.structure.schematic.LootTableReplacer
Handle loot table replacement in schematics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
replaceBrewerContent(LootTable lootTable, org.bukkit.inventory.BrewerInventory containerInventory)
Replace the contents of a brewer with the loot table.static void
replaceChestContent(LootTable lootTable, Random random, org.bukkit.inventory.Inventory containerInventory)
Replace the chest content.protected static void
replaceContainerContent(Structure structure, org.bukkit.Location location)
Replace the contents of a container with the loot table from a structure.static void
replaceFurnaceContent(LootTable lootTable, org.bukkit.inventory.FurnaceInventory containerInventory)
Replace the content of the furnace with loot table items.
-
Method Details
-
replaceContainerContent
Replace the contents of a container with the loot table from a structure.- Parameters:
structure
- The structure that is being spawned.location
- The location of the container.
-
replaceChestContent
public static void replaceChestContent(LootTable lootTable, Random random, org.bukkit.inventory.Inventory containerInventory)Replace the chest content.- Parameters:
lootTable
- The loot table.random
- The value of random.containerInventory
- The container inventory
-
replaceBrewerContent
public static void replaceBrewerContent(LootTable lootTable, org.bukkit.inventory.BrewerInventory containerInventory)Replace the contents of a brewer with the loot table.- Parameters:
lootTable
- The loot table to populate the brewer with.containerInventory
- The inventory of the brewer.
-
replaceFurnaceContent
public static void replaceFurnaceContent(LootTable lootTable, org.bukkit.inventory.FurnaceInventory containerInventory)Replace the content of the furnace with loot table items.- Parameters:
lootTable
- The loot table selected for the furnace.containerInventory
- The inventory of the furnace.
-