Initial commit
This commit is contained in:
commit
6d2dfc421c
14 changed files with 444 additions and 0 deletions
3
data/minecraft/tags/dialog/pause_screen_additions.json
Normal file
3
data/minecraft/tags/dialog/pause_screen_additions.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"values": ["simplewaypoints:manage"]
|
||||
}
|
3
data/minecraft/tags/dialog/quick_actions.json
Normal file
3
data/minecraft/tags/dialog/quick_actions.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"values": ["simplewaypoints:manage"]
|
||||
}
|
152
data/simplewaypoints/dialog/create.json
Normal file
152
data/simplewaypoints/dialog/create.json
Normal file
|
@ -0,0 +1,152 @@
|
|||
{
|
||||
"type": "minecraft:confirmation",
|
||||
"title": "Create Waypoint",
|
||||
"body": {
|
||||
"type": "minecraft:plain_message",
|
||||
"contents": "Create waypoint at your location"
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"type": "minecraft:text",
|
||||
"key": "name",
|
||||
"label": "Display Name"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:single_option",
|
||||
"key": "color",
|
||||
"label": "Color",
|
||||
"options": [
|
||||
{
|
||||
"id": "white",
|
||||
"display": {
|
||||
"text": "White",
|
||||
"color": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "aqua",
|
||||
"display": {
|
||||
"text": "Aqua",
|
||||
"color": "aqua"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "black",
|
||||
"display": {
|
||||
"text": "Black",
|
||||
"color": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "blue",
|
||||
"display": {
|
||||
"text": "Blue",
|
||||
"color": "blue"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_aqua",
|
||||
"display": {
|
||||
"text": "Dark Aqua",
|
||||
"color": "dark_aqua"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_blue",
|
||||
"display": {
|
||||
"text": "Dark Blue",
|
||||
"color": "dark_blue"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_gray",
|
||||
"display": {
|
||||
"text": "Dark Gray",
|
||||
"color": "dark_gray"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_green",
|
||||
"display": {
|
||||
"text": "Dark Green",
|
||||
"color": "dark_green"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_purple",
|
||||
"display": {
|
||||
"text": "Dark Purple",
|
||||
"color": "dark_purple"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_red",
|
||||
"display": {
|
||||
"text": "Dark Red",
|
||||
"color": "dark_red"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "gold",
|
||||
"display": {
|
||||
"text": "Gold",
|
||||
"color": "gold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "green",
|
||||
"display": {
|
||||
"text": "Green",
|
||||
"color": "green"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "light_purple",
|
||||
"display": {
|
||||
"text": "Light Purple",
|
||||
"color": "light_purple"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "red",
|
||||
"display": {
|
||||
"text": "Red",
|
||||
"color": "red"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "yellow",
|
||||
"display": {
|
||||
"text": "Yellow",
|
||||
"color": "yellow"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "minecraft:number_range",
|
||||
"key": "range",
|
||||
"label": "Range (m)",
|
||||
"start": 5.0,
|
||||
"end": 1000.0,
|
||||
"step": 5.0,
|
||||
"initial": 100
|
||||
}
|
||||
],
|
||||
"yes": {
|
||||
"label": {
|
||||
"translate": "gui.ok",
|
||||
"fallback": "Create Waypoint"
|
||||
},
|
||||
"action": {
|
||||
"type": "dynamic/run_command",
|
||||
"template": "function simplewaypoints:create {name:\"$(name)\",color:\"$(color)\",range:\"$(range)\"}"
|
||||
}
|
||||
},
|
||||
"no": {
|
||||
"label": {
|
||||
"translate": "gui.cancel",
|
||||
"fallback": "Cancel"
|
||||
}
|
||||
}
|
||||
}
|
24
data/simplewaypoints/dialog/delete.json
Normal file
24
data/simplewaypoints/dialog/delete.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"type": "minecraft:confirmation",
|
||||
"title": "Delete Waypoint",
|
||||
"body": {
|
||||
"type": "minecraft:plain_message",
|
||||
"contents": "Delete closest waypoint?"
|
||||
},
|
||||
"yes": {
|
||||
"label": {
|
||||
"translate": "gui.yes",
|
||||
"fallback": "Yes"
|
||||
},
|
||||
"action": {
|
||||
"type": "run_command",
|
||||
"command": "function simplewaypoints:delete"
|
||||
}
|
||||
},
|
||||
"no": {
|
||||
"label": {
|
||||
"translate": "gui.no",
|
||||
"fallback": "No"
|
||||
}
|
||||
}
|
||||
}
|
39
data/simplewaypoints/dialog/manage.json
Normal file
39
data/simplewaypoints/dialog/manage.json
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"type": "minecraft:dialog_list",
|
||||
"title": "Simple Waypoints",
|
||||
"external_title": "Manage Waypoints",
|
||||
"body": {
|
||||
"type": "minecraft:plain_message",
|
||||
"contents": [
|
||||
"Datapack by ",
|
||||
{
|
||||
"text": "pancakes",
|
||||
"color": "dark_purple",
|
||||
"underlined": true,
|
||||
"click_event": {
|
||||
"action": "open_url",
|
||||
"url": "https://pancakes.gay"
|
||||
},
|
||||
"hover_event": {
|
||||
"action": "show_text",
|
||||
"value": [
|
||||
"Open URL:\n",
|
||||
{
|
||||
"text": "https://pancakes.gay",
|
||||
"color": "blue",
|
||||
"underlined": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dialogs": [
|
||||
"simplewaypoints:create",
|
||||
"simplewaypoints:rename",
|
||||
"simplewaypoints:set_color",
|
||||
"simplewaypoints:set_range",
|
||||
"simplewaypoints:delete"
|
||||
],
|
||||
"columns": 1
|
||||
}
|
31
data/simplewaypoints/dialog/rename.json
Normal file
31
data/simplewaypoints/dialog/rename.json
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"type": "minecraft:confirmation",
|
||||
"title": "Rename Waypoint",
|
||||
"body": {
|
||||
"type": "minecraft:plain_message",
|
||||
"contents": "Rename closest waypoint"
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"type": "minecraft:text",
|
||||
"key": "name",
|
||||
"label": "Display Name"
|
||||
}
|
||||
],
|
||||
"yes": {
|
||||
"label": {
|
||||
"translate": "gui.ok",
|
||||
"fallback": "Rename"
|
||||
},
|
||||
"action": {
|
||||
"type": "dynamic/run_command",
|
||||
"template": "function simplewaypoints:rename {name:\"$(name)\"}"
|
||||
}
|
||||
},
|
||||
"no": {
|
||||
"label": {
|
||||
"translate": "gui.cancel",
|
||||
"fallback": "Cancel"
|
||||
}
|
||||
}
|
||||
}
|
139
data/simplewaypoints/dialog/set_color.json
Normal file
139
data/simplewaypoints/dialog/set_color.json
Normal file
|
@ -0,0 +1,139 @@
|
|||
|
||||
{
|
||||
"type": "minecraft:confirmation",
|
||||
"title": "Set Waypoint Color",
|
||||
"body": {
|
||||
"type": "minecraft:plain_message",
|
||||
"contents": "Set color of closest waypoint"
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"type": "minecraft:single_option",
|
||||
"key": "color",
|
||||
"label": "Color",
|
||||
"options": [
|
||||
{
|
||||
"id": "white",
|
||||
"display": {
|
||||
"text": "White",
|
||||
"color": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "aqua",
|
||||
"display": {
|
||||
"text": "Aqua",
|
||||
"color": "aqua"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "black",
|
||||
"display": {
|
||||
"text": "Black",
|
||||
"color": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "blue",
|
||||
"display": {
|
||||
"text": "Blue",
|
||||
"color": "blue"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_aqua",
|
||||
"display": {
|
||||
"text": "Dark Aqua",
|
||||
"color": "dark_aqua"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_blue",
|
||||
"display": {
|
||||
"text": "Dark Blue",
|
||||
"color": "dark_blue"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_gray",
|
||||
"display": {
|
||||
"text": "Dark Gray",
|
||||
"color": "dark_gray"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_green",
|
||||
"display": {
|
||||
"text": "Dark Green",
|
||||
"color": "dark_green"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_purple",
|
||||
"display": {
|
||||
"text": "Dark Purple",
|
||||
"color": "dark_purple"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dark_red",
|
||||
"display": {
|
||||
"text": "Dark Red",
|
||||
"color": "dark_red"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "gold",
|
||||
"display": {
|
||||
"text": "Gold",
|
||||
"color": "gold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "green",
|
||||
"display": {
|
||||
"text": "Green",
|
||||
"color": "green"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "light_purple",
|
||||
"display": {
|
||||
"text": "Light Purple",
|
||||
"color": "light_purple"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "red",
|
||||
"display": {
|
||||
"text": "Red",
|
||||
"color": "red"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "yellow",
|
||||
"display": {
|
||||
"text": "Yellow",
|
||||
"color": "yellow"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"yes": {
|
||||
"label": {
|
||||
"translate": "gui.ok",
|
||||
"fallback": "Set Color"
|
||||
},
|
||||
"action": {
|
||||
"type": "dynamic/run_command",
|
||||
"template": "function simplewaypoints:set_color {color:\"$(color)\"}"
|
||||
}
|
||||
},
|
||||
"no": {
|
||||
"label": {
|
||||
"translate": "gui.cancel",
|
||||
"fallback": "Cancel"
|
||||
}
|
||||
}
|
||||
}
|
35
data/simplewaypoints/dialog/set_range.json
Normal file
35
data/simplewaypoints/dialog/set_range.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"type": "minecraft:confirmation",
|
||||
"title": "Set Waypoint Range",
|
||||
"body": {
|
||||
"type": "minecraft:plain_message",
|
||||
"contents": "Set range of closest waypoint"
|
||||
},
|
||||
"inputs": [
|
||||
{
|
||||
"type": "minecraft:number_range",
|
||||
"key": "range",
|
||||
"label": "Range (m)",
|
||||
"start": 5.0,
|
||||
"end": 1000.0,
|
||||
"step": 5.0,
|
||||
"initial": 100
|
||||
}
|
||||
],
|
||||
"yes": {
|
||||
"label": {
|
||||
"translate": "gui.ok",
|
||||
"fallback": "Set Range"
|
||||
},
|
||||
"action": {
|
||||
"type": "dynamic/run_command",
|
||||
"template": "function simplewaypoints:set_range {range:\"$(range)\"}"
|
||||
}
|
||||
},
|
||||
"no": {
|
||||
"label": {
|
||||
"translate": "gui.cancel",
|
||||
"fallback": "Cancel"
|
||||
}
|
||||
}
|
||||
}
|
3
data/simplewaypoints/function/create.mcfunction
Normal file
3
data/simplewaypoints/function/create.mcfunction
Normal file
|
@ -0,0 +1,3 @@
|
|||
execute if entity @e[type=minecraft:armor_stand,tag=simplewaypoints] run return run tellraw @s {"text":"You are too close to an existing waypoint!","color":"red"}
|
||||
$execute align xyz run summon armor_stand ~0.5 ~ ~0.5 {CustomNameVisible:1b,NoGravity:1b,Small:1b,Invisible:1b,Marker:1b,attributes:[{id:"minecraft:waypoint_transmit_range",base:$(range).0d}],Tags:["simplewaypoints"],CustomName:{"color":"$(color)","text":"$(name)"}}
|
||||
$waypoint modify @e[type=minecraft:armor_stand,tag=simplewaypoints,limit=1,sort=nearest] color $(color)
|
2
data/simplewaypoints/function/delete.mcfunction
Normal file
2
data/simplewaypoints/function/delete.mcfunction
Normal file
|
@ -0,0 +1,2 @@
|
|||
execute unless entity @e[type=minecraft:armor_stand,tag=simplewaypoints,distance=..2] run return run tellraw @s {"text":"You need to be next to a waypoint","color":"red"}
|
||||
kill @e[type=minecraft:armor_stand,tag=simplewaypoints,limit=1,sort=nearest]
|
2
data/simplewaypoints/function/rename.mcfunction
Normal file
2
data/simplewaypoints/function/rename.mcfunction
Normal file
|
@ -0,0 +1,2 @@
|
|||
execute unless entity @e[type=minecraft:armor_stand,tag=simplewaypoints,distance=..2] run return run tellraw @s {"text":"You need to be next to a waypoint","color":"red"}
|
||||
$data modify entity @e[type=minecraft:armor_stand,tag=simplewaypoints,limit=1,sort=nearest] CustomName merge value {"text":"$(name)"}
|
3
data/simplewaypoints/function/set_color.mcfunction
Normal file
3
data/simplewaypoints/function/set_color.mcfunction
Normal file
|
@ -0,0 +1,3 @@
|
|||
execute unless entity @e[type=minecraft:armor_stand,tag=simplewaypoints,distance=..2] run return run tellraw @s {"text":"You need to be next to a waypoint","color":"red"}
|
||||
$data modify entity @e[type=minecraft:armor_stand,tag=simplewaypoints,limit=1,sort=nearest] CustomName merge value {"color":"$(color)"}
|
||||
$waypoint modify @e[type=minecraft:armor_stand,tag=simplewaypoints,limit=1,sort=nearest] color $(color)
|
2
data/simplewaypoints/function/set_range.mcfunction
Normal file
2
data/simplewaypoints/function/set_range.mcfunction
Normal file
|
@ -0,0 +1,2 @@
|
|||
execute unless entity @e[type=minecraft:armor_stand,tag=simplewaypoints,distance=..2] run return run tellraw @s {"text":"You need to be next to a waypoint","color":"red"}
|
||||
$attribute @e[type=minecraft:armor_stand,tag=simplewaypoints,limit=1,sort=nearest] minecraft:waypoint_transmit_range base set $(range)
|
6
pack.mcmeta
Normal file
6
pack.mcmeta
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"pack": {
|
||||
"description": "Simple Waypoints",
|
||||
"pack_format": 79
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue