-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add craftable item Boat Compass (#68)
- Loading branch information
Showing
12 changed files
with
319 additions
and
19 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
datapacks/ocw-stuff/data/nincodedo/advancements/items/get_out_of_boat.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"criteria": { | ||
"requirement": { | ||
"trigger": "minecraft:tick", | ||
"conditions": { | ||
"player": [ | ||
{ | ||
"condition": "minecraft:entity_scores", | ||
"entity": "this", | ||
"scores": { | ||
"inboat": 1 | ||
} | ||
}, | ||
{ | ||
"condition": "minecraft:inverted", | ||
"term": { | ||
"condition": "minecraft:alternative", | ||
"terms": [ | ||
{ | ||
"condition": "minecraft:entity_properties", | ||
"entity": "this", | ||
"predicate": { | ||
"vehicle": { | ||
"type": "minecraft:boat" | ||
} | ||
} | ||
}, | ||
{ | ||
"condition": "minecraft:entity_properties", | ||
"entity": "this", | ||
"predicate": { | ||
"vehicle": { | ||
"type": "minecraft:chest_boat" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"condition": "minecraft:entity_properties", | ||
"entity": "this", | ||
"predicate": { | ||
"nbt": "{Inventory:[{id:\"minecraft:compass\",tag:{NinUnique:\"BoatCompass\"}}]}" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"rewards": { | ||
"function": "nincodedo:items/boatcompass/mark_boat_location" | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
datapacks/ocw-stuff/data/nincodedo/advancements/recipes/boat_compass.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"criteria": { | ||
"requirement": { | ||
"trigger": "minecraft:recipe_unlocked", | ||
"conditions": { | ||
"recipe": "nincodedo:boat_compass" | ||
} | ||
} | ||
}, | ||
"rewards": { | ||
"function": "nincodedo:recipes/give_boat_compass" | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
datapacks/ocw-stuff/data/nincodedo/functions/items/boatcompass/mark_boat_location.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
item modify entity @s[nbt={Inventory:[{Slot:0b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.0 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:1b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.1 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:2b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.2 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:3b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.3 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:4b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.4 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:5b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.5 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:6b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.6 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:7b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.7 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:8b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.8 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:9b,tag:{NinUnique:"BoatCompass"}}]}] inventory.0 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:10b,tag:{NinUnique:"BoatCompass"}}]}] inventory.1 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:11b,tag:{NinUnique:"BoatCompass"}}]}] inventory.2 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:12b,tag:{NinUnique:"BoatCompass"}}]}] inventory.3 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:13b,tag:{NinUnique:"BoatCompass"}}]}] inventory.4 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:14b,tag:{NinUnique:"BoatCompass"}}]}] inventory.5 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:15b,tag:{NinUnique:"BoatCompass"}}]}] inventory.6 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:16b,tag:{NinUnique:"BoatCompass"}}]}] inventory.7 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:17b,tag:{NinUnique:"BoatCompass"}}]}] inventory.8 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:18b,tag:{NinUnique:"BoatCompass"}}]}] inventory.9 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:19b,tag:{NinUnique:"BoatCompass"}}]}] inventory.10 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:20b,tag:{NinUnique:"BoatCompass"}}]}] inventory.11 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:21b,tag:{NinUnique:"BoatCompass"}}]}] inventory.12 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:22b,tag:{NinUnique:"BoatCompass"}}]}] inventory.13 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:23b,tag:{NinUnique:"BoatCompass"}}]}] inventory.14 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:24b,tag:{NinUnique:"BoatCompass"}}]}] inventory.15 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:25b,tag:{NinUnique:"BoatCompass"}}]}] inventory.16 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:26b,tag:{NinUnique:"BoatCompass"}}]}] inventory.17 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:27b,tag:{NinUnique:"BoatCompass"}}]}] inventory.18 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:28b,tag:{NinUnique:"BoatCompass"}}]}] inventory.19 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:29b,tag:{NinUnique:"BoatCompass"}}]}] inventory.20 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:30b,tag:{NinUnique:"BoatCompass"}}]}] inventory.21 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:31b,tag:{NinUnique:"BoatCompass"}}]}] inventory.22 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:32b,tag:{NinUnique:"BoatCompass"}}]}] inventory.23 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:33b,tag:{NinUnique:"BoatCompass"}}]}] inventory.24 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:34b,tag:{NinUnique:"BoatCompass"}}]}] inventory.25 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:35b,tag:{NinUnique:"BoatCompass"}}]}] inventory.26 nincodedo:set_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:-106b,tag:{NinUnique:"BoatCompass"}}]}] weapon.offhand nincodedo:set_boat_compass | ||
|
||
advancement revoke @s only nincodedo:items/get_out_of_boat | ||
playsound minecraft:item.lodestone_compass.lock block @s ~ ~ ~ 1 | ||
scoreboard players set @s inboat 2 |
1 change: 1 addition & 0 deletions
1
datapacks/ocw-stuff/data/nincodedo/functions/items/load.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scoreboard objectives add inboat dummy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
datapacks/ocw-stuff/data/nincodedo/functions/recipes/give_boat_compass.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
clear @s minecraft:knowledge_book | ||
give @s minecraft:compass{NinUnique:"BoatCompass"} | ||
recipe take @s nincodedo:boat_compass | ||
advancement revoke @s only nincodedo:recipes/boat_compass | ||
|
||
item modify entity @s[nbt={Inventory:[{Slot:0b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.0 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:1b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.1 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:2b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.2 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:3b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.3 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:4b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.4 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:5b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.5 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:6b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.6 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:7b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.7 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:8b,tag:{NinUnique:"BoatCompass"}}]}] hotbar.8 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:9b,tag:{NinUnique:"BoatCompass"}}]}] inventory.0 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:10b,tag:{NinUnique:"BoatCompass"}}]}] inventory.1 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:11b,tag:{NinUnique:"BoatCompass"}}]}] inventory.2 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:12b,tag:{NinUnique:"BoatCompass"}}]}] inventory.3 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:13b,tag:{NinUnique:"BoatCompass"}}]}] inventory.4 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:14b,tag:{NinUnique:"BoatCompass"}}]}] inventory.5 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:15b,tag:{NinUnique:"BoatCompass"}}]}] inventory.6 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:16b,tag:{NinUnique:"BoatCompass"}}]}] inventory.7 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:17b,tag:{NinUnique:"BoatCompass"}}]}] inventory.8 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:18b,tag:{NinUnique:"BoatCompass"}}]}] inventory.9 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:19b,tag:{NinUnique:"BoatCompass"}}]}] inventory.10 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:20b,tag:{NinUnique:"BoatCompass"}}]}] inventory.11 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:21b,tag:{NinUnique:"BoatCompass"}}]}] inventory.12 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:22b,tag:{NinUnique:"BoatCompass"}}]}] inventory.13 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:23b,tag:{NinUnique:"BoatCompass"}}]}] inventory.14 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:24b,tag:{NinUnique:"BoatCompass"}}]}] inventory.15 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:25b,tag:{NinUnique:"BoatCompass"}}]}] inventory.16 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:26b,tag:{NinUnique:"BoatCompass"}}]}] inventory.17 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:27b,tag:{NinUnique:"BoatCompass"}}]}] inventory.18 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:28b,tag:{NinUnique:"BoatCompass"}}]}] inventory.19 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:29b,tag:{NinUnique:"BoatCompass"}}]}] inventory.20 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:30b,tag:{NinUnique:"BoatCompass"}}]}] inventory.21 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:31b,tag:{NinUnique:"BoatCompass"}}]}] inventory.22 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:32b,tag:{NinUnique:"BoatCompass"}}]}] inventory.23 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:33b,tag:{NinUnique:"BoatCompass"}}]}] inventory.24 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:34b,tag:{NinUnique:"BoatCompass"}}]}] inventory.25 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:35b,tag:{NinUnique:"BoatCompass"}}]}] inventory.26 nincodedo:remove_boat_compass | ||
item modify entity @s[nbt={Inventory:[{Slot:-106b,tag:{NinUnique:"BoatCompass"}}]}] weapon.offhand nincodedo:remove_boat_compass |
5 changes: 4 additions & 1 deletion
5
datapacks/ocw-stuff/data/nincodedo/functions/slowtick.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
execute store result score current_day rhcdata run time query day | ||
execute store result score player_count rhcdata run list | ||
|
||
execute as @e[type=minecraft:pillager,name=!"Salesman",limit=1] run data merge entity @s {CustomName: '{"text":"Salesman"}', CustomNameVisible: 1, KillMessage: '%s sold some wares to %s'} | ||
data merge entity @e[type=minecraft:pillager,name=!"Salesman",limit=1] {CustomName: '{"text":"Salesman"}', CustomNameVisible: 1, KillMessage: '%s sold some wares to %s'} | ||
|
||
execute as @e[type=minecraft:wandering_trader,limit=1,tag=!traderswap] run function nincodedo:quests/tradermap | ||
|
||
scoreboard players set @a[predicate=nincodedo:isplayerinboat] inboat 1 | ||
scoreboard players set @a[predicate=!nincodedo:isplayerinboat] inboat 0 | ||
|
||
schedule function nincodedo:slowtick 2s |
29 changes: 29 additions & 0 deletions
29
datapacks/ocw-stuff/data/nincodedo/item_modifiers/remove_boat_compass.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[ | ||
{ | ||
"function": "minecraft:set_nbt", | ||
"tag": "{NinUnique:\"BoatCompass\"}" | ||
}, | ||
{ | ||
"function": "minecraft:set_name", | ||
"entity": "this", | ||
"name": { | ||
"text": "Your Boat Compass", | ||
"italic": false | ||
} | ||
}, | ||
{ | ||
"function": "minecraft:set_lore", | ||
"entity": "this", | ||
"lore": [ | ||
{ | ||
"text": "Keeps track of your boat's", | ||
"color": "gray" | ||
}, | ||
{ | ||
"text": "location when you get out.", | ||
"color": "gray" | ||
} | ||
], | ||
"replace": true | ||
} | ||
] |
86 changes: 86 additions & 0 deletions
86
datapacks/ocw-stuff/data/nincodedo/item_modifiers/set_boat_compass.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
[ | ||
{ | ||
"function": "minecraft:copy_nbt", | ||
"source": "this", | ||
"ops": [ | ||
{ | ||
"source": "Pos[0]", | ||
"target": "LodestonePos.X", | ||
"op": "replace" | ||
}, | ||
{ | ||
"source": "Pos[1]", | ||
"target": "LodestonePos.Y", | ||
"op": "replace" | ||
}, | ||
{ | ||
"source": "Pos[2]", | ||
"target": "LodestonePos.Z", | ||
"op": "replace" | ||
} | ||
] | ||
}, | ||
{ | ||
"function": "minecraft:set_nbt", | ||
"tag": "{LodestoneTracked:0b}" | ||
}, | ||
{ | ||
"function": "minecraft:set_nbt", | ||
"tag": "{LodestoneDimension:\"minecraft:overworld\"}", | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { | ||
"dimension": "minecraft:overworld" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"function": "minecraft:set_nbt", | ||
"tag": "{LodestoneDimension:\"minecraft:the_nether\"}", | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { | ||
"dimension": "minecraft:the_nether" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"function": "minecraft:set_nbt", | ||
"tag": "{LodestoneDimension:\"minecraft:the_end\"}", | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:location_check", | ||
"predicate": { | ||
"dimension": "minecraft:the_end" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"function": "minecraft:set_name", | ||
"entity": "this", | ||
"name": { | ||
"text": "Your Boat Compass", | ||
"italic": false | ||
} | ||
}, | ||
{ | ||
"function": "minecraft:set_lore", | ||
"entity": "this", | ||
"lore": [ | ||
{ | ||
"text": "Keeps track of your boat's", | ||
"color": "gray" | ||
}, | ||
{ | ||
"text": "location when you get out.", | ||
"color": "gray" | ||
} | ||
], | ||
"replace": true | ||
} | ||
] |
Oops, something went wrong.