11 Commits

Author SHA1 Message Date
c81a852e72 Fixed Hammer Durability not registering
All checks were successful
Draft Release / deploy-prod (push) Successful in 5s
2025-05-17 16:53:58 +01:00
723cbfc483 Data cleanup
All checks were successful
Draft Release / deploy-prod (push) Successful in 11s
Update uninstall command
Increased hammer durability
2025-05-17 10:48:51 +01:00
4f37178857 Updated Rarity of Hammer
All checks were successful
Draft Release / deploy-prod (push) Successful in 5s
Updated custom_name to item_name
2025-05-17 02:32:02 +01:00
56570f452c Update .gitea/workflows/draft_release.yaml
All checks were successful
Draft Release / deploy-prod (push) Successful in 12s
2025-05-17 01:10:41 +00:00
d8f83b2777 Updated Source uses
Some checks failed
Draft Release / deploy-prod (push) Failing after 10s
2025-05-17 01:09:03 +00:00
21d45e781e Updated README 2025-05-17 01:51:35 +01:00
b4b08bc662 Uniform Tab Size
Some checks failed
Draft Release / deploy-prod (push) Failing after 17s
2025-05-17 01:49:32 +01:00
c6a7150041 Added Hammer
Added Unbreaking tag
Renamed rayloop to loop
2025-05-17 01:47:52 +01:00
d97807baf3 Add .gitea/workflows/draft_release.yaml
All checks were successful
Draft Release / deploy-prod (push) Successful in 7s
2025-05-16 13:04:58 +00:00
6b4033e081 Fixed blocks not being removed with Trowel
Removed unneeded tags
Added clean trowel data after use
2025-05-16 02:02:01 +01:00
329f879cd8 updated tags and scoreboards
added sound to action
fixed damage when in offhand
2025-05-15 23:20:41 +01:00
186 changed files with 2180 additions and 1763 deletions

View File

@@ -0,0 +1,26 @@
name: Draft Release
on:
push:
tags:
- '*'
jobs:
deploy-prod:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: https://git.lzstealth.com/actions/checkout@v4
- name: Zip Repository
run: zip -r "${{ gitea.workspace }}/${{ vars.FILE_NAME }} ${{ gitea.ref_name }}.zip" ./*
- name: Create Release
id: create_release
uses: https://git.lzstealth.com/actions/gitea-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ gitea.ref_name }}
name: Release ${{ gitea.ref_name }}
draft: true
prerelease: false
files: |-
${{ gitea.workspace }}/${{ vars.FILE_NAME }} ${{ gitea.ref_name }}.zip

View File

@@ -3,6 +3,7 @@
## Tools
- Wrench - Rotates blocks
- Trowels - Places random blocks from the hotbar
- Hammer - Break a 3x3 area
Additionally, you can change the Wrench's mode by right clicking in your offhand.
Information on how the different wrench modes work is available [here](WrenchModes.md).

View File

@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "lzstools:item/hammer/hammer"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

View File

@@ -1,19 +1,61 @@
{
"model": {
"type": "select",
"property": "custom_model_data",
"fallback": {
"type": "minecraft:model",
"model": "minecraft:item/carrot_on_a_stick"
},
"cases": [
{ "when": "lzstools:wrench_default", "model": { "type": "model", "model": "lzstools:items/wrench/default" } },
{ "when": "lzstools:wrench_flip", "model": { "type": "model", "model": "lzstools:items/wrench/flip" } },
{ "when": "lzstools:wrench_face_player", "model": { "type": "model", "model": "lzstools:items/wrench/face_player" } },
{ "when": "lzstools:wrench_face_click", "model": { "type": "model", "model": "lzstools:items/wrench/face_click" } },
{ "when": "lzstools:wrench_terracotta", "model": { "type": "model", "model": "lzstools:items/wrench/terracotta" } },
{ "when": "lzstools:trowel_iron", "model": { "type": "model", "model": "lzstools:items/trowel/iron" } },
{ "when": "lzstools:trowel_diamond", "model": { "type": "model", "model": "lzstools:items/trowel/diamond" } }
]
}
"model": {
"type": "select",
"property": "custom_model_data",
"fallback": {
"type": "minecraft:model",
"model": "minecraft:item/carrot_on_a_stick"
},
"cases": [
{
"when": "lzstools:wrench_default",
"model": {
"type": "model",
"model": "lzstools:items/wrench/default"
}
},
{
"when": "lzstools:wrench_flip",
"model": {
"type": "model",
"model": "lzstools:items/wrench/flip"
}
},
{
"when": "lzstools:wrench_face_player",
"model": {
"type": "model",
"model": "lzstools:items/wrench/face_player"
}
},
{
"when": "lzstools:wrench_face_click",
"model": {
"type": "model",
"model": "lzstools:items/wrench/face_click"
}
},
{
"when": "lzstools:wrench_terracotta",
"model": {
"type": "model",
"model": "lzstools:items/wrench/terracotta"
}
},
{
"when": "lzstools:trowel_iron",
"model": {
"type": "model",
"model": "lzstools:items/trowel/iron"
}
},
{
"when": "lzstools:trowel_diamond",
"model": {
"type": "model",
"model": "lzstools:items/trowel/diamond"
}
}
]
}
}

View File

@@ -0,0 +1,19 @@
{
"model": {
"type": "select",
"property": "custom_model_data",
"fallback": {
"type": "minecraft:model",
"model": "minecraft:item/iron_pickaxe"
},
"cases": [
{
"when": "lzstools:hammer",
"model": {
"type": "model",
"model": "lzstools:items/hammer/hammer"
}
}
]
}
}

View File

@@ -0,0 +1,32 @@
{
"display": {
"icon": {
"id": "minecraft:iron_pickaxe",
"components": {
"minecraft:custom_model_data": {
"strings": [
"lzstools:hammer"
]
}
}
},
"title": {
"text": "Hammering out the details"
},
"description": {
"text": "Craft a Hammer"
},
"show_toast": true,
"announce_to_chat": false,
"hidden": false
},
"parent": "lzstools:visible/root",
"criteria": {
"": {
"trigger": "minecraft:recipe_crafted",
"conditions": {
"recipe_id": "lzstools_hammer:hammer"
}
}
}
}

View File

@@ -1,5 +1,4 @@
scoreboard players set @s lz_click_check 0
scoreboard players set @s lzt_click_check 0
# Wrench
execute if predicate lzstools:wrench/mainhand run function lzstools_wrench:wrench/rotate

View File

@@ -0,0 +1,4 @@
scoreboard players set @s lzt_hammer_check 0
# Hammer
execute if predicate lzstools:hammer/mainhand run function lzstools_hammer:mainhand

View File

@@ -0,0 +1 @@
give @s minecraft:iron_pickaxe[minecraft:item_name={"text":"Hammer","color":"light_purple"},minecraft:custom_model_data={strings:["lzstools:hammer"]},minecraft:custom_data={"lzstools":["hammer"]},minecraft:max_damage=2400]

View File

@@ -1 +1 @@
give @s minecraft:carrot_on_a_stick[minecraft:custom_name={"text":"Diamond Trowel","color":"aqua"},minecraft:custom_model_data={strings:["lzstools:trowel_diamond"]},minecraft:custom_data={"lzstools":["trowel","trowel_diamond"]}]
give @s minecraft:carrot_on_a_stick[minecraft:item_name={"text":"Diamond Trowel","color":"aqua"},minecraft:custom_model_data={strings:["lzstools:trowel_diamond"]},minecraft:custom_data={"lzstools":["trowel","trowel_diamond"]}]

View File

@@ -1 +1 @@
give @s minecraft:carrot_on_a_stick[minecraft:custom_name={"text":"Iron Trowel","color":"aqua"},minecraft:custom_model_data={strings:["lzstools:trowel_iron"]},minecraft:custom_data={"lzstools":["trowel","trowel_iron"]}]
give @s minecraft:carrot_on_a_stick[minecraft:item_name={"text":"Iron Trowel","color":"aqua"},minecraft:custom_model_data={strings:["lzstools:trowel_iron"]},minecraft:custom_data={"lzstools":["trowel","trowel_iron"]}]

View File

@@ -1 +1 @@
give @s minecraft:carrot_on_a_stick[minecraft:custom_name={"text":"Rotator Wrench","color":"aqua"},minecraft:lore=["Default"],minecraft:custom_model_data={strings:["lzstools:wrench_default"]},minecraft:custom_data={"lzstools":["wrench"]},minecraft:unbreakable={},minecraft:enchantment_glint_override=false,minecraft:tooltip_display={hidden_components:["minecraft:unbreakable"]}]
give @s minecraft:carrot_on_a_stick[minecraft:item_name={"text":"Rotator Wrench","color":"aqua"},minecraft:lore=["Default"],minecraft:custom_model_data={strings:["lzstools:wrench_default"]},minecraft:custom_data={"lzstools":["wrench"]},minecraft:unbreakable={},minecraft:enchantment_glint_override=false,minecraft:tooltip_display={hidden_components:["minecraft:unbreakable"]}]

View File

@@ -1,17 +1,29 @@
# Click Check
scoreboard objectives add lz_click_check minecraft.used:minecraft.carrot_on_a_stick
scoreboard objectives add lzt_click_check minecraft.used:minecraft.carrot_on_a_stick
# Wrench
scoreboard objectives add lz_wrench_success dummy
scoreboard objectives add lz_wrench_raycast dummy
scoreboard objectives add lzt_wrench_success dummy
scoreboard objectives add lzt_wrench_raycast dummy
# Trowel
scoreboard objectives add lz_trowel_success dummy
scoreboard objectives add lz_trowel_raycast dummy
scoreboard objectives add lz_trowel_raycast_hit dummy
scoreboard objectives add lz_trowel_block_length dummy
scoreboard objectives add lz_chosen_block_check dummy
scoreboard objectives add lz_trowel_unbreaking_check dummy
scoreboard objectives add lz_trowel_unbreaking_chance dummy
scoreboard objectives add lz_trowel_damage dummy
scoreboard objectives add lz_trowel_max_damage dummy
scoreboard objectives add lzt_trowel_success dummy
scoreboard objectives add lzt_trowel_raycast dummy
scoreboard objectives add lzt_trowel_raycast_hit dummy
scoreboard objectives add lzt_trowel_block_check dummy
scoreboard objectives add lzt_trowel_block_length dummy
scoreboard objectives add lzt_trowel_unbreaking_check dummy
scoreboard objectives add lzt_trowel_unbreaking_chance dummy
scoreboard objectives add lzt_trowel_damage dummy
scoreboard objectives add lzt_trowel_max_damage dummy
# Hammer
scoreboard objectives add lzt_hammer_check minecraft.used:minecraft.iron_pickaxe
scoreboard objectives add lzt_hammer_success dummy
scoreboard objectives add lzt_hammer_raycast dummy
scoreboard objectives add lzt_hammer_raycast_hit dummy
scoreboard objectives add lzt_hammer_side_raycast dummy
scoreboard objectives add lzt_hammer_side_raycast_hit dummy
scoreboard objectives add lzt_hammer_unbreaking_check dummy
scoreboard objectives add lzt_hammer_unbreaking_chance dummy
scoreboard objectives add lzt_hammer_damage dummy
scoreboard objectives add lzt_hammer_max_damage dummy

View File

@@ -1,3 +1,4 @@
recipe give @s lzstools_wrench:wrench
recipe give @s lzstools_trowel:iron
recipe give @s lzstools_trowel:diamond
recipe give @s lzstools_hammer:hammer

View File

@@ -1,2 +1,5 @@
# Click Check
execute as @a if score @s lz_click_check matches 1.. run function lzstools:player
execute as @a if score @s lzt_click_check matches 1.. run function lzstools:check_click
# Hammer Click Check
execute as @a if score @s lzt_hammer_check matches 1.. run function lzstools:check_hammer

View File

@@ -1,4 +1,31 @@
# Uninstall
scoreboard objectives remove lz_click_check
scoreboard objectives remove lz_wrench_success
scoreboard objectives remove lz_wrench_raycast
# Click Check
scoreboard objectives remove lzt_click_check
# Wrench
scoreboard objectives remove lzt_wrench_success
scoreboard objectives remove lzt_wrench_raycast
# Trowel
scoreboard objectives remove lzt_trowel_success
scoreboard objectives remove lzt_trowel_raycast
scoreboard objectives remove lzt_trowel_raycast_hit
scoreboard objectives remove lzt_trowel_block_check
scoreboard objectives remove lzt_trowel_block_length
scoreboard objectives remove lzt_trowel_unbreaking_check
scoreboard objectives remove lzt_trowel_unbreaking_chance
scoreboard objectives remove lzt_trowel_damage
scoreboard objectives remove lzt_trowel_max_damage
# Hammer
scoreboard objectives remove lzt_hammer_check
scoreboard objectives remove lzt_hammer_success
scoreboard objectives remove lzt_hammer_raycast
scoreboard objectives remove lzt_hammer_raycast_hit
scoreboard objectives remove lzt_hammer_side_raycast
scoreboard objectives remove lzt_hammer_side_raycast_hit
scoreboard objectives remove lzt_hammer_unbreaking_check
scoreboard objectives remove lzt_hammer_unbreaking_chance
scoreboard objectives remove lzt_hammer_damage
scoreboard objectives remove lzt_hammer_max_damage

View File

@@ -0,0 +1,17 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"hammer"
]
}
}
}
}
}
}

View File

@@ -1,18 +1,18 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 1
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 1
}
]
}
}
]
}
}
}
}
}

View File

@@ -1,18 +1,18 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 2
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 2
}
]
}
}
]
}
}
}
}
}

View File

@@ -1,18 +1,18 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 3
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 3
}
]
}
}
]
}
}
}
}
}

View File

@@ -1,21 +1,21 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": {
"min": 1,
"max": 3
}
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": {
"min": 1,
"max": 3
}
}
]
}
}
]
}
}
}
}
}

View File

@@ -1,18 +1,18 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 1
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 1
}
]
}
}
]
}
}
}
}
}

View File

@@ -1,18 +1,18 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 2
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 2
}
]
}
}
]
}
}
}
}
}

View File

@@ -1,18 +1,18 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 3
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": 3
}
]
}
}
]
}
}
}
}
}

View File

@@ -1,21 +1,21 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": {
"min": 1,
"max": 3
}
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:unbreaking",
"levels": {
"min": 1,
"max": 3
}
}
]
}
}
]
}
}
}
}
}

View File

@@ -1,17 +1,17 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"wrench"
]
}
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"wrench"
]
}
}
}
}
}
}
}
}

View File

@@ -1,17 +1,17 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"wrench"
]
}
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"wrench"
]
}
}
}
}
}
}
}
}

View File

@@ -0,0 +1,21 @@
{
"replace": false,
"values": [
"minecraft:bedrock",
"minecraft:structure_block",
"minecraft:structure_void",
"minecraft:jigsaw",
"minecraft:command_block",
"minecraft:chain_command_block",
"minecraft:repeating_command_block",
"minecraft:test_instance_block",
"minecraft:test_block",
"minecraft:light",
"minecraft:end_portal",
"minecraft:end_portal_frame",
"minecraft:nether_portal",
"minecraft:reinforced_deepslate",
"minecraft:water",
"minecraft:lava"
]
}

View File

@@ -0,0 +1,22 @@
# Don't run if
execute if block ~ ~ ~ #lzstools:unbreakable run return fail
execute if block ~ ~ ~ #minecraft:air run return fail
execute if score @s lzt_hammer_damage >= @s lzt_hammer_max_damage run return fail
# Spawn item
loot spawn ~ ~ ~ mine ~ ~ ~ mainhand
# Break to update neighbors
clone ~ ~ ~ ~ ~ ~ ~ -64 ~ replace
setblock ~ ~ ~ minecraft:air replace
# Break
gamerule doTileDrops false
clone ~ -64 ~ ~ -64 ~ ~ ~ ~ replace
setblock ~ -64 ~ minecraft:bedrock replace
setblock ~ ~ ~ minecraft:air destroy
gamerule doTileDrops true
# Durability
function lzstools_hammer:durability/handle

View File

@@ -0,0 +1,8 @@
execute positioned ~ ~1 ~ run function lzstools_hammer:break/break
execute positioned ~ ~1 ~1 run function lzstools_hammer:break/break
execute positioned ~ ~1 ~-1 run function lzstools_hammer:break/break
execute positioned ~ ~ ~1 run function lzstools_hammer:break/break
execute positioned ~ ~ ~-1 run function lzstools_hammer:break/break
execute positioned ~ ~-1 ~ run function lzstools_hammer:break/break
execute positioned ~ ~-1 ~1 run function lzstools_hammer:break/break
execute positioned ~ ~-1 ~-1 run function lzstools_hammer:break/break

View File

@@ -0,0 +1,8 @@
execute positioned ~ ~1 ~ run function lzstools_hammer:break/break
execute positioned ~1 ~1 ~ run function lzstools_hammer:break/break
execute positioned ~-1 ~1 ~ run function lzstools_hammer:break/break
execute positioned ~1 ~ ~ run function lzstools_hammer:break/break
execute positioned ~-1 ~ ~ run function lzstools_hammer:break/break
execute positioned ~ ~-1 ~ run function lzstools_hammer:break/break
execute positioned ~1 ~-1 ~ run function lzstools_hammer:break/break
execute positioned ~-1 ~-1 ~ run function lzstools_hammer:break/break

View File

@@ -0,0 +1,8 @@
execute positioned ~1 ~ ~1 run function lzstools_hammer:break/break
execute positioned ~1 ~ ~ run function lzstools_hammer:break/break
execute positioned ~1 ~ ~-1 run function lzstools_hammer:break/break
execute positioned ~-1 ~ ~1 run function lzstools_hammer:break/break
execute positioned ~-1 ~ ~ run function lzstools_hammer:break/break
execute positioned ~-1 ~ ~-1 run function lzstools_hammer:break/break
execute positioned ~ ~ ~1 run function lzstools_hammer:break/break
execute positioned ~ ~ ~-1 run function lzstools_hammer:break/break

View File

@@ -0,0 +1 @@
$item modify entity @s weapon.mainhand {"function":"minecraft:set_components","components":{"minecraft:damage":$(damage)}}

View File

@@ -0,0 +1,3 @@
execute if entity @s[predicate=lzstools_hammer:hammer] at @s anchored eyes run particle minecraft:item{item:"minecraft:iron_pickaxe"} ^ ^-0.35 ^0.65 0.1 0.1 0.1 0.06 10 force
item replace entity @s weapon.mainhand with minecraft:air
playsound minecraft:entity.item.break master @a ~ ~ ~ 1 1

View File

@@ -0,0 +1,13 @@
scoreboard players reset @s lzt_hammer_unbreaking_check
execute if entity @s[predicate=lzstools:unbreaking/mainhand/all] run function lzstools_hammer:durability/unbreaking
execute if score @s lzt_hammer_unbreaking_check matches 1 run return fail
# Handle Damage
data modify storage lzstools:hammer components set from entity @s SelectedItem.components
execute store result score @s lzt_hammer_damage run data get storage lzstools:hammer components."minecraft:damage"
execute store result score @s lzt_hammer_max_damage run data get storage lzstools:hammer components."minecraft:max_damage"
scoreboard players add @s lzt_hammer_damage 1
execute store result storage lzstools:hammer damage int 1 run scoreboard players get @s lzt_hammer_damage
function lzstools_hammer:durability/apply with storage lzstools:hammer
execute if score @s lzt_hammer_damage >= @s lzt_hammer_max_damage run function lzstools_hammer:durability/break

View File

@@ -0,0 +1,4 @@
execute store result score @s lzt_hammer_unbreaking_chance run random value 1..100
execute if entity @s[predicate=lzstools:unbreaking/mainhand/3] if score @s lzt_hammer_unbreaking_chance matches ..75 run return run scoreboard players set @s lzt_hammer_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/mainhand/2] if score @s lzt_hammer_unbreaking_chance matches ..66 run return run scoreboard players set @s lzt_hammer_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/mainhand/1] if score @s lzt_hammer_unbreaking_chance matches ..50 run return run scoreboard players set @s lzt_hammer_unbreaking_check 1

View File

@@ -0,0 +1,2 @@
scoreboard players set @s lzt_hammer_check 0
function lzstools_hammer:raycast/start

View File

@@ -0,0 +1,15 @@
## Raycast Hit
scoreboard players set @s lzt_hammer_raycast_hit 1
setblock ~ ~ ~ minecraft:barrier replace
# Get Raycast Target Coords
function lzstools_hammer:raycast_side/start
setblock ~ ~ ~ minecraft:air replace
execute if score px lzt_hammer_side_raycast matches 0 run return run function lzstools_hammer:break/eastwest
execute if score px lzt_hammer_side_raycast matches 15 run return run function lzstools_hammer:break/eastwest
execute if score pz lzt_hammer_side_raycast matches 0 run return run function lzstools_hammer:break/northsouth
execute if score pz lzt_hammer_side_raycast matches 15 run return run function lzstools_hammer:break/northsouth
execute if score py lzt_hammer_side_raycast matches 0 run return run function lzstools_hammer:break/updown
execute if score py lzt_hammer_side_raycast matches 15 run return run function lzstools_hammer:break/updown

View File

@@ -0,0 +1,7 @@
## Raycast Loop
execute as @s at @n[type=item,nbt={Age:0s},distance=..0.8] run function lzstools_hammer:raycast/hit
# Advance forward and if nothing found
scoreboard players add #distance lzt_hammer_raycast 1
execute if score @s lzt_hammer_raycast_hit matches 0 if score #distance lzt_hammer_raycast matches ..451 positioned ^ ^ ^0.01 run function lzstools_hammer:raycast/loop

View File

@@ -0,0 +1,13 @@
## Raycast Start
scoreboard players set #distance lzt_hammer_raycast 0
scoreboard players set @s lzt_hammer_raycast_hit 0
# Raycast
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_hammer:raycast/loop
# Clean Data
data remove storage lzstools:hammer damage
data remove storage lzstools:hammer components
scoreboard players set @s lzt_hammer_damage 0
scoreboard players set @s lzt_hammer_max_damage 1

View File

@@ -0,0 +1,9 @@
## Raycast Loop
execute if block ~ ~ ~ minecraft:barrier run scoreboard players set @s lzt_hammer_side_raycast_hit 1
execute if score @s lzt_hammer_side_raycast_hit matches 1 run function lzstools_hammer:raycast_side/target_coords
# Advance forward and if nothing found
scoreboard players add #distance lzt_hammer_side_raycast 1
execute if score @s lzt_hammer_side_raycast_hit matches 0 if score #distance lzt_hammer_side_raycast matches ..451 positioned ^ ^ ^0.01 run function lzstools_hammer:raycast_side/loop

View File

@@ -0,0 +1,8 @@
## Raycast Start
scoreboard players set #distance lzt_hammer_side_raycast 0
scoreboard players set @s lzt_hammer_side_raycast_hit 0
# Raycast
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_hammer:raycast_side/loop
# Clean Data

View File

@@ -0,0 +1,22 @@
## Get Raycast Target Coords
# Stored Value for Calc
scoreboard players set c16 lzt_hammer_side_raycast 16
# Summon Invisible Entity
summon area_effect_cloud ~ ~ ~ {Radius:0.01,Duration:1,Tags:["RaycastMark"]}
# Pixel Calculations
execute store result score px lzt_hammer_side_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[0] 16
scoreboard players operation px lzt_hammer_side_raycast %= c16 lzt_hammer_side_raycast
execute if score px lzt_hammer_side_raycast matches ..-1 run scoreboard players add px lzt_hammer_side_raycast 16
execute store result score py lzt_hammer_side_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[1] 16
scoreboard players operation py lzt_hammer_side_raycast %= c16 lzt_hammer_side_raycast
execute if score py lzt_hammer_side_raycast matches ..-1 run scoreboard players add py lzt_hammer_side_raycast 16
execute store result score pz lzt_hammer_side_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[2] 16
scoreboard players operation pz lzt_hammer_side_raycast %= c16 lzt_hammer_side_raycast
execute if score pz lzt_hammer_side_raycast matches ..-1 run scoreboard players add pz lzt_hammer_side_raycast 16
# Remove Entity
kill @e[tag=RaycastMark,sort=nearest,limit=1]

View File

@@ -0,0 +1,17 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"hammer"
]
}
}
}
}
}
}

View File

@@ -0,0 +1,36 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
"h ",
"s ",
"l "
],
"key": {
"h": "minecraft:heavy_core",
"s": "minecraft:stick",
"l": "minecraft:lightning_rod"
},
"result": {
"id": "minecraft:iron_pickaxe",
"count": 1,
"components": {
"minecraft:max_damage": 2400,
"minecraft:item_name": {
"text": "Hammer",
"color": "light_purple",
"italic": false
},
"minecraft:custom_model_data": {
"strings": [
"lzstools:hammer"
]
},
"minecraft:custom_data": {
"lzstools": [
"hammer"
]
}
}
}
}

View File

@@ -1,4 +1,4 @@
scoreboard players set @s lz_trowel_success 0
scoreboard players set @s lzt_trowel_success 0
execute if score @s lz_trowel_success matches 0 run function lzstools_trowel:block/place_normal with storage lzstools:trowel
execute if score @s lz_trowel_success matches 1 run function lzstools_trowel:block/remove_item with storage lzstools:trowel
execute if score @s lzt_trowel_success matches 0 run function lzstools_trowel:block/place_normal with storage lzstools:trowel
execute if score @s lzt_trowel_success matches 1 run function lzstools_trowel:block/remove_item with storage lzstools:trowel

View File

@@ -1,2 +1,2 @@
# Place Leaves
$setblock ~ ~ ~ $(chosen_block)[persistent=true] keep
$execute as @s store result score @s lzt_trowel_success setblock ~ ~ ~ $(chosen_block)[persistent=true] keep

View File

@@ -1,5 +1,5 @@
# Place NESW
$execute as @s[y_rotation=-45..45] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=north] keep
$execute as @s[y_rotation=45..135] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=east] keep
$execute as @s[y_rotation=135..-135] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=south] keep
$execute as @s[y_rotation=-135..-45] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=west] keep
$execute as @s[y_rotation=-45..45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=north] keep
$execute as @s[y_rotation=45..135] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=east] keep
$execute as @s[y_rotation=135..-135] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=south] keep
$execute as @s[y_rotation=-135..-45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=west] keep

View File

@@ -1,7 +1,7 @@
# Place NESWUD
$execute as @s[x_rotation=45..90] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=up] keep
$execute as @s[x_rotation=-90..-45] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=down] keep
$execute as @s[x_rotation=-45..45, y_rotation=-45..45] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=north] keep
$execute as @s[x_rotation=-45..45, y_rotation=45..135] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=east] keep
$execute as @s[x_rotation=-45..45, y_rotation=135..-135] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=south] keep
$execute as @s[x_rotation=-45..45, y_rotation=-135..-45] store result score @s lz_trowel_raycast run setblock ~ ~ ~ $(chosen_block)[facing=west] keep
$execute as @s[x_rotation=45..90] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=up] keep
$execute as @s[x_rotation=-90..-45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=down] keep
$execute as @s[x_rotation=-45..45, y_rotation=-45..45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=north] keep
$execute as @s[x_rotation=-45..45, y_rotation=45..135] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=east] keep
$execute as @s[x_rotation=-45..45, y_rotation=135..-135] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=south] keep
$execute as @s[x_rotation=-45..45, y_rotation=-135..-45] store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[facing=west] keep

View File

@@ -1,3 +1,3 @@
# Place Slabs
$execute as @s if score py lz_trowel_raycast matches 8.. store result score @s lz_wrench_success run setblock ~ ~ ~ $(chosen_block)[type=top] keep
$execute as @s if score py lz_trowel_raycast matches ..7 store result score @s lz_wrench_success run setblock ~ ~ ~ $(chosen_block)[type=bottom] keep
$execute as @s if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[type=top] keep
$execute as @s if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[type=bottom] keep

View File

@@ -1,9 +1,9 @@
# Place Stairs
$execute as @s[y_rotation=-45..45] if score py lz_trowel_raycast matches ..7 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=south] keep
$execute as @s[y_rotation=45..135] if score py lz_trowel_raycast matches ..7 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=west] keep
$execute as @s[y_rotation=135..-135] if score py lz_trowel_raycast matches ..7 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=north] keep
$execute as @s[y_rotation=-135..-45] if score py lz_trowel_raycast matches ..7 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=east] keep
$execute as @s[y_rotation=-45..45] if score py lz_trowel_raycast matches 8.. store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=south] keep
$execute as @s[y_rotation=45..135] if score py lz_trowel_raycast matches 8.. store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=west] keep
$execute as @s[y_rotation=135..-135] if score py lz_trowel_raycast matches 8.. store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=north] keep
$execute as @s[y_rotation=-135..-45] if score py lz_trowel_raycast matches 8.. store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=east] keep
$execute as @s[y_rotation=-45..45] if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=south] keep
$execute as @s[y_rotation=45..135] if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=west] keep
$execute as @s[y_rotation=135..-135] if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=north] keep
$execute as @s[y_rotation=-135..-45] if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=east] keep
$execute as @s[y_rotation=-45..45] if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=south] keep
$execute as @s[y_rotation=45..135] if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=west] keep
$execute as @s[y_rotation=135..-135] if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=north] keep
$execute as @s[y_rotation=-135..-45] if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=east] keep

View File

@@ -1,10 +1,10 @@
# Place Trapdoors
$execute as @s[y_rotation=-45..45] if score py lz_trowel_raycast matches ..7 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=north] keep
$execute as @s[y_rotation=45..135] if score py lz_trowel_raycast matches ..7 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=east] keep
$execute as @s[y_rotation=135..-135] if score py lz_trowel_raycast matches ..7 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=south] keep
$execute as @s[y_rotation=-135..-45] if score py lz_trowel_raycast matches ..7 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=west] keep
$execute as @s[y_rotation=-45..45] if score py lz_trowel_raycast matches 8.. store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=north] keep
$execute as @s[y_rotation=45..135] if score py lz_trowel_raycast matches 8.. store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=east] keep
$execute as @s[y_rotation=135..-135] if score py lz_trowel_raycast matches 8.. store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=south] keep
$execute as @s[y_rotation=-135..-45] if score py lz_trowel_raycast matches 8.. store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=west] keep
$execute as @s[y_rotation=-45..45] if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=north] keep
$execute as @s[y_rotation=45..135] if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=east] keep
$execute as @s[y_rotation=135..-135] if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=south] keep
$execute as @s[y_rotation=-135..-45] if score py lzt_trowel_raycast matches ..7 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=bottom,facing=west] keep
$execute as @s[y_rotation=-45..45] if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=north] keep
$execute as @s[y_rotation=45..135] if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=east] keep
$execute as @s[y_rotation=135..-135] if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=south] keep
$execute as @s[y_rotation=-135..-45] if score py lzt_trowel_raycast matches 8.. store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[half=top,facing=west] keep

View File

@@ -1,7 +1,7 @@
# Place XYZ
$execute as @s if score py lz_trowel_raycast matches 0 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=y] keep
$execute as @s if score py lz_trowel_raycast matches 15 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=y] keep
$execute as @s if score px lz_trowel_raycast matches 0 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=x] keep
$execute as @s if score px lz_trowel_raycast matches 15 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=x] keep
$execute as @s if score pz lz_trowel_raycast matches 0 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=z] keep
$execute as @s if score pz lz_trowel_raycast matches 15 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=z] keep
$execute as @s if score py lzt_trowel_raycast matches 0 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=y] keep
$execute as @s if score py lzt_trowel_raycast matches 15 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=y] keep
$execute as @s if score px lzt_trowel_raycast matches 0 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=x] keep
$execute as @s if score px lzt_trowel_raycast matches 15 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=x] keep
$execute as @s if score pz lzt_trowel_raycast matches 0 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=z] keep
$execute as @s if score pz lzt_trowel_raycast matches 15 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block)[axis=z] keep

View File

@@ -3,14 +3,14 @@ function lzstools_trowel:block/target_coords
$setblock ~ -64 ~ $(chosen_block)
execute if score @s lz_trowel_success matches 0 if block ~ -64 ~ #lzstools:xyz run function lzstools_trowel:block/place/xyz with storage lzstools:trowel
execute if score @s lz_trowel_success matches 0 if block ~ -64 ~ #lzstools:neswud run function lzstools_trowel:block/place/neswud with storage lzstools:trowel
execute if score @s lz_trowel_success matches 0 if block ~ -64 ~ #lzstools:nesw run function lzstools_trowel:block/place/nesw with storage lzstools:trowel
execute if score @s lz_trowel_success matches 0 if block ~ -64 ~ #lzstools:glazed_terracotta run function lzstools_trowel:block/place/nesw with storage lzstools:trowel
execute if score @s lz_trowel_success matches 0 if block ~ -64 ~ #minecraft:leaves run function lzstools_trowel:block/place/leaves with storage lzstools:trowel
execute if score @s lz_trowel_success matches 0 if block ~ -64 ~ #minecraft:trapdoors run function lzstools_trowel:block/place/trapdoors with storage lzstools:trowel
execute if score @s lz_trowel_success matches 0 if block ~ -64 ~ #minecraft:stairs run function lzstools_trowel:block/place/stairs with storage lzstools:trowel
execute if score @s lz_trowel_success matches 0 if block ~ -64 ~ #minecraft:slabs run function lzstools_trowel:block/place/slabs with storage lzstools:trowel
$execute if score @s lz_trowel_success matches 0 store result score @s lz_trowel_success run setblock ~ ~ ~ $(chosen_block) keep
execute if score @s lzt_trowel_success matches 0 if block ~ -64 ~ #lzstools:xyz run function lzstools_trowel:block/place/xyz with storage lzstools:trowel
execute if score @s lzt_trowel_success matches 0 if block ~ -64 ~ #lzstools:neswud run function lzstools_trowel:block/place/neswud with storage lzstools:trowel
execute if score @s lzt_trowel_success matches 0 if block ~ -64 ~ #lzstools:nesw run function lzstools_trowel:block/place/nesw with storage lzstools:trowel
execute if score @s lzt_trowel_success matches 0 if block ~ -64 ~ #lzstools:glazed_terracotta run function lzstools_trowel:block/place/nesw with storage lzstools:trowel
execute if score @s lzt_trowel_success matches 0 if block ~ -64 ~ #minecraft:leaves run function lzstools_trowel:block/place/leaves with storage lzstools:trowel
execute if score @s lzt_trowel_success matches 0 if block ~ -64 ~ #minecraft:trapdoors run function lzstools_trowel:block/place/trapdoors with storage lzstools:trowel
execute if score @s lzt_trowel_success matches 0 if block ~ -64 ~ #minecraft:stairs run function lzstools_trowel:block/place/stairs with storage lzstools:trowel
execute if score @s lzt_trowel_success matches 0 if block ~ -64 ~ #minecraft:slabs run function lzstools_trowel:block/place/slabs with storage lzstools:trowel
$execute if score @s lzt_trowel_success matches 0 store result score @s lzt_trowel_success run setblock ~ ~ ~ $(chosen_block) keep
setblock ~ -64 ~ bedrock

View File

@@ -1,22 +1,22 @@
## Get Raycast Target Coords
# Stored Value for Calc
scoreboard players set c16 lz_trowel_raycast 16
scoreboard players set c16 lzt_trowel_raycast 16
# Summon Invisible Entity
summon area_effect_cloud ~ ~ ~ {Radius:0.01,Duration:1,Tags:["RaycastMark"]}
# Pixel Calculations
execute store result score px lz_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[0] 16
scoreboard players operation px lz_trowel_raycast %= c16 lz_trowel_raycast
execute if score px lz_trowel_raycast matches ..-1 run scoreboard players add px lz_trowel_raycast 16
execute store result score px lzt_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[0] 16
scoreboard players operation px lzt_trowel_raycast %= c16 lzt_trowel_raycast
execute if score px lzt_trowel_raycast matches ..-1 run scoreboard players add px lzt_trowel_raycast 16
execute store result score py lz_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[1] 16
scoreboard players operation py lz_trowel_raycast %= c16 lz_trowel_raycast
execute if score py lz_trowel_raycast matches ..-1 run scoreboard players add py lz_trowel_raycast 16
execute store result score py lzt_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[1] 16
scoreboard players operation py lzt_trowel_raycast %= c16 lzt_trowel_raycast
execute if score py lzt_trowel_raycast matches ..-1 run scoreboard players add py lzt_trowel_raycast 16
execute store result score pz lz_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[2] 16
scoreboard players operation pz lz_trowel_raycast %= c16 lz_trowel_raycast
execute if score pz lz_trowel_raycast matches ..-1 run scoreboard players add pz lz_trowel_raycast 16
execute store result score pz lzt_trowel_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[2] 16
scoreboard players operation pz lzt_trowel_raycast %= c16 lzt_trowel_raycast
execute if score pz lzt_trowel_raycast matches ..-1 run scoreboard players add pz lzt_trowel_raycast 16
# Remove Entity
kill @e[tag=RaycastMark,sort=nearest,limit=1]

View File

@@ -1,13 +1,13 @@
scoreboard players reset @s lz_trowel_unbreaking_check
scoreboard players reset @s lzt_trowel_unbreaking_check
execute if entity @s[predicate=lzstools:unbreaking/mainhand/all] run function lzstools_trowel:durability/mainhand/unbreaking
execute if score @s lz_trowel_unbreaking_check matches 1 run return fail
execute if score @s lzt_trowel_unbreaking_check matches 1 run return fail
# Handle Damage
data modify storage lzstools:trowel components set from entity @s SelectedItem.components
execute store result score @s lz_trowel_damage run data get storage lzstools:trowel components."minecraft:damage"
execute store result score @s lz_trowel_max_damage run data get storage lzstools:trowel components."minecraft:max_damage"
scoreboard players add @s lz_trowel_damage 1
execute store result storage lzstools:trowel damage int 1 run scoreboard players get @s lz_trowel_damage
execute store result score @s lzt_trowel_damage run data get storage lzstools:trowel components."minecraft:damage"
execute store result score @s lzt_trowel_max_damage run data get storage lzstools:trowel components."minecraft:max_damage"
scoreboard players add @s lzt_trowel_damage 1
execute store result storage lzstools:trowel damage int 1 run scoreboard players get @s lzt_trowel_damage
function lzstools_trowel:durability/mainhand/apply with storage lzstools:trowel
execute if score @s lz_trowel_damage >= @s lz_trowel_max_damage run function lzstools_trowel:durability/mainhand/break
execute if score @s lzt_trowel_damage >= @s lzt_trowel_max_damage run function lzstools_trowel:durability/mainhand/break

View File

@@ -1,4 +1,4 @@
execute store result score @s lz_trowel_unbreaking_chance run random value 1..100
execute if entity @s[predicate=lzstools:unbreaking/mainhand/3] if score @s lz_trowel_unbreaking_chance matches ..75 run return run scoreboard players set @s lz_trowel_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/mainhand/2] if score @s lz_trowel_unbreaking_chance matches ..66 run return run scoreboard players set @s lz_trowel_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/mainhand/1] if score @s lz_trowel_unbreaking_chance matches ..50 run return run scoreboard players set @s lz_trowel_unbreaking_check 1
execute store result score @s lzt_trowel_unbreaking_chance run random value 1..100
execute if entity @s[predicate=lzstools:unbreaking/mainhand/3] if score @s lzt_trowel_unbreaking_chance matches ..75 run return run scoreboard players set @s lzt_trowel_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/mainhand/2] if score @s lzt_trowel_unbreaking_chance matches ..66 run return run scoreboard players set @s lzt_trowel_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/mainhand/1] if score @s lzt_trowel_unbreaking_chance matches ..50 run return run scoreboard players set @s lzt_trowel_unbreaking_check 1

View File

@@ -1,13 +1,13 @@
scoreboard players reset @s lz_trowel_unbreaking_check
scoreboard players reset @s lzt_trowel_unbreaking_check
execute if entity @s[predicate=lzstools:unbreaking/offhand/all] run function lzstools_trowel:durability/offhand/unbreaking
execute if score @s lz_trowel_unbreaking_check matches 1 run return fail
execute if score @s lzt_trowel_unbreaking_check matches 1 run return fail
# Handle Damage
data modify storage lzstools:trowel components set from entity @s SelectedItem.components
execute store result score @s lz_trowel_damage run data get storage lzstools:trowel components."minecraft:damage"
execute store result score @s lz_trowel_max_damage run data get storage lzstools:trowel components."minecraft:max_damage"
scoreboard players add @s lz_trowel_damage 1
execute store result storage lzstools:trowel damage int 1 run scoreboard players get @s lz_trowel_damage
data modify storage lzstools:trowel components set from entity @s equipment.offhand.components
execute store result score @s lzt_trowel_damage run data get storage lzstools:trowel components."minecraft:damage"
execute store result score @s lzt_trowel_max_damage run data get storage lzstools:trowel components."minecraft:max_damage"
scoreboard players add @s lzt_trowel_damage 1
execute store result storage lzstools:trowel damage int 1 run scoreboard players get @s lzt_trowel_damage
function lzstools_trowel:durability/offhand/apply with storage lzstools:trowel
execute if score @s lz_trowel_damage >= @s lz_trowel_max_damage run function lzstools_trowel:durability/offhand/break
execute if score @s lzt_trowel_damage >= @s lzt_trowel_max_damage run function lzstools_trowel:durability/offhand/break

View File

@@ -1,4 +1,4 @@
execute store result score @s lz_trowel_unbreaking_chance run random value 1..100
execute if entity @s[predicate=lzstools:unbreaking/offhand/3] if score @s lz_trowel_unbreaking_chance matches ..75 run return run scoreboard players set @s lz_trowel_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/offhand/2] if score @s lz_trowel_unbreaking_chance matches ..66 run return run scoreboard players set @s lz_trowel_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/offhand/1] if score @s lz_trowel_unbreaking_chance matches ..50 run return run scoreboard players set @s lz_trowel_unbreaking_check 1
execute store result score @s lzt_trowel_unbreaking_chance run random value 1..100
execute if entity @s[predicate=lzstools:unbreaking/offhand/3] if score @s lzt_trowel_unbreaking_chance matches ..75 run return run scoreboard players set @s lzt_trowel_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/offhand/2] if score @s lzt_trowel_unbreaking_chance matches ..66 run return run scoreboard players set @s lzt_trowel_unbreaking_check 1
execute if entity @s[predicate=lzstools:unbreaking/offhand/1] if score @s lzt_trowel_unbreaking_chance matches ..50 run return run scoreboard players set @s lzt_trowel_unbreaking_check 1

View File

@@ -14,14 +14,14 @@ data modify storage lzstools:trowel inventory set from entity @s Inventory
function lzstools_trowel:random/check_hotbar with storage lzstools:trowel
# Get blocks length
execute store result score @s lz_trowel_block_length run data get storage lzstools:trowel blocks
scoreboard players remove @s lz_trowel_block_length 1
execute store result score @s lzt_trowel_block_length run data get storage lzstools:trowel blocks
scoreboard players remove @s lzt_trowel_block_length 1
# Stop if no blocks
execute if score @s lz_trowel_block_length matches ..-1 run return fail
execute if score @s lzt_trowel_block_length matches ..-1 run return fail
# Store result
execute store result storage lzstools:trowel length int 1 run scoreboard players get @s lz_trowel_block_length
execute store result storage lzstools:trowel length int 1 run scoreboard players get @s lzt_trowel_block_length
# Pick Block
execute store result storage lzstools:trowel chosen_index int 1 run function lzstools_trowel:random/random with storage lzstools:trowel

View File

@@ -5,12 +5,15 @@ execute if entity @n[distance=..1] run return fail
function lzstools_trowel:random/start
# No block, don't place and end
execute store result score @s lz_chosen_block_check run data get storage lzstools:trowel chosen_block
execute if score @s lz_chosen_block_check matches 0 run return fail
execute store result score @s lzt_trowel_block_check run data get storage lzstools:trowel chosen_block
execute if score @s lzt_trowel_block_check matches 0 run return fail
execute at @s run playsound minecraft:block.stone.place master @a ~ ~ ~ 1 1.2
execute at @s run playsound minecraft:block.azalea_leaves.place master @a ~ ~ ~ 0.3 1
# Place block
function lzstools_trowel:block/place
# Durability
execute if entity @s[tag=lztools_trowel_mainhand,gamemode=!creative] run function lzstools_trowel:durability/mainhand/handle
execute if entity @s[tag=lztools_trowel_offhand,gamemode=!creative] run function lzstools_trowel:durability/offhand/handle
execute if entity @s[tag=lzstools_trowel_mainhand,gamemode=!creative] run function lzstools_trowel:durability/mainhand/handle
execute if entity @s[tag=lzstools_trowel_offhand,gamemode=!creative] run function lzstools_trowel:durability/offhand/handle

View File

@@ -0,0 +1,14 @@
## Raycast
# Set block data
execute as @s store result score @s lzt_trowel_raycast_hit run loot spawn ~ -65 ~ mine ~ ~ ~ minecraft:netherite_pickaxe[minecraft:enchantments={"minecraft:silk_touch":1}]
execute as @s run kill @n[type=minecraft:item,distance=..0.5,y=-65]
execute as @s if score @s lzt_trowel_raycast_hit matches 1 positioned ^ ^ ^-0.01 run function lzstools_trowel:raycast/hit
execute if score @s lzt_trowel_raycast_hit matches 1 run tag @s remove lzstools_trowel_mainhand
execute if score @s lzt_trowel_raycast_hit matches 1 run tag @s remove lzstools_trowel_offhand
# Advance forward and if nothing found
scoreboard players add #distance lzt_trowel_raycast 1
execute if score @s lzt_trowel_raycast_hit matches 0 if score #distance lzt_trowel_raycast matches ..451 positioned ^ ^ ^0.01 run function lzstools_trowel:raycast/loop

View File

@@ -1,14 +0,0 @@
## Raycast
# Set block data
execute as @s store result score @s lz_trowel_raycast_hit run loot spawn ~ -65 ~ mine ~ ~ ~ minecraft:netherite_pickaxe[minecraft:enchantments={"minecraft:silk_touch":1}]
execute as @s run kill @n[type=minecraft:item,distance=..0.5,y=-65]
execute as @s if score @s lz_trowel_raycast_hit matches 1 positioned ^ ^ ^-0.01 run function lzstools_trowel:raycast/hit
execute if score @s lz_trowel_raycast_hit matches 1 run tag @s remove lzstools_trowel_mainhand
execute if score @s lz_trowel_raycast_hit matches 1 run tag @s remove lzstools_trowel_offhand
# Advance forward and if nothing found
scoreboard players add #distance lz_trowel_raycast 1
execute if score @s lz_trowel_raycast_hit matches 0 if score #distance lz_trowel_raycast matches ..451 positioned ^ ^ ^0.01 run function lzstools_trowel:raycast/rayloop

View File

@@ -1,9 +1,18 @@
#Setting up the raycasting data.
scoreboard players set #distance lz_trowel_raycast 0
tag @s add lz_trowel_raycast
scoreboard players set #distance lzt_trowel_raycast 0
#Activating the raycast. This function will call itself until it is done.
execute as @e[tag=lz_trowel_raycast] at @s anchored eyes positioned ^ ^ ^ run function lzstools_trowel:raycast/rayloop
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_trowel:raycast/loop
#Raycasting finished, removing tag from the raycaster.
tag @s remove lz_trowel_raycast
# Clean Data
data remove storage lzstools:trowel inventory
data remove storage lzstools:trowel components
data remove storage lzstools:trowel damage
data remove storage lzstools:trowel slots
data remove storage lzstools:trowel blocks
data remove storage lzstools:trowel length
data remove storage lzstools:trowel temp_slot
data remove storage lzstools:trowel temp_id
data remove storage lzstools:trowel chosen_index
data remove storage lzstools:trowel chosen_block
data remove storage lzstools:trowel chosen_slot

View File

@@ -1,17 +1,17 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"trowel_diamond"
]
}
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"trowel_diamond"
]
}
}
}
}
}
}
}
}

View File

@@ -1,17 +1,17 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"trowel_diamond"
]
}
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"trowel_iron"
]
}
}
}
}
}
}
}
}

View File

@@ -1,17 +1,17 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"trowel_diamond"
]
}
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"trowel_diamond"
]
}
}
}
}
}
}
}
}

View File

@@ -1,17 +1,17 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"trowel_diamond"
]
}
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"predicates": {
"minecraft:custom_data": {
"lzstools": [
"trowel_iron"
]
}
}
}
}
}
}
}
}

View File

@@ -1,36 +1,36 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
" ",
"s ",
" dd"
],
"key": {
"s": "minecraft:stick",
"d": "minecraft:diamond"
},
"result": {
"id": "minecraft:carrot_on_a_stick",
"count": 1,
"components": {
"minecraft:max_damage": 4500,
"minecraft:custom_name": {
"text": "Diamond Trowel",
"color": "aqua",
"italic": false
},
"minecraft:custom_model_data": {
"strings": [
"lzstools:trowel_diamond"
]
},
"minecraft:custom_data": {
"lzstools": [
"trowel",
"trowel_diamond"
]
}
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
" ",
"s ",
" dd"
],
"key": {
"s": "minecraft:stick",
"d": "minecraft:diamond"
},
"result": {
"id": "minecraft:carrot_on_a_stick",
"count": 1,
"components": {
"minecraft:max_damage": 4500,
"minecraft:item_name": {
"text": "Diamond Trowel",
"color": "aqua",
"italic": false
},
"minecraft:custom_model_data": {
"strings": [
"lzstools:trowel_diamond"
]
},
"minecraft:custom_data": {
"lzstools": [
"trowel",
"trowel_diamond"
]
}
}
}
}
}

View File

@@ -1,36 +1,36 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
" ",
"s ",
" ii"
],
"key": {
"s": "minecraft:stick",
"i": "minecraft:iron_ingot"
},
"result": {
"id": "minecraft:carrot_on_a_stick",
"count": 1,
"components": {
"minecraft:max_damage": 750,
"minecraft:custom_name": {
"text": "Iron Trowel",
"color": "aqua",
"italic": false
},
"minecraft:custom_model_data": {
"strings": [
"lzstools:trowel_iron"
]
},
"minecraft:custom_data": {
"lzstools": [
"trowel",
"trowel_iron"
]
}
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
" ",
"s ",
" ii"
],
"key": {
"s": "minecraft:stick",
"i": "minecraft:iron_ingot"
},
"result": {
"id": "minecraft:carrot_on_a_stick",
"count": 1,
"components": {
"minecraft:max_damage": 750,
"minecraft:item_name": {
"text": "Iron Trowel",
"color": "aqua",
"italic": false
},
"minecraft:custom_model_data": {
"strings": [
"lzstools:trowel_iron"
]
},
"minecraft:custom_data": {
"lzstools": [
"trowel",
"trowel_iron"
]
}
}
}
}
}

View File

@@ -17,10 +17,10 @@ execute unless block ~ ~ ~ #lzstools:partialbox if block ~ ~ ~ #lzstools:glazed_
execute unless block ~ ~ ~ #lzstools:partialbox if block ~ ~ ~ #lzstools:unique run function lzstools_wrench:raycast/unique
# Force Update on block
execute as @s[scores={lz_wrench_success=1..}] if block ~ ~ ~ #lzstools:updates run clone ~-1 ~ ~ ~1 ~ ~ ~-1 ~ ~ replace force
execute as @s[scores={lz_wrench_success=1..}] if block ~ ~ ~ #lzstools:updates run clone ~ ~ ~-1 ~ ~ ~1 ~ ~ ~-1 replace force
execute as @s[scores={lz_wrench_success=1..}] run playsound minecraft:entity.item_frame.rotate_item block @s ~ ~ ~
execute as @s[scores={lzt_wrench_success=1..}] if block ~ ~ ~ #lzstools:updates run clone ~-1 ~ ~ ~1 ~ ~ ~-1 ~ ~ replace force
execute as @s[scores={lzt_wrench_success=1..}] if block ~ ~ ~ #lzstools:updates run clone ~ ~ ~-1 ~ ~ ~1 ~ ~ ~-1 replace force
execute as @s[scores={lzt_wrench_success=1..}] run playsound minecraft:entity.item_frame.rotate_item block @s ~ ~ ~
# Advance forward and if nothing found
scoreboard players add #distance lz_wrench_raycast 1
execute if score @s lz_wrench_success matches 0 if score #distance lz_wrench_raycast matches ..451 positioned ^ ^ ^0.01 run function lzstools_wrench:raycast/rayloop
scoreboard players add #distance lzt_wrench_raycast 1
execute if score @s lzt_wrench_success matches 0 if score #distance lzt_wrench_raycast matches ..451 positioned ^ ^ ^0.01 run function lzstools_wrench:raycast/loop

View File

@@ -1,20 +1,20 @@
# Anvils
execute if score px lz_wrench_raycast matches 3..12 if score pz lz_wrench_raycast matches 0..15 if score py lz_wrench_raycast matches 10..15 if block ~ ~ ~ #minecraft:anvil[facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lz_wrench_raycast matches 2..13 if score pz lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 0..3 if block ~ ~ ~ #minecraft:anvil[facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 3..12 if score py lz_wrench_raycast matches 4 if block ~ ~ ~ #minecraft:anvil[facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 5..9 if block ~ ~ ~ #minecraft:anvil[facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 3..12 if score pz lzt_wrench_raycast matches 0..15 if score py lzt_wrench_raycast matches 10..15 if block ~ ~ ~ #minecraft:anvil[facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 2..13 if score pz lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 0..3 if block ~ ~ ~ #minecraft:anvil[facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 3..12 if score py lzt_wrench_raycast matches 4 if block ~ ~ ~ #minecraft:anvil[facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 5..9 if block ~ ~ ~ #minecraft:anvil[facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lz_wrench_raycast matches 3..12 if score pz lz_wrench_raycast matches 0..15 if score py lz_wrench_raycast matches 10..15 if block ~ ~ ~ #minecraft:anvil[facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lz_wrench_raycast matches 2..13 if score pz lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 0..3 if block ~ ~ ~ #minecraft:anvil[facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 3..12 if score py lz_wrench_raycast matches 4 if block ~ ~ ~ #minecraft:anvil[facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 5..9 if block ~ ~ ~ #minecraft:anvil[facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 3..12 if score pz lzt_wrench_raycast matches 0..15 if score py lzt_wrench_raycast matches 10..15 if block ~ ~ ~ #minecraft:anvil[facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 2..13 if score pz lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 0..3 if block ~ ~ ~ #minecraft:anvil[facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 3..12 if score py lzt_wrench_raycast matches 4 if block ~ ~ ~ #minecraft:anvil[facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 5..9 if block ~ ~ ~ #minecraft:anvil[facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 3..12 if score px lz_wrench_raycast matches 0..15 if score py lz_wrench_raycast matches 10..15 if block ~ ~ ~ #minecraft:anvil[facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 2..13 if score px lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 0..3 if block ~ ~ ~ #minecraft:anvil[facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 4..11 if score px lz_wrench_raycast matches 3..12 if score py lz_wrench_raycast matches 4 if block ~ ~ ~ #minecraft:anvil[facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 6..9 if score px lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 5..9 if block ~ ~ ~ #minecraft:anvil[facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 3..12 if score px lzt_wrench_raycast matches 0..15 if score py lzt_wrench_raycast matches 10..15 if block ~ ~ ~ #minecraft:anvil[facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 2..13 if score px lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 0..3 if block ~ ~ ~ #minecraft:anvil[facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 4..11 if score px lzt_wrench_raycast matches 3..12 if score py lzt_wrench_raycast matches 4 if block ~ ~ ~ #minecraft:anvil[facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 6..9 if score px lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 5..9 if block ~ ~ ~ #minecraft:anvil[facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 3..12 if score px lz_wrench_raycast matches 0..15 if score py lz_wrench_raycast matches 10..15 if block ~ ~ ~ #minecraft:anvil[facing=west] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 2..13 if score px lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 0..3 if block ~ ~ ~ #minecraft:anvil[facing=west] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 4..11 if score px lz_wrench_raycast matches 3..12 if score py lz_wrench_raycast matches 4 if block ~ ~ ~ #minecraft:anvil[facing=west] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 6..9 if score px lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 5..9 if block ~ ~ ~ #minecraft:anvil[facing=west] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 3..12 if score px lzt_wrench_raycast matches 0..15 if score py lzt_wrench_raycast matches 10..15 if block ~ ~ ~ #minecraft:anvil[facing=west] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 2..13 if score px lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 0..3 if block ~ ~ ~ #minecraft:anvil[facing=west] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 4..11 if score px lzt_wrench_raycast matches 3..12 if score py lzt_wrench_raycast matches 4 if block ~ ~ ~ #minecraft:anvil[facing=west] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 6..9 if score px lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 5..9 if block ~ ~ ~ #minecraft:anvil[facing=west] run function lzstools_wrench:rotate/nesw/rotate

View File

@@ -1,2 +1,2 @@
# Banners
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #lzstools:banners run function lzstools_wrench:rotate/banners/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #lzstools:banners run function lzstools_wrench:rotate/banners/rotate

View File

@@ -1,5 +1,5 @@
# Bell
execute if score px lz_wrench_raycast matches 5..12 if block ~ ~ ~ minecraft:bell[attachment=floor,facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 5..12 if block ~ ~ ~ minecraft:bell[attachment=floor,facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lz_wrench_raycast matches 5..12 if block ~ ~ ~ minecraft:bell[attachment=floor,facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lz_wrench_raycast matches 5..12 if block ~ ~ ~ minecraft:bell[attachment=floor,facing=west] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 5..12 if block ~ ~ ~ minecraft:bell[attachment=floor,facing=north] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 5..12 if block ~ ~ ~ minecraft:bell[attachment=floor,facing=east] run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 5..12 if block ~ ~ ~ minecraft:bell[attachment=floor,facing=south] run function lzstools_wrench:rotate/nesw/rotate
execute if score pz lzt_wrench_raycast matches 5..12 if block ~ ~ ~ minecraft:bell[attachment=floor,facing=west] run function lzstools_wrench:rotate/nesw/rotate

View File

@@ -1,2 +1,2 @@
# Calibrated Sculk Sensor
execute if block ~ ~ ~ minecraft:calibrated_sculk_sensor if score py lz_wrench_raycast matches ..7 run function lzstools_wrench:rotate/unique_blocks/calibrated_sculk_sensor/rotate
execute if block ~ ~ ~ minecraft:calibrated_sculk_sensor if score py lzt_wrench_raycast matches ..7 run function lzstools_wrench:rotate/unique_blocks/calibrated_sculk_sensor/rotate

View File

@@ -1,2 +1,2 @@
# Campfires
execute if block ~ ~ ~ #minecraft:campfires if score py lz_wrench_raycast matches ..7 run function lzstools_wrench:rotate/unique_blocks/campfires/rotate
execute if block ~ ~ ~ #minecraft:campfires if score py lzt_wrench_raycast matches ..7 run function lzstools_wrench:rotate/unique_blocks/campfires/rotate

View File

@@ -1,4 +1,4 @@
# Chain
execute if block ~ ~ ~ minecraft:chain[axis=x] if score py lz_wrench_raycast matches 7..8 if score pz lz_wrench_raycast matches 7..8 run function lzstools_wrench:rotate/xyz/rotate
execute if block ~ ~ ~ minecraft:chain[axis=y] if score px lz_wrench_raycast matches 7..8 if score pz lz_wrench_raycast matches 7..8 run function lzstools_wrench:rotate/xyz/rotate
execute if block ~ ~ ~ minecraft:chain[axis=z] if score px lz_wrench_raycast matches 7..8 if score py lz_wrench_raycast matches 7..8 run function lzstools_wrench:rotate/xyz/rotate
execute if block ~ ~ ~ minecraft:chain[axis=x] if score py lzt_wrench_raycast matches 7..8 if score pz lzt_wrench_raycast matches 7..8 run function lzstools_wrench:rotate/xyz/rotate
execute if block ~ ~ ~ minecraft:chain[axis=y] if score px lzt_wrench_raycast matches 7..8 if score pz lzt_wrench_raycast matches 7..8 run function lzstools_wrench:rotate/xyz/rotate
execute if block ~ ~ ~ minecraft:chain[axis=z] if score px lzt_wrench_raycast matches 7..8 if score py lzt_wrench_raycast matches 7..8 run function lzstools_wrench:rotate/xyz/rotate

View File

@@ -1,2 +1,2 @@
# Redstone Comprator
execute if block ~ ~ ~ minecraft:comparator if score py lz_wrench_raycast matches ..1 run function lzstools_wrench:rotate/unique_blocks/comparator/rotate
execute if block ~ ~ ~ minecraft:comparator if score py lzt_wrench_raycast matches ..1 run function lzstools_wrench:rotate/unique_blocks/comparator/rotate

View File

@@ -1,2 +1,2 @@
# Decorated Pot
execute if score px lz_wrench_raycast matches 1..14 if score pz lz_wrench_raycast matches 1..14 if block ~ ~ ~ minecraft:decorated_pot run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 1..14 if score pz lzt_wrench_raycast matches 1..14 if block ~ ~ ~ minecraft:decorated_pot run function lzstools_wrench:rotate/nesw/rotate

View File

@@ -1,7 +1,7 @@
# End Rod
execute if block ~ ~ ~ minecraft:end_rod[facing=up] if score px lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=down] if score px lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=south] if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=north] if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=east] if score py lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=west] if score py lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=up] if score px lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=down] if score px lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=south] if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=north] if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=east] if score py lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:end_rod[facing=west] if score py lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate

View File

@@ -1,2 +1,2 @@
# Ender Chest
execute if score px lz_wrench_raycast matches 1..14 if score pz lz_wrench_raycast matches 1..14 if score py lz_wrench_raycast matches ..14 if block ~ ~ ~ minecraft:ender_chest run function lzstools_wrench:rotate/nesw/rotate
execute if score px lzt_wrench_raycast matches 1..14 if score pz lzt_wrench_raycast matches 1..14 if score py lzt_wrench_raycast matches ..14 if block ~ ~ ~ minecraft:ender_chest run function lzstools_wrench:rotate/nesw/rotate

View File

@@ -1,9 +1,9 @@
# Fence Gates
execute if block ~ ~ ~ #minecraft:fence_gates[facing=north] if score px lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=east] if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=south] if score px lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=west] if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=north,in_wall=true] if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches ..12 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=east,in_wall=true] if score pz lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches ..12 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=south,in_wall=true] if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches ..12 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=west,in_wall=true] if score pz lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches ..12 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=north] if score px lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=east] if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=south] if score px lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=west] if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=north,in_wall=true] if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches ..12 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=east,in_wall=true] if score pz lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches ..12 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=south,in_wall=true] if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches ..12 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ #minecraft:fence_gates[facing=west,in_wall=true] if score pz lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches ..12 run function lzstools_wrench:rotate/nesw/rotate

View File

@@ -1,64 +1,64 @@
# Grindstone
# Floor
execute if score px lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 4..15 if score pz lz_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 4..15 if score px lz_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 4..15 if score pz lz_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 4..15 if score px lz_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 4..15 if score pz lzt_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 4..15 if score px lzt_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 4..15 if score pz lzt_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 4..15 if score px lzt_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 7..12 if score pz lz_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 7..12 if score px lz_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 7..12 if score pz lz_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 7..12 if score px lz_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 7..12 if score pz lzt_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 7..12 if score px lzt_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 7..12 if score pz lzt_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 7..12 if score px lzt_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 0..6 if score pz lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 0..6 if score px lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 0..6 if score pz lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 0..6 if score px lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 0..6 if score pz lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 0..6 if score px lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 0..6 if score pz lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 0..6 if score px lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 0..6 if score pz lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 0..6 if score px lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 0..6 if score pz lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 0..6 if score px lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 0..6 if score pz lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 0..6 if score px lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 0..6 if score pz lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 0..6 if score px lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=floor,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
# Wall
execute if score px lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 2..13 if score pz lz_wrench_raycast matches 0..11 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 2..13 if score px lz_wrench_raycast matches 4..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 2..13 if score pz lz_wrench_raycast matches 4..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 2..13 if score px lz_wrench_raycast matches 0..11 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 2..13 if score pz lzt_wrench_raycast matches 0..11 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 2..13 if score px lzt_wrench_raycast matches 4..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 2..13 if score pz lzt_wrench_raycast matches 4..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 2..13 if score px lzt_wrench_raycast matches 0..11 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 5..10 if score pz lz_wrench_raycast matches 3..8 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 5..10 if score px lz_wrench_raycast matches 7..12 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 5..10 if score pz lz_wrench_raycast matches 7..12 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 5..10 if score px lz_wrench_raycast matches 3..8 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 5..10 if score pz lzt_wrench_raycast matches 3..8 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 5..10 if score px lzt_wrench_raycast matches 7..12 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 5..10 if score pz lzt_wrench_raycast matches 7..12 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 5..10 if score px lzt_wrench_raycast matches 3..8 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 0..6 if score pz lz_wrench_raycast matches 9..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 0..6 if score px lz_wrench_raycast matches 0..6 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 0..6 if score pz lz_wrench_raycast matches 0..6 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 0..6 if score px lz_wrench_raycast matches 6..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 0..6 if score pz lzt_wrench_raycast matches 9..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 0..6 if score px lzt_wrench_raycast matches 0..6 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 0..6 if score pz lzt_wrench_raycast matches 0..6 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 0..6 if score px lzt_wrench_raycast matches 6..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 0..6 if score pz lz_wrench_raycast matches 9..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 0..6 if score px lz_wrench_raycast matches 0..6 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 0..6 if score pz lz_wrench_raycast matches 0..6 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 0..6 if score px lz_wrench_raycast matches 9..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 0..6 if score pz lzt_wrench_raycast matches 9..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 0..6 if score px lzt_wrench_raycast matches 0..6 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 0..6 if score pz lzt_wrench_raycast matches 0..6 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 0..6 if score px lzt_wrench_raycast matches 9..15 if block ~ ~ ~ minecraft:grindstone[face=wall,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
# Ceiling
execute if score px lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 0..11 if score pz lz_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 0..11 if score px lz_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 0..11 if score pz lz_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 0..11 if score px lz_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 0..11 if score pz lzt_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 0..11 if score px lzt_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 0..11 if score pz lzt_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 0..11 if score px lzt_wrench_raycast matches 2..13 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 3..8 if score pz lz_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 3..8 if score px lz_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 3..8 if score pz lz_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..13 if score py lz_wrench_raycast matches 3..8 if score px lz_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 3..8 if score pz lzt_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 3..8 if score px lzt_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 3..8 if score pz lzt_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..13 if score py lzt_wrench_raycast matches 3..8 if score px lzt_wrench_raycast matches 5..10 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 9..15 if score pz lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 9..15 if score px lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 9..15 if score pz lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 2..3 if score py lz_wrench_raycast matches 9..15 if score px lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 9..15 if score pz lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 9..15 if score px lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 9..15 if score pz lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 2..3 if score py lzt_wrench_raycast matches 9..15 if score px lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 9..15 if score pz lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 9..15 if score px lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 9..15 if score pz lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lz_wrench_raycast matches 12..13 if score py lz_wrench_raycast matches 9..15 if score px lz_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 9..15 if score pz lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=north] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 9..15 if score px lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=east] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score px lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 9..15 if score pz lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=south] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate
execute if score pz lzt_wrench_raycast matches 12..13 if score py lzt_wrench_raycast matches 9..15 if score px lzt_wrench_raycast matches 6..9 if block ~ ~ ~ minecraft:grindstone[face=ceiling,facing=west] run function lzstools_wrench:rotate/unique_blocks/grindstone/rotate

View File

@@ -1,8 +1,8 @@
# Hopper
execute if block ~ ~ ~ minecraft:hopper[facing=down] if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches ..3 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper[facing=south] if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 4..7 if score pz lz_wrench_raycast matches 12.. run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper[facing=north] if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 4..7 if score pz lz_wrench_raycast matches ..3 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper[facing=east] if score px lz_wrench_raycast matches 12.. if score py lz_wrench_raycast matches 4..7 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper[facing=west] if score px lz_wrench_raycast matches ..3 if score py lz_wrench_raycast matches 4..7 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper if score px lz_wrench_raycast matches 4..11 if score py lz_wrench_raycast matches 4.. if score pz lz_wrench_raycast matches 4..11 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper if score py lz_wrench_raycast matches 10.. run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper[facing=down] if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches ..3 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper[facing=south] if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 4..7 if score pz lzt_wrench_raycast matches 12.. run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper[facing=north] if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 4..7 if score pz lzt_wrench_raycast matches ..3 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper[facing=east] if score px lzt_wrench_raycast matches 12.. if score py lzt_wrench_raycast matches 4..7 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper[facing=west] if score px lzt_wrench_raycast matches ..3 if score py lzt_wrench_raycast matches 4..7 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper if score px lzt_wrench_raycast matches 4..11 if score py lzt_wrench_raycast matches 4.. if score pz lzt_wrench_raycast matches 4..11 run function lzstools_wrench:rotate/unique_blocks/hopper/rotate
execute if block ~ ~ ~ minecraft:hopper if score py lzt_wrench_raycast matches 10.. run function lzstools_wrench:rotate/unique_blocks/hopper/rotate

View File

@@ -1,7 +1,7 @@
# Lightning Rod
execute if block ~ ~ ~ minecraft:lightning_rod[facing=up] if score px lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=down] if score px lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=south] if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=north] if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=east] if score py lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=west] if score py lz_wrench_raycast matches 6..9 if score pz lz_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=up] if score px lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=down] if score px lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=south] if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=north] if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=east] if score py lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:lightning_rod[facing=west] if score py lzt_wrench_raycast matches 6..9 if score pz lzt_wrench_raycast matches 6..9 run function lzstools_wrench:rotate/neswud/rotate

View File

@@ -1,17 +1,17 @@
# Piston
execute if block ~ ~ ~ minecraft:piston[extended=false] run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=up] if score py lz_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=down] if score py lz_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=south] if score pz lz_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=north] if score pz lz_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=east] if score px lz_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=west] if score px lz_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=up] if score py lzt_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=down] if score py lzt_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=south] if score pz lzt_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=north] if score pz lzt_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=east] if score px lzt_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:piston[facing=west] if score px lzt_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
# Sticky Piston
execute if block ~ ~ ~ minecraft:sticky_piston[extended=false] run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=up] if score py lz_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=down] if score py lz_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=south] if score pz lz_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=north] if score pz lz_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=east] if score px lz_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=west] if score px lz_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=up] if score py lzt_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=down] if score py lzt_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=south] if score pz lzt_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=north] if score pz lzt_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=east] if score px lzt_wrench_raycast matches ..11 run function lzstools_wrench:rotate/neswud/rotate
execute if block ~ ~ ~ minecraft:sticky_piston[facing=west] if score px lzt_wrench_raycast matches 4.. run function lzstools_wrench:rotate/neswud/rotate

View File

@@ -1,6 +1,6 @@
# Rails
execute if block ~ ~ ~ #minecraft:rails if score py lz_wrench_raycast matches ..1 run function lzstools_wrench:rotate/rails/rotate
execute if block ~ ~ ~ #minecraft:rails[shape=ascending_west] if score py lz_wrench_raycast matches ..7 run function lzstools_wrench:rotate/rails/rotate
execute if block ~ ~ ~ #minecraft:rails[shape=ascending_east] if score py lz_wrench_raycast matches ..7 run function lzstools_wrench:rotate/rails/rotate
execute if block ~ ~ ~ #minecraft:rails[shape=ascending_north] if score py lz_wrench_raycast matches ..7 run function lzstools_wrench:rotate/rails/rotate
execute if block ~ ~ ~ #minecraft:rails[shape=ascending_south] if score py lz_wrench_raycast matches ..7 run function lzstools_wrench:rotate/rails/rotate
execute if block ~ ~ ~ #minecraft:rails if score py lzt_wrench_raycast matches ..1 run function lzstools_wrench:rotate/rails/rotate
execute if block ~ ~ ~ #minecraft:rails[shape=ascending_west] if score py lzt_wrench_raycast matches ..7 run function lzstools_wrench:rotate/rails/rotate
execute if block ~ ~ ~ #minecraft:rails[shape=ascending_east] if score py lzt_wrench_raycast matches ..7 run function lzstools_wrench:rotate/rails/rotate
execute if block ~ ~ ~ #minecraft:rails[shape=ascending_north] if score py lzt_wrench_raycast matches ..7 run function lzstools_wrench:rotate/rails/rotate
execute if block ~ ~ ~ #minecraft:rails[shape=ascending_south] if score py lzt_wrench_raycast matches ..7 run function lzstools_wrench:rotate/rails/rotate

View File

@@ -1,2 +1,2 @@
# Redstone Repeater
execute if block ~ ~ ~ minecraft:repeater if score py lz_wrench_raycast matches ..1 run function lzstools_wrench:rotate/unique_blocks/repeater/rotate
execute if block ~ ~ ~ minecraft:repeater if score py lzt_wrench_raycast matches ..1 run function lzstools_wrench:rotate/unique_blocks/repeater/rotate

View File

@@ -1,31 +1,31 @@
# Signs
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:standing_signs run function lzstools_wrench:rotate/signs/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:standing_signs run function lzstools_wrench:rotate/signs/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=1] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=2] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=3] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=5] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=6] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=7] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=9] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=10] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=11] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=13] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=14] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 4..11 if score pz lz_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=15] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=1] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=2] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=3] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=5] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=6] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=7] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=9] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=10] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=11] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=13] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=14] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 4..11 if score pz lzt_wrench_raycast matches 4..11 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=15] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 1..14 if score py lz_wrench_raycast matches 0..9 if score pz lz_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=0] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lz_wrench_raycast matches 1..14 if score py lz_wrench_raycast matches 0..9 if score pz lz_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=8] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score pz lz_wrench_raycast matches 1..14 if score py lz_wrench_raycast matches 0..9 if score px lz_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=4] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score pz lz_wrench_raycast matches 1..14 if score py lz_wrench_raycast matches 0..9 if score px lz_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=12] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 1..14 if score py lzt_wrench_raycast matches 0..9 if score pz lzt_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=0] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score px lzt_wrench_raycast matches 1..14 if score py lzt_wrench_raycast matches 0..9 if score pz lzt_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=8] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score pz lzt_wrench_raycast matches 1..14 if score py lzt_wrench_raycast matches 0..9 if score px lzt_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=4] run function lzstools_wrench:rotate/signs_hanging/rotate
execute if score pz lzt_wrench_raycast matches 1..14 if score py lzt_wrench_raycast matches 0..9 if score px lzt_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:ceiling_hanging_signs[rotation=12] run function lzstools_wrench:rotate/signs_hanging/rotate
# Wall hanging signs can't be defined with the current method of getting the block ID so these fail as it's updated to the standard hanging sign
# execute if score px lz_wrench_raycast matches 1..14 if score py lz_wrench_raycast matches 0..9 if score pz lz_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=north] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score pz lz_wrench_raycast matches 1..14 if score py lz_wrench_raycast matches 0..9 if score px lz_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=east] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score px lz_wrench_raycast matches 1..14 if score py lz_wrench_raycast matches 0..9 if score pz lz_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=south] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score pz lz_wrench_raycast matches 1..14 if score py lz_wrench_raycast matches 0..9 if score px lz_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=west] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score px lzt_wrench_raycast matches 1..14 if score py lzt_wrench_raycast matches 0..9 if score pz lzt_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=north] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score pz lzt_wrench_raycast matches 1..14 if score py lzt_wrench_raycast matches 0..9 if score px lzt_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=east] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score px lzt_wrench_raycast matches 1..14 if score py lzt_wrench_raycast matches 0..9 if score pz lzt_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=south] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score pz lzt_wrench_raycast matches 1..14 if score py lzt_wrench_raycast matches 0..9 if score px lzt_wrench_raycast matches 7..8 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=west] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 14..15 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=north] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score pz lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 14..15 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=east] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score px lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 14..15 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=south] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score pz lz_wrench_raycast matches 6..9 if score py lz_wrench_raycast matches 14..15 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=west] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 14..15 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=north] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score pz lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 14..15 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=east] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score px lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 14..15 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=south] run function lzstools_wrench:rotate/signs_wall/rotate
# execute if score pz lzt_wrench_raycast matches 6..9 if score py lzt_wrench_raycast matches 14..15 if block ~ ~ ~ #minecraft:wall_hanging_signs[facing=west] run function lzstools_wrench:rotate/signs_wall/rotate

View File

@@ -1,3 +1,3 @@
# Slabs
execute if block ~ ~ ~ #minecraft:slabs[type=top] if score py lz_wrench_raycast matches 8.. run function lzstools_wrench:rotate/slabs/rotate
execute if block ~ ~ ~ #minecraft:slabs[type=bottom] if score py lz_wrench_raycast matches ..7 run function lzstools_wrench:rotate/slabs/rotate
execute if block ~ ~ ~ #minecraft:slabs[type=top] if score py lzt_wrench_raycast matches 8.. run function lzstools_wrench:rotate/slabs/rotate
execute if block ~ ~ ~ #minecraft:slabs[type=bottom] if score py lzt_wrench_raycast matches ..7 run function lzstools_wrench:rotate/slabs/rotate

View File

@@ -1,20 +1,20 @@
# Stairs
execute if block ~ ~ ~ #minecraft:stairs[half=bottom] if score py lz_wrench_raycast matches ..7 run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs[half=top] if score py lz_wrench_raycast matches 8.. run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs[half=bottom] if score py lzt_wrench_raycast matches ..7 run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs[half=top] if score py lzt_wrench_raycast matches 8.. run function lzstools_wrench:rotate/stairs/rotate
# -x-z
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches ..7 if score pz lz_wrench_raycast matches ..7 unless block ~ ~ ~ #minecraft:stairs[facing=west,shape=outer_left] unless block ~ ~ ~ #minecraft:stairs[facing=north,shape=outer_right] unless block ~ ~ ~ #minecraft:stairs[facing=east] unless block ~ ~ ~ #minecraft:stairs[facing=south] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches ..7 if score pz lz_wrench_raycast matches ..7 if block ~ ~ ~ #minecraft:stairs[facing=east,shape=inner_left] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches ..7 if score pz lz_wrench_raycast matches ..7 if block ~ ~ ~ #minecraft:stairs[facing=south,shape=inner_right] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches ..7 if score pz lzt_wrench_raycast matches ..7 unless block ~ ~ ~ #minecraft:stairs[facing=west,shape=outer_left] unless block ~ ~ ~ #minecraft:stairs[facing=north,shape=outer_right] unless block ~ ~ ~ #minecraft:stairs[facing=east] unless block ~ ~ ~ #minecraft:stairs[facing=south] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches ..7 if score pz lzt_wrench_raycast matches ..7 if block ~ ~ ~ #minecraft:stairs[facing=east,shape=inner_left] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches ..7 if score pz lzt_wrench_raycast matches ..7 if block ~ ~ ~ #minecraft:stairs[facing=south,shape=inner_right] run function lzstools_wrench:rotate/stairs/rotate
# -x+z
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches ..7 if score pz lz_wrench_raycast matches 8.. unless block ~ ~ ~ #minecraft:stairs[facing=south,shape=outer_left] unless block ~ ~ ~ #minecraft:stairs[facing=west,shape=outer_right] unless block ~ ~ ~ #minecraft:stairs[facing=north] unless block ~ ~ ~ #minecraft:stairs[facing=east] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches ..7 if score pz lz_wrench_raycast matches 8.. if block ~ ~ ~ #minecraft:stairs[facing=north,shape=inner_left] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches ..7 if score pz lz_wrench_raycast matches 8.. if block ~ ~ ~ #minecraft:stairs[facing=east,shape=inner_right] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches ..7 if score pz lzt_wrench_raycast matches 8.. unless block ~ ~ ~ #minecraft:stairs[facing=south,shape=outer_left] unless block ~ ~ ~ #minecraft:stairs[facing=west,shape=outer_right] unless block ~ ~ ~ #minecraft:stairs[facing=north] unless block ~ ~ ~ #minecraft:stairs[facing=east] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches ..7 if score pz lzt_wrench_raycast matches 8.. if block ~ ~ ~ #minecraft:stairs[facing=north,shape=inner_left] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches ..7 if score pz lzt_wrench_raycast matches 8.. if block ~ ~ ~ #minecraft:stairs[facing=east,shape=inner_right] run function lzstools_wrench:rotate/stairs/rotate
# +x+z
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches 8.. if score pz lz_wrench_raycast matches 8.. unless block ~ ~ ~ #minecraft:stairs[facing=east,shape=outer_left] unless block ~ ~ ~ #minecraft:stairs[facing=south,shape=outer_right] unless block ~ ~ ~ #minecraft:stairs[facing=west] unless block ~ ~ ~ #minecraft:stairs[facing=north] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches 8.. if score pz lz_wrench_raycast matches 8.. if block ~ ~ ~ #minecraft:stairs[facing=west,shape=inner_left] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches 8.. if score pz lz_wrench_raycast matches 8.. if block ~ ~ ~ #minecraft:stairs[facing=north,shape=inner_right] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches 8.. if score pz lzt_wrench_raycast matches 8.. unless block ~ ~ ~ #minecraft:stairs[facing=east,shape=outer_left] unless block ~ ~ ~ #minecraft:stairs[facing=south,shape=outer_right] unless block ~ ~ ~ #minecraft:stairs[facing=west] unless block ~ ~ ~ #minecraft:stairs[facing=north] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches 8.. if score pz lzt_wrench_raycast matches 8.. if block ~ ~ ~ #minecraft:stairs[facing=west,shape=inner_left] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches 8.. if score pz lzt_wrench_raycast matches 8.. if block ~ ~ ~ #minecraft:stairs[facing=north,shape=inner_right] run function lzstools_wrench:rotate/stairs/rotate
# +x-z
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches 8.. if score pz lz_wrench_raycast matches ..7 unless block ~ ~ ~ #minecraft:stairs[facing=north,shape=outer_left] unless block ~ ~ ~ #minecraft:stairs[facing=east,shape=outer_right] unless block ~ ~ ~ #minecraft:stairs[facing=south] unless block ~ ~ ~ #minecraft:stairs[facing=west] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches 8.. if score pz lz_wrench_raycast matches ..7 if block ~ ~ ~ #minecraft:stairs[facing=south,shape=inner_left] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lz_wrench_raycast matches 8.. if score pz lz_wrench_raycast matches ..7 if block ~ ~ ~ #minecraft:stairs[facing=west,shape=inner_right] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches 8.. if score pz lzt_wrench_raycast matches ..7 unless block ~ ~ ~ #minecraft:stairs[facing=north,shape=outer_left] unless block ~ ~ ~ #minecraft:stairs[facing=east,shape=outer_right] unless block ~ ~ ~ #minecraft:stairs[facing=south] unless block ~ ~ ~ #minecraft:stairs[facing=west] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches 8.. if score pz lzt_wrench_raycast matches ..7 if block ~ ~ ~ #minecraft:stairs[facing=south,shape=inner_left] run function lzstools_wrench:rotate/stairs/rotate
execute if block ~ ~ ~ #minecraft:stairs if score px lzt_wrench_raycast matches 8.. if score pz lzt_wrench_raycast matches ..7 if block ~ ~ ~ #minecraft:stairs[facing=west,shape=inner_right] run function lzstools_wrench:rotate/stairs/rotate

View File

@@ -1,2 +1,2 @@
# Stonecutter
execute if block ~ ~ ~ minecraft:stonecutter if score py lz_wrench_raycast matches ..9 run function lzstools_wrench:rotate/nesw/rotate
execute if block ~ ~ ~ minecraft:stonecutter if score py lzt_wrench_raycast matches ..9 run function lzstools_wrench:rotate/nesw/rotate

View File

@@ -1,13 +1,13 @@
# Trapdoors
execute if block ~ ~ ~ #minecraft:trapdoors[open=false,half=top] if score py lz_wrench_raycast matches 13.. run function lzstools_wrench:rotate/trapdoors/rotate
execute if block ~ ~ ~ #minecraft:trapdoors[open=false,half=bottom] if score py lz_wrench_raycast matches ..2 run function lzstools_wrench:rotate/trapdoors/rotate
execute if block ~ ~ ~ #minecraft:trapdoors[open=false,half=top] if score py lzt_wrench_raycast matches 13.. run function lzstools_wrench:rotate/trapdoors/rotate
execute if block ~ ~ ~ #minecraft:trapdoors[open=false,half=bottom] if score py lzt_wrench_raycast matches ..2 run function lzstools_wrench:rotate/trapdoors/rotate
# North
execute if block ~ ~ ~ #minecraft:trapdoors[open=true,facing=north] if score pz lz_wrench_raycast matches 13.. run function lzstools_wrench:rotate/trapdoors/rotate
execute if block ~ ~ ~ #minecraft:trapdoors[open=true,facing=north] if score pz lzt_wrench_raycast matches 13.. run function lzstools_wrench:rotate/trapdoors/rotate
# East
execute if block ~ ~ ~ #minecraft:trapdoors[open=true,facing=east] if score px lz_wrench_raycast matches ..2 run function lzstools_wrench:rotate/trapdoors/rotate
execute if block ~ ~ ~ #minecraft:trapdoors[open=true,facing=east] if score px lzt_wrench_raycast matches ..2 run function lzstools_wrench:rotate/trapdoors/rotate
# South
execute if block ~ ~ ~ #minecraft:trapdoors[open=true,facing=south] if score pz lz_wrench_raycast matches ..2 run function lzstools_wrench:rotate/trapdoors/rotate
execute if block ~ ~ ~ #minecraft:trapdoors[open=true,facing=south] if score pz lzt_wrench_raycast matches ..2 run function lzstools_wrench:rotate/trapdoors/rotate
# West
execute if block ~ ~ ~ #minecraft:trapdoors[open=true,facing=west] if score px lz_wrench_raycast matches 13.. run function lzstools_wrench:rotate/trapdoors/rotate
execute if block ~ ~ ~ #minecraft:trapdoors[open=true,facing=west] if score px lzt_wrench_raycast matches 13.. run function lzstools_wrench:rotate/trapdoors/rotate

View File

@@ -1,10 +1,8 @@
#Setting up the raycasting data.
scoreboard players set #distance lz_wrench_raycast 0
tag @s add lz_wrench_raycast
scoreboard players set #distance lzt_wrench_raycast 0
#Activating the raycast. This function will call itself until it is done.
execute as @e[tag=lz_wrench_raycast] at @s anchored eyes positioned ^ ^ ^ run function lzstools_wrench:raycast/rayloop
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_wrench:raycast/loop
#Raycasting finished, removing tag from the raycaster.
tag @s remove lz_wrench_raycast
# Clean Data
data remove storage lzstools:wrench block

View File

@@ -1,22 +1,22 @@
## Get Raycast Target Coords
# Stored Value for Calc
scoreboard players set c16 lz_wrench_raycast 16
scoreboard players set c16 lzt_wrench_raycast 16
# Summon Invisible Entity
summon area_effect_cloud ~ ~ ~ {Radius:0.01,Duration:1,Tags:["RaycastMark"]}
# Pixel Calculations
execute store result score px lz_wrench_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[0] 16
scoreboard players operation px lz_wrench_raycast %= c16 lz_wrench_raycast
execute if score px lz_wrench_raycast matches ..-1 run scoreboard players add px lz_wrench_raycast 16
execute store result score px lzt_wrench_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[0] 16
scoreboard players operation px lzt_wrench_raycast %= c16 lzt_wrench_raycast
execute if score px lzt_wrench_raycast matches ..-1 run scoreboard players add px lzt_wrench_raycast 16
execute store result score py lz_wrench_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[1] 16
scoreboard players operation py lz_wrench_raycast %= c16 lz_wrench_raycast
execute if score py lz_wrench_raycast matches ..-1 run scoreboard players add py lz_wrench_raycast 16
execute store result score py lzt_wrench_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[1] 16
scoreboard players operation py lzt_wrench_raycast %= c16 lzt_wrench_raycast
execute if score py lzt_wrench_raycast matches ..-1 run scoreboard players add py lzt_wrench_raycast 16
execute store result score pz lz_wrench_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[2] 16
scoreboard players operation pz lz_wrench_raycast %= c16 lz_wrench_raycast
execute if score pz lz_wrench_raycast matches ..-1 run scoreboard players add pz lz_wrench_raycast 16
execute store result score pz lzt_wrench_raycast run data get entity @e[tag=RaycastMark,sort=nearest,limit=1] Pos[2] 16
scoreboard players operation pz lzt_wrench_raycast %= c16 lzt_wrench_raycast
execute if score pz lzt_wrench_raycast matches ..-1 run scoreboard players add pz lzt_wrench_raycast 16
# Remove Entity
kill @e[tag=RaycastMark,sort=nearest,limit=1]

View File

@@ -4,10 +4,10 @@
function lzstools_wrench:raycast/target_coords
# Signs and Banners don't have full hitboxes, nothing else uses numeric rotation
$execute as @s[scores={lz_wrench_success=0}] if score pz lz_wrench_raycast matches 4 store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=8] replace
$execute as @s[scores={lz_wrench_success=0}] if score px lz_wrench_raycast matches 11 store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=12] replace
$execute as @s[scores={lz_wrench_success=0}] if score pz lz_wrench_raycast matches 11 store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=0] replace
$execute as @s[scores={lz_wrench_success=0}] if score px lz_wrench_raycast matches 4 store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=4] replace
$execute as @s[scores={lzt_wrench_success=0}] if score pz lzt_wrench_raycast matches 4 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=8] replace
$execute as @s[scores={lzt_wrench_success=0}] if score px lzt_wrench_raycast matches 11 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=12] replace
$execute as @s[scores={lzt_wrench_success=0}] if score pz lzt_wrench_raycast matches 11 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=0] replace
$execute as @s[scores={lzt_wrench_success=0}] if score px lzt_wrench_raycast matches 4 store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=4] replace
# Otherwise, Flip
execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run function lzstools_wrench:rotate/banners/flip with storage lzstools:wrench
execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run function lzstools_wrench:rotate/banners/flip with storage lzstools:wrench

View File

@@ -1,18 +1,18 @@
## Cycle Banners
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=0] run setblock ~ ~ ~ $(block)[rotation=1] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=1] run setblock ~ ~ ~ $(block)[rotation=2] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=2] run setblock ~ ~ ~ $(block)[rotation=3] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=3] run setblock ~ ~ ~ $(block)[rotation=4] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=4] run setblock ~ ~ ~ $(block)[rotation=5] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=5] run setblock ~ ~ ~ $(block)[rotation=6] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=6] run setblock ~ ~ ~ $(block)[rotation=7] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=7] run setblock ~ ~ ~ $(block)[rotation=8] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=8] run setblock ~ ~ ~ $(block)[rotation=9] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=9] run setblock ~ ~ ~ $(block)[rotation=10] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=10] run setblock ~ ~ ~ $(block)[rotation=11] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=11] run setblock ~ ~ ~ $(block)[rotation=12] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=12] run setblock ~ ~ ~ $(block)[rotation=13] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=13] run setblock ~ ~ ~ $(block)[rotation=14] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=14] run setblock ~ ~ ~ $(block)[rotation=15] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=15] run setblock ~ ~ ~ $(block)[rotation=0] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=0] run setblock ~ ~ ~ $(block)[rotation=1] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=1] run setblock ~ ~ ~ $(block)[rotation=2] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=2] run setblock ~ ~ ~ $(block)[rotation=3] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=3] run setblock ~ ~ ~ $(block)[rotation=4] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=4] run setblock ~ ~ ~ $(block)[rotation=5] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=5] run setblock ~ ~ ~ $(block)[rotation=6] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=6] run setblock ~ ~ ~ $(block)[rotation=7] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=7] run setblock ~ ~ ~ $(block)[rotation=8] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=8] run setblock ~ ~ ~ $(block)[rotation=9] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=9] run setblock ~ ~ ~ $(block)[rotation=10] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=10] run setblock ~ ~ ~ $(block)[rotation=11] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=11] run setblock ~ ~ ~ $(block)[rotation=12] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=12] run setblock ~ ~ ~ $(block)[rotation=13] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=13] run setblock ~ ~ ~ $(block)[rotation=14] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=14] run setblock ~ ~ ~ $(block)[rotation=15] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=15] run setblock ~ ~ ~ $(block)[rotation=0] replace

View File

@@ -1,18 +1,18 @@
## Flip Banners
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=0] run setblock ~ ~ ~ $(block)[rotation=8] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=1] run setblock ~ ~ ~ $(block)[rotation=9] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=2] run setblock ~ ~ ~ $(block)[rotation=10] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=3] run setblock ~ ~ ~ $(block)[rotation=11] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=4] run setblock ~ ~ ~ $(block)[rotation=12] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=5] run setblock ~ ~ ~ $(block)[rotation=13] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=6] run setblock ~ ~ ~ $(block)[rotation=14] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=7] run setblock ~ ~ ~ $(block)[rotation=15] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=8] run setblock ~ ~ ~ $(block)[rotation=0] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=9] run setblock ~ ~ ~ $(block)[rotation=1] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=10] run setblock ~ ~ ~ $(block)[rotation=2] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=11] run setblock ~ ~ ~ $(block)[rotation=3] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=12] run setblock ~ ~ ~ $(block)[rotation=4] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=13] run setblock ~ ~ ~ $(block)[rotation=5] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=14] run setblock ~ ~ ~ $(block)[rotation=6] replace
$execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block)[rotation=15] run setblock ~ ~ ~ $(block)[rotation=7] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=0] run setblock ~ ~ ~ $(block)[rotation=8] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=1] run setblock ~ ~ ~ $(block)[rotation=9] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=2] run setblock ~ ~ ~ $(block)[rotation=10] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=3] run setblock ~ ~ ~ $(block)[rotation=11] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=4] run setblock ~ ~ ~ $(block)[rotation=12] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=5] run setblock ~ ~ ~ $(block)[rotation=13] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=6] run setblock ~ ~ ~ $(block)[rotation=14] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=7] run setblock ~ ~ ~ $(block)[rotation=15] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=8] run setblock ~ ~ ~ $(block)[rotation=0] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=9] run setblock ~ ~ ~ $(block)[rotation=1] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=10] run setblock ~ ~ ~ $(block)[rotation=2] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=11] run setblock ~ ~ ~ $(block)[rotation=3] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=12] run setblock ~ ~ ~ $(block)[rotation=4] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=13] run setblock ~ ~ ~ $(block)[rotation=5] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=14] run setblock ~ ~ ~ $(block)[rotation=6] replace
$execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block)[rotation=15] run setblock ~ ~ ~ $(block)[rotation=7] replace

View File

@@ -1,21 +1,21 @@
## Face Player Banners
$execute as @s[scores={lz_wrench_success=0}, y_rotation=-11.25..11.25] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=8] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=11.25..33.75] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=9] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=33.75..56.25] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=10] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=56.25..78.75] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=11] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=78.75..101.25] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=12] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=101.25..123.75] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=13] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=123.75..146.25] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=14] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=146.25..168.75] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=15] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=168.75..-168.75] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=0] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=-168.75..-146.25] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=1] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=-146.25..-123.75] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=2] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=-123.75..-101.25] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=3] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=-101.25..-78.75] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=4] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=-78.75..-56.25] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=5] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=-56.25..-33.75] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=6] replace
$execute as @s[scores={lz_wrench_success=0}, y_rotation=-33.75..-11.25] store result score @s lz_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=7] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-11.25..11.25] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=8] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=11.25..33.75] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=9] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=33.75..56.25] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=10] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=56.25..78.75] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=11] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=78.75..101.25] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=12] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=101.25..123.75] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=13] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=123.75..146.25] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=14] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=146.25..168.75] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=15] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=168.75..-168.75] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=0] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-168.75..-146.25] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=1] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-146.25..-123.75] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=2] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-123.75..-101.25] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=3] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-101.25..-78.75] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=4] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-78.75..-56.25] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=5] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-56.25..-33.75] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=6] replace
$execute as @s[scores={lzt_wrench_success=0}, y_rotation=-33.75..-11.25] store result score @s lzt_wrench_success run execute if block ~ ~ ~ $(block) run setblock ~ ~ ~ $(block)[rotation=7] replace
# Otherwise, Flip
execute as @s[scores={lz_wrench_success=0}] store result score @s lz_wrench_success run function lzstools_wrench:rotate/banners/flip with storage lzstools:wrench
execute as @s[scores={lzt_wrench_success=0}] store result score @s lzt_wrench_success run function lzstools_wrench:rotate/banners/flip with storage lzstools:wrench

Some files were not shown because too many files have changed in this diff Show More