From bab8c7b178fe40feca033f38d876669ffdbaf8f6 Mon Sep 17 00:00:00 2001 From: ForestOfLight Date: Mon, 21 Oct 2024 23:41:35 -0700 Subject: [PATCH] handle not holding item error in allowBubbleColumnPlace --- Canopy [BP]/scripts/src/rules/allowBubbleColumnPlacement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Canopy [BP]/scripts/src/rules/allowBubbleColumnPlacement.js b/Canopy [BP]/scripts/src/rules/allowBubbleColumnPlacement.js index 962a422..a20ca7e 100644 --- a/Canopy [BP]/scripts/src/rules/allowBubbleColumnPlacement.js +++ b/Canopy [BP]/scripts/src/rules/allowBubbleColumnPlacement.js @@ -10,7 +10,7 @@ new Rule({ world.beforeEvents.playerPlaceBlock.subscribe((event) => { if (!event.player || !Rule.getNativeValue('allowBubbleColumnPlacement')) return; system.run(() => { - if (event.player.getComponent('equippable').getEquipment('Mainhand').typeId === 'minecraft:bubble_column') { + if (event.player.getComponent('equippable').getEquipment('Mainhand')?.typeId === 'minecraft:bubble_column') { world.structureManager.place('mystructure:bubble_column', event.dimension, event.block.location); } });