Compare commits
8 Commits
2.2.1-1.21
...
2.3.1-1.21
Author | SHA1 | Date | |
---|---|---|---|
723cbfc483 | |||
4f37178857 | |||
56570f452c | |||
d8f83b2777 | |||
21d45e781e | |||
b4b08bc662 | |||
c6a7150041 | |||
d97807baf3 |
26
.gitea/workflows/draft_release.yaml
Normal file
26
.gitea/workflows/draft_release.yaml
Normal 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
|
@@ -3,6 +3,7 @@
|
|||||||
## Tools
|
## Tools
|
||||||
- Wrench - Rotates blocks
|
- Wrench - Rotates blocks
|
||||||
- Trowels - Places random blocks from the hotbar
|
- 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.
|
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).
|
Information on how the different wrench modes work is available [here](WrenchModes.md).
|
||||||
|
6
assets/lzstools/models/items/hammer/hammer.json
Normal file
6
assets/lzstools/models/items/hammer/hammer.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/handheld",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "lzstools:item/hammer/hammer"
|
||||||
|
}
|
||||||
|
}
|
BIN
assets/lzstools/textures/item/hammer/hammer.png
Normal file
BIN
assets/lzstools/textures/item/hammer/hammer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 449 B |
@@ -1,19 +1,61 @@
|
|||||||
{
|
{
|
||||||
"model": {
|
"model": {
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"property": "custom_model_data",
|
"property": "custom_model_data",
|
||||||
"fallback": {
|
"fallback": {
|
||||||
"type": "minecraft:model",
|
"type": "minecraft:model",
|
||||||
"model": "minecraft:item/carrot_on_a_stick"
|
"model": "minecraft:item/carrot_on_a_stick"
|
||||||
},
|
},
|
||||||
"cases": [
|
"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_default",
|
||||||
{ "when": "lzstools:wrench_face_player", "model": { "type": "model", "model": "lzstools:items/wrench/face_player" } },
|
"model": {
|
||||||
{ "when": "lzstools:wrench_face_click", "model": { "type": "model", "model": "lzstools:items/wrench/face_click" } },
|
"type": "model",
|
||||||
{ "when": "lzstools:wrench_terracotta", "model": { "type": "model", "model": "lzstools:items/wrench/terracotta" } },
|
"model": "lzstools:items/wrench/default"
|
||||||
{ "when": "lzstools:trowel_iron", "model": { "type": "model", "model": "lzstools:items/trowel/iron" } },
|
}
|
||||||
{ "when": "lzstools:trowel_diamond", "model": { "type": "model", "model": "lzstools:items/trowel/diamond" } }
|
},
|
||||||
]
|
{
|
||||||
}
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
19
assets/minecraft/items/iron_pickaxe.json
Normal file
19
assets/minecraft/items/iron_pickaxe.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
32
data/lzstools/advancement/visible/hammer.json
Normal file
32
data/lzstools/advancement/visible/hammer.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,6 +1,5 @@
|
|||||||
scoreboard players set @s lzt_click_check 0
|
scoreboard players set @s lzt_click_check 0
|
||||||
|
|
||||||
|
|
||||||
# Wrench
|
# Wrench
|
||||||
execute if predicate lzstools:wrench/mainhand run function lzstools_wrench:wrench/rotate
|
execute if predicate lzstools:wrench/mainhand run function lzstools_wrench:wrench/rotate
|
||||||
execute if predicate lzstools:wrench/offhand run function lzstools_wrench:wrench/offhand
|
execute if predicate lzstools:wrench/offhand run function lzstools_wrench:wrench/offhand
|
4
data/lzstools/function/check_hammer.mcfunction
Normal file
4
data/lzstools/function/check_hammer.mcfunction
Normal 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
|
1
data/lzstools/function/give/hammer.mcfunction
Normal file
1
data/lzstools/function/give/hammer.mcfunction
Normal 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]
|
@@ -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"]}]
|
@@ -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"]}]
|
@@ -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"]}]
|
@@ -9,9 +9,21 @@ scoreboard objectives add lzt_wrench_raycast dummy
|
|||||||
scoreboard objectives add lzt_trowel_success dummy
|
scoreboard objectives add lzt_trowel_success dummy
|
||||||
scoreboard objectives add lzt_trowel_raycast dummy
|
scoreboard objectives add lzt_trowel_raycast dummy
|
||||||
scoreboard objectives add lzt_trowel_raycast_hit 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_block_length dummy
|
||||||
scoreboard objectives add lzt_chosen_block_check dummy
|
|
||||||
scoreboard objectives add lzt_trowel_unbreaking_check dummy
|
scoreboard objectives add lzt_trowel_unbreaking_check dummy
|
||||||
scoreboard objectives add lzt_trowel_unbreaking_chance dummy
|
scoreboard objectives add lzt_trowel_unbreaking_chance dummy
|
||||||
scoreboard objectives add lzt_trowel_damage dummy
|
scoreboard objectives add lzt_trowel_damage dummy
|
||||||
scoreboard objectives add lzt_trowel_max_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
|
@@ -1,3 +1,4 @@
|
|||||||
recipe give @s lzstools_wrench:wrench
|
recipe give @s lzstools_wrench:wrench
|
||||||
recipe give @s lzstools_trowel:iron
|
recipe give @s lzstools_trowel:iron
|
||||||
recipe give @s lzstools_trowel:diamond
|
recipe give @s lzstools_trowel:diamond
|
||||||
|
recipe give @s lzstools_hammer:hammer
|
@@ -1,2 +1,5 @@
|
|||||||
# Click Check
|
# Click Check
|
||||||
execute as @a if score @s lzt_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
|
@@ -1,4 +1,31 @@
|
|||||||
# Uninstall
|
# Uninstall
|
||||||
scoreboard objectives remove lzt_click_check
|
|
||||||
scoreboard objectives remove lzt_wrench_success
|
# Click Check
|
||||||
scoreboard objectives remove lzt_wrench_raycast
|
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
|
17
data/lzstools/predicate/hammer/mainhand.json
Normal file
17
data/lzstools/predicate/hammer/mainhand.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"equipment": {
|
||||||
|
"mainhand": {
|
||||||
|
"predicates": {
|
||||||
|
"minecraft:custom_data": {
|
||||||
|
"lzstools": [
|
||||||
|
"hammer"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"mainhand": {
|
"mainhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:enchantments": [
|
"minecraft:enchantments": [
|
||||||
{
|
{
|
||||||
"enchantment": "minecraft:unbreaking",
|
"enchantment": "minecraft:unbreaking",
|
||||||
"levels": 1
|
"levels": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"mainhand": {
|
"mainhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:enchantments": [
|
"minecraft:enchantments": [
|
||||||
{
|
{
|
||||||
"enchantment": "minecraft:unbreaking",
|
"enchantment": "minecraft:unbreaking",
|
||||||
"levels": 2
|
"levels": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"mainhand": {
|
"mainhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:enchantments": [
|
"minecraft:enchantments": [
|
||||||
{
|
{
|
||||||
"enchantment": "minecraft:unbreaking",
|
"enchantment": "minecraft:unbreaking",
|
||||||
"levels": 3
|
"levels": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,21 +1,21 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"mainhand": {
|
"mainhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:enchantments": [
|
"minecraft:enchantments": [
|
||||||
{
|
{
|
||||||
"enchantment": "minecraft:unbreaking",
|
"enchantment": "minecraft:unbreaking",
|
||||||
"levels": {
|
"levels": {
|
||||||
"min": 1,
|
"min": 1,
|
||||||
"max": 3
|
"max": 3
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"offhand": {
|
"offhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:enchantments": [
|
"minecraft:enchantments": [
|
||||||
{
|
{
|
||||||
"enchantment": "minecraft:unbreaking",
|
"enchantment": "minecraft:unbreaking",
|
||||||
"levels": 1
|
"levels": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"offhand": {
|
"offhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:enchantments": [
|
"minecraft:enchantments": [
|
||||||
{
|
{
|
||||||
"enchantment": "minecraft:unbreaking",
|
"enchantment": "minecraft:unbreaking",
|
||||||
"levels": 2
|
"levels": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"offhand": {
|
"offhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:enchantments": [
|
"minecraft:enchantments": [
|
||||||
{
|
{
|
||||||
"enchantment": "minecraft:unbreaking",
|
"enchantment": "minecraft:unbreaking",
|
||||||
"levels": 3
|
"levels": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,21 +1,21 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"offhand": {
|
"offhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:enchantments": [
|
"minecraft:enchantments": [
|
||||||
{
|
{
|
||||||
"enchantment": "minecraft:unbreaking",
|
"enchantment": "minecraft:unbreaking",
|
||||||
"levels": {
|
"levels": {
|
||||||
"min": 1,
|
"min": 1,
|
||||||
"max": 3
|
"max": 3
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"mainhand": {
|
"mainhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:custom_data": {
|
"minecraft:custom_data": {
|
||||||
"lzstools": [
|
"lzstools": [
|
||||||
"wrench"
|
"wrench"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"offhand": {
|
"offhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:custom_data": {
|
"minecraft:custom_data": {
|
||||||
"lzstools": [
|
"lzstools": [
|
||||||
"wrench"
|
"wrench"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
21
data/lzstools/tags/block/unbreakable.json
Normal file
21
data/lzstools/tags/block/unbreakable.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
22
data/lzstools_hammer/function/break/break.mcfunction
Normal file
22
data/lzstools_hammer/function/break/break.mcfunction
Normal 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
|
8
data/lzstools_hammer/function/break/eastwest.mcfunction
Normal file
8
data/lzstools_hammer/function/break/eastwest.mcfunction
Normal 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
|
@@ -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
|
8
data/lzstools_hammer/function/break/updown.mcfunction
Normal file
8
data/lzstools_hammer/function/break/updown.mcfunction
Normal 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
|
@@ -0,0 +1 @@
|
|||||||
|
$item modify entity @s weapon.mainhand {"function":"minecraft:set_components","components":{"minecraft:damage":$(damage)}}
|
@@ -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
|
13
data/lzstools_hammer/function/durability/handle.mcfunction
Normal file
13
data/lzstools_hammer/function/durability/handle.mcfunction
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
scoreboard players reset @s lzt_hammer_unbreaking_check
|
||||||
|
execute if entity @s[predicate=lzstools:unbreaking/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
|
@@ -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
|
2
data/lzstools_hammer/function/mainhand.mcfunction
Normal file
2
data/lzstools_hammer/function/mainhand.mcfunction
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
scoreboard players set @s lzt_hammer_check 0
|
||||||
|
function lzstools_hammer:raycast/start
|
15
data/lzstools_hammer/function/raycast/hit.mcfunction
Normal file
15
data/lzstools_hammer/function/raycast/hit.mcfunction
Normal 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
|
7
data/lzstools_hammer/function/raycast/loop.mcfunction
Normal file
7
data/lzstools_hammer/function/raycast/loop.mcfunction
Normal 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
|
13
data/lzstools_hammer/function/raycast/start.mcfunction
Normal file
13
data/lzstools_hammer/function/raycast/start.mcfunction
Normal 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
|
@@ -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
|
@@ -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
|
@@ -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]
|
17
data/lzstools_hammer/predicate/hammer.json
Normal file
17
data/lzstools_hammer/predicate/hammer.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"equipment": {
|
||||||
|
"mainhand": {
|
||||||
|
"predicates": {
|
||||||
|
"minecraft:custom_data": {
|
||||||
|
"lzstools": [
|
||||||
|
"hammer"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
data/lzstools_hammer/recipe/hammer.json
Normal file
36
data/lzstools_hammer/recipe/hammer.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -5,8 +5,8 @@ execute if entity @n[distance=..1] run return fail
|
|||||||
function lzstools_trowel:random/start
|
function lzstools_trowel:random/start
|
||||||
|
|
||||||
# No block, don't place and end
|
# No block, don't place and end
|
||||||
execute store result score @s lzt_chosen_block_check run data get storage lzstools:trowel chosen_block
|
execute store result score @s lzt_trowel_block_check run data get storage lzstools:trowel chosen_block
|
||||||
execute if score @s lzt_chosen_block_check matches 0 run return fail
|
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.stone.place master @a ~ ~ ~ 1 1.2
|
||||||
execute at @s run playsound minecraft:block.azalea_leaves.place master @a ~ ~ ~ 0.3 1
|
execute at @s run playsound minecraft:block.azalea_leaves.place master @a ~ ~ ~ 0.3 1
|
||||||
|
@@ -11,4 +11,4 @@ execute if score @s lzt_trowel_raycast_hit matches 1 run tag @s remove lzstools_
|
|||||||
|
|
||||||
# Advance forward and if nothing found
|
# Advance forward and if nothing found
|
||||||
scoreboard players add #distance lzt_trowel_raycast 1
|
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/rayloop
|
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
|
@@ -2,7 +2,7 @@
|
|||||||
scoreboard players set #distance lzt_trowel_raycast 0
|
scoreboard players set #distance lzt_trowel_raycast 0
|
||||||
|
|
||||||
#Activating the raycast. This function will call itself until it is done.
|
#Activating the raycast. This function will call itself until it is done.
|
||||||
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_trowel:raycast/rayloop
|
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_trowel:raycast/loop
|
||||||
|
|
||||||
# Clean Data
|
# Clean Data
|
||||||
data remove storage lzstools:trowel inventory
|
data remove storage lzstools:trowel inventory
|
||||||
|
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"mainhand": {
|
"mainhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:custom_data": {
|
"minecraft:custom_data": {
|
||||||
"lzstools": [
|
"lzstools": [
|
||||||
"trowel_diamond"
|
"trowel_diamond"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"mainhand": {
|
"mainhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:custom_data": {
|
"minecraft:custom_data": {
|
||||||
"lzstools": [
|
"lzstools": [
|
||||||
"trowel_iron"
|
"trowel_iron"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"offhand": {
|
"offhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:custom_data": {
|
"minecraft:custom_data": {
|
||||||
"lzstools": [
|
"lzstools": [
|
||||||
"trowel_diamond"
|
"trowel_diamond"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"condition": "minecraft:entity_properties",
|
"condition": "minecraft:entity_properties",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"predicate": {
|
"predicate": {
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"offhand": {
|
"offhand": {
|
||||||
"predicates": {
|
"predicates": {
|
||||||
"minecraft:custom_data": {
|
"minecraft:custom_data": {
|
||||||
"lzstools": [
|
"lzstools": [
|
||||||
"trowel_iron"
|
"trowel_iron"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,36 +1,36 @@
|
|||||||
{
|
{
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"category": "equipment",
|
"category": "equipment",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
" ",
|
" ",
|
||||||
"s ",
|
"s ",
|
||||||
" dd"
|
" dd"
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"s": "minecraft:stick",
|
"s": "minecraft:stick",
|
||||||
"d": "minecraft:diamond"
|
"d": "minecraft:diamond"
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"id": "minecraft:carrot_on_a_stick",
|
"id": "minecraft:carrot_on_a_stick",
|
||||||
"count": 1,
|
"count": 1,
|
||||||
"components": {
|
"components": {
|
||||||
"minecraft:max_damage": 4500,
|
"minecraft:max_damage": 4500,
|
||||||
"minecraft:custom_name": {
|
"minecraft:item_name": {
|
||||||
"text": "Diamond Trowel",
|
"text": "Diamond Trowel",
|
||||||
"color": "aqua",
|
"color": "aqua",
|
||||||
"italic": false
|
"italic": false
|
||||||
},
|
},
|
||||||
"minecraft:custom_model_data": {
|
"minecraft:custom_model_data": {
|
||||||
"strings": [
|
"strings": [
|
||||||
"lzstools:trowel_diamond"
|
"lzstools:trowel_diamond"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"minecraft:custom_data": {
|
"minecraft:custom_data": {
|
||||||
"lzstools": [
|
"lzstools": [
|
||||||
"trowel",
|
"trowel",
|
||||||
"trowel_diamond"
|
"trowel_diamond"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -1,36 +1,36 @@
|
|||||||
{
|
{
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"category": "equipment",
|
"category": "equipment",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
" ",
|
" ",
|
||||||
"s ",
|
"s ",
|
||||||
" ii"
|
" ii"
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"s": "minecraft:stick",
|
"s": "minecraft:stick",
|
||||||
"i": "minecraft:iron_ingot"
|
"i": "minecraft:iron_ingot"
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"id": "minecraft:carrot_on_a_stick",
|
"id": "minecraft:carrot_on_a_stick",
|
||||||
"count": 1,
|
"count": 1,
|
||||||
"components": {
|
"components": {
|
||||||
"minecraft:max_damage": 750,
|
"minecraft:max_damage": 750,
|
||||||
"minecraft:custom_name": {
|
"minecraft:item_name": {
|
||||||
"text": "Iron Trowel",
|
"text": "Iron Trowel",
|
||||||
"color": "aqua",
|
"color": "aqua",
|
||||||
"italic": false
|
"italic": false
|
||||||
},
|
},
|
||||||
"minecraft:custom_model_data": {
|
"minecraft:custom_model_data": {
|
||||||
"strings": [
|
"strings": [
|
||||||
"lzstools:trowel_iron"
|
"lzstools:trowel_iron"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"minecraft:custom_data": {
|
"minecraft:custom_data": {
|
||||||
"lzstools": [
|
"lzstools": [
|
||||||
"trowel",
|
"trowel",
|
||||||
"trowel_iron"
|
"trowel_iron"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@@ -23,4 +23,4 @@ execute as @s[scores={lzt_wrench_success=1..}] run playsound minecraft:entity.it
|
|||||||
|
|
||||||
# Advance forward and if nothing found
|
# Advance forward and if nothing found
|
||||||
scoreboard players add #distance lzt_wrench_raycast 1
|
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/rayloop
|
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
|
@@ -2,7 +2,7 @@
|
|||||||
scoreboard players set #distance lzt_wrench_raycast 0
|
scoreboard players set #distance lzt_wrench_raycast 0
|
||||||
|
|
||||||
#Activating the raycast. This function will call itself until it is done.
|
#Activating the raycast. This function will call itself until it is done.
|
||||||
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_wrench:raycast/rayloop
|
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function lzstools_wrench:raycast/loop
|
||||||
|
|
||||||
# Clean Data
|
# Clean Data
|
||||||
data remove storage lzstools:wrench block
|
data remove storage lzstools:wrench block
|
@@ -1,21 +1,21 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_lore",
|
"function": "minecraft:set_lore",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"lore": [
|
"lore": [
|
||||||
{
|
{
|
||||||
"text": "Default"
|
"text": "Default"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_custom_model_data",
|
"function": "minecraft:set_custom_model_data",
|
||||||
"strings": {
|
"strings": {
|
||||||
"values": [
|
"values": [
|
||||||
"lzstools:wrench_default"
|
"lzstools:wrench_default"
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
]
|
]
|
@@ -1,21 +1,21 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_lore",
|
"function": "minecraft:set_lore",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"lore": [
|
"lore": [
|
||||||
{
|
{
|
||||||
"text": "Face Click"
|
"text": "Face Click"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_custom_model_data",
|
"function": "minecraft:set_custom_model_data",
|
||||||
"strings": {
|
"strings": {
|
||||||
"values": [
|
"values": [
|
||||||
"lzstools:wrench_face_click"
|
"lzstools:wrench_face_click"
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
]
|
]
|
@@ -1,21 +1,21 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_lore",
|
"function": "minecraft:set_lore",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"lore": [
|
"lore": [
|
||||||
{
|
{
|
||||||
"text": "Face Player"
|
"text": "Face Player"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_custom_model_data",
|
"function": "minecraft:set_custom_model_data",
|
||||||
"strings": {
|
"strings": {
|
||||||
"values": [
|
"values": [
|
||||||
"lzstools:wrench_face_player"
|
"lzstools:wrench_face_player"
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
]
|
]
|
@@ -1,21 +1,21 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_lore",
|
"function": "minecraft:set_lore",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"lore": [
|
"lore": [
|
||||||
{
|
{
|
||||||
"text": "Flip"
|
"text": "Flip"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_custom_model_data",
|
"function": "minecraft:set_custom_model_data",
|
||||||
"strings": {
|
"strings": {
|
||||||
"values": [
|
"values": [
|
||||||
"lzstools:wrench_flip"
|
"lzstools:wrench_flip"
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
]
|
]
|
@@ -1,24 +1,24 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_lore",
|
"function": "minecraft:set_lore",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"lore": [
|
"lore": [
|
||||||
{
|
{
|
||||||
"text": "Terracotta"
|
"text": "Terracotta"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "East"
|
"text": "East"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_custom_model_data",
|
"function": "minecraft:set_custom_model_data",
|
||||||
"strings": {
|
"strings": {
|
||||||
"values": [
|
"values": [
|
||||||
"lzstools:wrench_terracotta"
|
"lzstools:wrench_terracotta"
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
]
|
]
|
@@ -1,24 +1,24 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_lore",
|
"function": "minecraft:set_lore",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"lore": [
|
"lore": [
|
||||||
{
|
{
|
||||||
"text": "Terracotta"
|
"text": "Terracotta"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "North"
|
"text": "North"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_custom_model_data",
|
"function": "minecraft:set_custom_model_data",
|
||||||
"strings": {
|
"strings": {
|
||||||
"values": [
|
"values": [
|
||||||
"lzstools:wrench_terracotta"
|
"lzstools:wrench_terracotta"
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
]
|
]
|
@@ -1,24 +1,24 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_lore",
|
"function": "minecraft:set_lore",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"lore": [
|
"lore": [
|
||||||
{
|
{
|
||||||
"text": "Terracotta"
|
"text": "Terracotta"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "South"
|
"text": "South"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_custom_model_data",
|
"function": "minecraft:set_custom_model_data",
|
||||||
"strings": {
|
"strings": {
|
||||||
"values": [
|
"values": [
|
||||||
"lzstools:wrench_terracotta"
|
"lzstools:wrench_terracotta"
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
]
|
]
|
@@ -1,24 +1,24 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_lore",
|
"function": "minecraft:set_lore",
|
||||||
"entity": "this",
|
"entity": "this",
|
||||||
"lore": [
|
"lore": [
|
||||||
{
|
{
|
||||||
"text": "Terracotta"
|
"text": "Terracotta"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "West"
|
"text": "West"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_custom_model_data",
|
"function": "minecraft:set_custom_model_data",
|
||||||
"strings": {
|
"strings": {
|
||||||
"values": [
|
"values": [
|
||||||
"lzstools:wrench_terracotta"
|
"lzstools:wrench_terracotta"
|
||||||
],
|
],
|
||||||
"mode": "replace_all"
|
"mode": "replace_all"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
@@ -1,44 +1,44 @@
|
|||||||
{
|
{
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"category": "equipment",
|
"category": "equipment",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
" lg",
|
" lg",
|
||||||
" sg",
|
" sg",
|
||||||
"s "
|
"s "
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"s": "minecraft:stick",
|
"s": "minecraft:stick",
|
||||||
"g": "minecraft:gold_ingot",
|
"g": "minecraft:gold_ingot",
|
||||||
"l": "#minecraft:logs"
|
"l": "#minecraft:logs"
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"id": "minecraft:carrot_on_a_stick",
|
"id": "minecraft:carrot_on_a_stick",
|
||||||
"count": 1,
|
"count": 1,
|
||||||
"components": {
|
"components": {
|
||||||
"minecraft:custom_name": {
|
"minecraft:item_name": {
|
||||||
"text": "Rotator Wrench",
|
"text": "Rotator Wrench",
|
||||||
"color": "aqua",
|
"color": "aqua",
|
||||||
"italic": false
|
"italic": false
|
||||||
},
|
},
|
||||||
"minecraft:lore": [
|
"minecraft:lore": [
|
||||||
"Default"
|
"Default"
|
||||||
],
|
],
|
||||||
"minecraft:custom_model_data": {
|
"minecraft:custom_model_data": {
|
||||||
"strings": [
|
"strings": [
|
||||||
"lzstools:wrench_default"
|
"lzstools:wrench_default"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"minecraft:custom_data": {
|
"minecraft:custom_data": {
|
||||||
"lzstools": [
|
"lzstools": [
|
||||||
"wrench"
|
"wrench"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"minecraft:unbreakable": {},
|
"minecraft:unbreakable": {},
|
||||||
"minecraft:tooltip_display": {
|
"minecraft:tooltip_display": {
|
||||||
"hidden_components": [
|
"hidden_components": [
|
||||||
"minecraft:unbreakable"
|
"minecraft:unbreakable"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
Reference in New Issue
Block a user