diff --git a/Construct[BP]/scripts/options/easyPlace.js b/Construct[BP]/scripts/options/easyPlace.js index 3cd44b7..7ad3ae8 100644 --- a/Construct[BP]/scripts/options/easyPlace.js +++ b/Construct[BP]/scripts/options/easyPlace.js @@ -11,7 +11,7 @@ const builderOption = new BuilderOption({ identifier: 'easyPlace', displayName: 'Easy Place', description: 'Always place the correct structure block.', - howToUse: "Place blocks in a structure with a paper named 'Easy Place' in the inventory slot above your first hotbar slot to always place the correct block." + howToUse: "Name a paper 'Easy Place', then put it in the inventory slot above your first hotbar slot to always place the correct blocks in a structure." }); world.beforeEvents.playerPlaceBlock.subscribe(onPlayerPlaceBlock); @@ -30,7 +30,10 @@ function hasActionItemInCorrectSlot(player) { if (!inventory) return false; const actionSlot = inventory.getSlot(ACTION_SLOT); - return actionSlot.hasItem() && actionSlot.typeId === 'minecraft:paper' && actionSlot.nameTag === 'Easy Place'; + return actionSlot.hasItem() + && actionSlot.typeId === 'minecraft:paper' + && actionSlot.nameTag?.toLowerCase().includes('easy') + && actionSlot.nameTag?.toLowerCase().includes('place'); } function tryPlaceBlock(event, player, block, structureBlock) { @@ -52,7 +55,7 @@ function shouldPreventAction(player, structureBlock) { function preventAction(event, player) { event.cancel = true; system.run(() => { - player.onScreenDisplay.setActionBar('§cAction prevented by easyPlace.'); + player.onScreenDisplay.setActionBar('§cAction prevented by Easy Place.'); }); } diff --git a/Construct[BP]/scripts/options/fastEasyPlace.js b/Construct[BP]/scripts/options/fastEasyPlace.js index 6163ae9..fda754b 100644 --- a/Construct[BP]/scripts/options/fastEasyPlace.js +++ b/Construct[BP]/scripts/options/fastEasyPlace.js @@ -11,7 +11,7 @@ const builderOption = new BuilderOption({ identifier: 'fastEasyPlace', displayName: 'Fast Easy Place', description: 'Place correct structure blocks just by looking at them.', - howToUse: "Look at structure blocks with a paper named 'Easy Place' in your hand to place them.", + howToUse: "Hold a paper named 'Easy Place' in your hand and look at blocks in a structure to place them." }); system.runInterval(onTick, PROCESS_INTERVAL); @@ -37,7 +37,9 @@ function isHoldingActionItem(player) { const mainhandItemStack = player.getComponent(EntityComponentTypes.Equippable).getEquipment(EquipmentSlot.Mainhand); if (!mainhandItemStack) return false; - return mainhandItemStack.typeId === 'minecraft:paper' && mainhandItemStack.nameTag === 'Easy Place'; + return mainhandItemStack.typeId === 'minecraft:paper' + && mainhandItemStack.nameTag?.toLowerCase().includes('easy') + && mainhandItemStack.nameTag?.toLowerCase().includes('place'); } function tryPlaceBlock(player, worldBlock, structureBlock) { diff --git a/Construct[BP]/scripts/options/materialGrabber.js b/Construct[BP]/scripts/options/materialGrabber.js index 43a457a..0f69733 100644 --- a/Construct[BP]/scripts/options/materialGrabber.js +++ b/Construct[BP]/scripts/options/materialGrabber.js @@ -8,7 +8,7 @@ const builderOption = new BuilderOption({ identifier: 'materialGrabber', displayName: 'Material Grabber', description: 'Pulls structure items from inventories.', - howToUse: "Interact with inventories using an item named 'Material Grabber' to pull structure items from them.", + howToUse: "Interact with inventories using an item named 'Material Grabber' to pull structure items from them." }); world.beforeEvents.itemUse.subscribe(onItemUse); @@ -40,7 +40,8 @@ function onPlayerInteract(event) { } function isActionItem(itemStack) { - return itemStack?.nameTag === 'Material Grabber'; + return itemStack?.nameTag?.toLowerCase().includes('material') + && itemStack?.nameTag?.toLowerCase().includes('grabber'); } function getActiveMaterials(player) {