configure for regolith

This commit is contained in:
ForestOfLight
2025-07-02 20:02:17 -07:00
Unverified
parent b92cdd269c
commit 657467f49d
69 changed files with 29 additions and 1 deletions
@@ -0,0 +1,25 @@
import { ActionFormData } from "@minecraft/server-ui";
import { MenuFormBuilder } from "../MenuFormBuilder";
import { structureCollection } from "../Structure/StructureCollection";
import { Builders } from "../Builder/Builders";
export class MaterialGrabberFormBuilder {
static menuTitle = MenuFormBuilder.menuTitle + ' Material Grabber';
static buildInstanceSelector(player) {
const allInstanceNameForm = new ActionFormData()
.title(this.menuTitle);
const currInstanceName = Builders.get(player.id).materialInstanceName;
let body = '§7Current instance: ';
if (currInstanceName)
body += `§2${currInstanceName}`;
else
body += '§7None';
body += '\n§7Select an instance:';
allInstanceNameForm.body(body);
structureCollection.getInstanceNames().forEach(instanceName => {
allInstanceNameForm.button(`§2${instanceName}`);
});
return allInstanceNameForm;
}
}