Initial commit

This commit is contained in:
pancakes 2025-06-02 15:38:43 +10:00
commit 6d2dfc421c
Signed by: pancakes
SSH key fingerprint: SHA256:yrp4c4hhaPoPG07fb4QyQIgAdlbUdsJvUAydJEWnfTw
14 changed files with 444 additions and 0 deletions

View file

@ -0,0 +1,3 @@
{
"values": ["simplewaypoints:manage"]
}

View file

@ -0,0 +1,3 @@
{
"values": ["simplewaypoints:manage"]
}

View 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"
}
}
}

View 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"
}
}
}

View 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
}

View 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"
}
}
}

View 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"
}
}
}

View 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"
}
}
}

View 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)

View 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]

View 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)"}

View 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)

View 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
View file

@ -0,0 +1,6 @@
{
"pack": {
"description": "Simple Waypoints",
"pack_format": 79
}
}