ChestMap
Allows you to easily and efficiently (remember full/empty chests) find and open chests by criteria. Create with 'Context.Functions.CreateChestMap()'.
Example usage
private ChestMap chestMap;
public async Task Start() {
// Create and populate the chestmap. This will keep a reference of all
// chest positions and their state (full/empty).
chestMap = Context.Functions.CreateChestMap();
await chestMap.UpdateChestList();
}
public async Task OnTick() {
// Attempt to open a non-full chest.
var openWindow = await chestMap.Open(ChestStatus.NotFull);
if(openWindow != null) {
// We have successfully opened a chest, store all items.
await openWindow.Deposit();
await openWindow.Close();
}
}Last updated