Now is standalone from Canopy

This commit is contained in:
ForestOfLight
2025-04-20 02:06:55 -07:00
Unverified
parent d6c9acdaab
commit 1ca91a0993
28 changed files with 256 additions and 151 deletions
@@ -1,20 +1,15 @@
import { BuilderOption } from '../classes/Builder/BuilderOption';
import { world } from '@minecraft/server';
new BuilderOption({
const builderOption = new BuilderOption({
identifier: 'materialGrabber',
displayName: 'Material Grabber',
description: 'Pulls structure items from inventories.',
howToUse: "Interact with inventories using a paper named 'Material Grabber' to pull structure items from them.",
onEnableCallback: () => {
world.beforeEvents.playerInteractWithBlock.subscribe(onPlayerInteract);
world.beforeEvents.playerInteractWithEntity.subscribe(onPlayerInteract);
},
onDisableCallback: () => {
world.beforeEvents.playerInteractWithBlock.unsubscribe(onPlayerInteract);
world.beforeEvents.playerInteractWithEntity.unsubscribe(onPlayerInteract);
}
})
});
world.beforeEvents.playerInteractWithBlock.subscribe(onPlayerInteract);
world.beforeEvents.playerInteractWithEntity.subscribe(onPlayerInteract);
function onPlayerInteract(event) {
// get inventory