Now is standalone from Canopy
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user