-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
183 additions
and
0 deletions.
There are no files selected for viewing
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,2 @@ | ||
scoreboard objectives add cave_cleaner trigger "Cave Cleaner" | ||
scoreboard objectives add cave_glow trigger "Cave Cleaner Glow" |
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,11 @@ | ||
schedule function cave_cleaner:schedule 10t | ||
execute as @a[gamemode=spectator,scores={cave_cleaner=1..}] at @s run function cave_cleaner:trigger_cave_cleaner | ||
#execute as @a[gamemode=creative,scores={cave_cleaner=1..}] at @s run function cave_cleaner:trigger_cave_cleaner | ||
scoreboard players enable @a[gamemode=spectator] cave_cleaner | ||
#scoreboard players enable @a[gamemode=creative] cave_cleaner | ||
scoreboard players set @a cave_cleaner 0 | ||
execute as @a[gamemode=spectator,scores={cave_glow=1..}] at @s run function cave_cleaner:trigger_cave_glow | ||
#execute as @a[gamemode=creative,scores={cave_glow=1..}] at @s run function cave_cleaner:trigger_cave_glow | ||
scoreboard players enable @a[gamemode=spectator] cave_glow | ||
#scoreboard players enable @a[gamemode=creative] cave_glow | ||
scoreboard players set @a cave_glow 0 |
12 changes: 12 additions & 0 deletions
12
data/cave_cleaner/functions/trigger_cave_cleaner.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,12 @@ | ||
# Looking to change the "cleaning" radius? Replace anything with ",distance..16]" to your desired number. | ||
# Also suggested to change the number in the tellraw command too, but it's not necessary since it's just visual. | ||
# Example: | ||
# execute store result score @s cave_cleaner if entity @e[type=#cave_cleaner:unclean,predicate=cave_cleaner:unclean,distance=..64] | ||
# execute as @e[type=#cave_cleaner:unclean,predicate=cave_cleaner:unclean,distance=..64] run data merge entity @s {Health:0.0f,DeathTime:19s} | ||
# tellraw @s [{"text":"Cleaned ","color":"gold"},{"score":{"name":"@s","objective":"cave_cleaner"},"color":"gold"},{"text":" entities within 64 blocks","color":"gold"}] | ||
|
||
execute store result score @s cave_cleaner if entity @e[type=#cave_cleaner:unclean,predicate=cave_cleaner:unclean,distance=..16] | ||
execute as @e[type=#cave_cleaner:unclean,predicate=cave_cleaner:unclean,distance=..16] run data merge entity @s {Health:0.0f,DeathTime:19s} | ||
tellraw @s [{"text":"Cleaned ","color":"gold"},{"score":{"name":"@s","objective":"cave_cleaner"},"color":"gold"},{"text":" entities within 16 blocks","color":"gold"}] | ||
|
||
# Don't forget to save your changes, then restart the server/world for them to go into effect. |
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 @@ | ||
# Looking to change the glowing radius? Replace anything with ",distance..128]" to your desired number. | ||
# Also suggested to change the number in the tellraw command too, but it's not necessary since it's just visual. | ||
# Same situation with changing the duration of the glowing effect, except your replacing the "10". In the example, I changed it to 5 seconds. | ||
# Example: | ||
# execute store result score @s cave_glow if entity @e[type=#cave_cleaner:unclean,predicate=cave_cleaner:unclean,distance=..256] | ||
# effect give @e[type=#cave_cleaner:unclean,predicate=cave_cleaner:unclean,distance=..256] minecraft:glowing 5 | ||
# tellraw @s [{"text":"Gave ","color":"gold"},{"score":{"name":"@s","objective":"cave_glow"},"color":"gold"},{"text":" entities within 256 blocks glowing for 5 seconds","color":"gold"}] | ||
|
||
execute store result score @s cave_glow if entity @e[type=#cave_cleaner:unclean,predicate=cave_cleaner:unclean,distance=..128] | ||
effect give @e[type=#cave_cleaner:unclean,predicate=cave_cleaner:unclean,distance=..128] minecraft:glowing 10 | ||
tellraw @s [{"text":"Gave ","color":"gold"},{"score":{"name":"@s","objective":"cave_glow"},"color":"gold"},{"text":" entities within 128 blocks glowing for 10 seconds","color":"gold"}] | ||
|
||
# Don't forget to save your changes, then restart the server/world for them to go into effect. |
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,11 @@ | ||
{ | ||
"condition": "minecraft:entity_properties", | ||
"entity": "this", | ||
"predicate": { | ||
"equipment": { | ||
"mainhand": { | ||
"tag": "cave_cleaner:unclean" | ||
} | ||
} | ||
} | ||
} |
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,8 @@ | ||
{ | ||
"values": [ | ||
"minecraft:drowned", | ||
"minecraft:husk", | ||
"minecraft:zombie", | ||
"minecraft:zombie_villager" | ||
] | ||
} |
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,48 @@ | ||
{ | ||
"values": [ | ||
"minecraft:amethyst_shard", | ||
"minecraft:andesite", | ||
"minecraft:arrow", | ||
"minecraft:bamboo", | ||
"minecraft:bone", | ||
"minecraft:calcite", | ||
"minecraft:carrot", | ||
"minecraft:coarse_dirt", | ||
"minecraft:cobbled_deepslate", | ||
"minecraft:cobblestone", | ||
"minecraft:cod", | ||
"minecraft:deepslate", | ||
"minecraft:diorite", | ||
"minecraft:dirt", | ||
"minecraft:egg", | ||
"minecraft:glow_ink_sac", | ||
"minecraft:granite", | ||
"minecraft:gravel", | ||
"minecraft:gunpowder", | ||
"minecraft:ink_sac", | ||
"minecraft:mud", | ||
"minecraft:netherrack", | ||
"minecraft:pointed_dripstone", | ||
"minecraft:poisonous_potato", | ||
"minecraft:potato", | ||
"minecraft:rail", | ||
"minecraft:raw_copper", | ||
"minecraft:raw_gold", | ||
"minecraft:raw_iron", | ||
"minecraft:red_sand", | ||
"minecraft:rooted_dirt", | ||
"minecraft:rotten_flesh", | ||
"minecraft:salmon", | ||
"minecraft:sand", | ||
"minecraft:sandstone", | ||
"minecraft:slime_ball", | ||
"minecraft:spider_eye", | ||
"minecraft:stick", | ||
"minecraft:stone", | ||
"minecraft:string", | ||
"minecraft:sugar_cane", | ||
"minecraft:tropical_fish", | ||
"minecraft:tuff", | ||
"minecraft:wheat_seeds" | ||
] | ||
} |
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 @@ | ||
{"replace":false,"values":["cave_cleaner:load","cave_cleaner:schedule"]} |
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,36 @@ | ||
All the information you'll need working with this datapack should be in here. | ||
---------- | ||
|
||
HOW TO USE THE COMMANDS | ||
/trigger cave_glow | ||
- Gives persistent entities within 128 blocks glowing for 10 seconds | ||
- Can only be triggered in spectator mode | ||
|
||
/trigger cave_cleaner | ||
- Kills persistent entities within 16 blocks | ||
- Can only be triggered in spectator mode | ||
|
||
---------- | ||
|
||
HOW TO CHANGE THE GLOWING RADIUS | ||
Go to "Cave Cleaner/data/cave_cleaner/functions/trigger_cave_glow.mcfunction" and open the file. | ||
The first few lines will explain what to do. | ||
|
||
HOW TO CHANGE THE GLOWING DURATION | ||
Go to "Cave Cleaner/data/cave_cleaner/functions/trigger_cave_glow.mcfunction" and open the file. | ||
The first few lines will explain what to do. | ||
|
||
HOW TO CHANGE THE "CLEANING" RADIUS | ||
Go to "Cave Cleaner/data/cave_cleaner/functions/trigger_cave_cleaner.mcfunction" and open the file. | ||
The first few lines will explain what to do. | ||
|
||
HOW TO ENABLE CAVE CLEANER IN CREATIVE MODE | ||
Go to "Cave Cleaner/data/cave_cleaner/functions/schedule.mcfunction" and open the file. | ||
Remove every pound/hashtag symbol ("#") in the file. | ||
Don't forget to save your changes, then restart the server/world for them to go into effect. | ||
|
||
---------- | ||
|
||
Confused? Couldn't find what you were looking for? Still need help? Datapack needs updating to latest version? Send me a private message at: | ||
Twitter - @Owehttamy | ||
Discord - @Owehttamy#0001 |
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,6 @@ | ||
{ | ||
"pack": { | ||
"pack_format": 10, | ||
"description": "§6Cave Cleaner\n§eUnofficial Public Version" | ||
} | ||
} |
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,35 @@ | ||
This data pack is used to kill any persistent or "unclean" zombies that have picked up items and now won't despawn. | ||
This is done by using the "/trigger cave_glow" and "/trigger cave_cleaner" commands in spectator mode. | ||
Want to see it in action? Check out Xisumavoid's video on the pack and how it's used: https://youtu.be/NpOszQWKC8s?t=119 | ||
|
||
This datapack was originally created by Grant from the Vanilla Tweaks team and was used on the Hermitcraft Season 8 world. | ||
BUT, this is an unofficial—and therefore unsupported—version of the datapack, as I have modified the files to update and improve the pack to the latest version. | ||
|
||
If you would like to download the official (and outdated) version of the cave cleaner datapack, you will find it in the datapacks folder here: | ||
https://download.hermitcraft.com/hermitcraft8.zip | ||
|
||
Why isn't there an official version of the Cave Cleaner datapack? | ||
Quote from Grant: "A lot of people would want to configure it (like by changing the items, radius, etc), and I don't like requiring people to go into the data for basic configuration. | ||
Since that isn't very user-friendly, and we wouldn't want to be obligated to give lots of people support for going into the files to configure it either, or have to write FAQs for it." | ||
|
||
Could it not be done through an options menu? | ||
Grant: "Not really, since it's based on tags. Those can only be modified using JSON, not commands. | ||
We could, hypothetically, implement something that is based on commands but it would be really messy and/or inefficient." | ||
(Clearly he decided it was not in his best interest) | ||
|
||
|
||
|
||
Thanks to Grant from the Vanilla Tweaks team for creating the original datapack and pointing me to where I could find the files. You can find some of his other work here: | ||
https://vanillatweaks.net/ | ||
|
||
*** PLEASE DO NOT CONTACT GRANT OR ANYONE FROM VANILLA TWEAKS ASKING FOR SUPPORT REGARDING THIS DATAPACK *** | ||
|
||
I have no affiliation with Hermitcraft or Vanilla Tweaks, and likely never will. I am providing this tool as a public resource so the player base can keep their worlds and servers lag-free. | ||
If any members of Vanilla Tweaks or Hermitcraft have issues with this pack, please contact me at one of my socials referenced below. Thank you. | ||
|
||
I, Owehttamy, am the one unofficially maintaining this server tool. If you have any questions, suggestions, need any help, or just wanna check out other stuff I do you can find me here: | ||
Twitch: https://twitch.tv/owehttamy | ||
Discord: @Owehttamy#0001 | ||
Twitter: @Owehttamy | ||
|
||
Alright, have a nice day! (And thank you for reading this) |