Skip to content

Commit

Permalink
Updated datapacks
Browse files Browse the repository at this point in the history
  • Loading branch information
RedstoneGamez committed Apr 9, 2020
1 parent 09a817a commit c195428
Show file tree
Hide file tree
Showing 66 changed files with 270 additions and 204 deletions.
42 changes: 35 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#### Datapacks:
- minerva (Utils for installation of all datapacks)
- disable_endermen_grief (Endermen can't pick up blocks)
- universal_dyeing (Adds dye-related recipes, like for hardened clay)
- sleep (One player sleep, you can wake up people via clicking the chat msg) (not working in 1.15)
- dropper_bow_dispenser (Adds a recipe for dispensers with a dropper in a bow shape recipe)
- multiplayer_sleep (one player sleep) (Works in 1.15)
- afk_detect (Detects afk ppl, changes color and stops lifetime & timeplayed)
- afk_detect (Detects afk players to change color and stop lifetime & timeplayed)
- slow_tick (Internal datapack, runs the 1 sec and 5 sec clock)
- disable_cod (All cod is teleported to the void every 5s, their TPS impact was huge)
- disable_bats (All bats are teleported to the void every 5s)
- fast_netherrack (Netherrack items despawn in 5-10 seconds)
- disable_mobs (All selected mobs are teleported to the void every 5s as the impact the TPS)
- fast_despawn (Selected items despawn in 5-10 seconds)
- scoreboards (Scoreboard cycle & triggers, read more bellow)
- fast_stone [disabled] (Stone & cobble despawns in 5-10 seconds)
- spectator (Spectator gamemode for everyone)
- tools (Random tools: entity counter, tps display, unicorn (read more bellow), better clock)
- better_mending (Drops xp while standing on an anvil, allowing mending with your own xp. Player must be minimum lvl 6)
Expand All @@ -18,13 +17,19 @@
All of the trigger commands are in the form of `/trigger .<name>` (defaults to value 1)\
When a number means something you'll need to use `/trigger .<name> set [num]`

##### Install All:
To install all of the provided datapacks properly, run `/function minerva:install_all` for ease and reliability (OP only)

##### Get Admin:
The *disable_mobs* and *fast_despawn* datapacks require the admin tag. To get it, run `/function minerva:get_admin`

##### Scoreboard
- Toggle the scoreboard cycle: `.SbCycle`
- Set a specific scoreboard: `.StatName` will set the StatName scoreboard (eg: `.Deaths`)
- Clear the sidebar: `.clear`
- Change the player colors: `.color set [num]`, color codes can be looked up [here](https://minecraft.gamepedia.com/Formatting_codes)

##### Tps & Entity counter
##### TPS & Entity counter
To show & update the debug scoreboard for N seconds: `.Debug set [seconds]` (max: 60).\
Don't trust first second result, always set it for a few secs.\
You should disable the sb cycle, or debug sb will get overridden every 5s by the cycle.
Expand All @@ -37,7 +42,30 @@ The `.Unicorn` trigger will toggle the horn, accepted values:
2. button
3. glass
4. lead
5. beacon
6. torch
7. glowstone
8. ender_chest
9. magma_block

##### Spectator
To toggle between survival and spectator you can use the `.Spectator` trigger, when leaving spectator mode you will be placed where you entered spectator mode.
It will only allow you to go into spectator if you are not taking damage/falling/drowning

##### Disable Mobs
To toggle allowed mobs you can use the `.DisableMob` trigger. The following are the accepted values to access toggling of mobs (OP only)
1. List options (The information below)
2. All Fish
3. Bats
4. Guardians

##### Fast Despawn
To toggle fast despawning items you can use the `.DespawnItems` trigger. The following are the accepted values to access toggling of mobs (OP only)
1. List options (The information below)
2. Stone and Cobblestone
3. Gravel
4. Dirt
5. Granite, Diorite and Andesite
6. Netherrack
7. Ender Pearls
8. Kelp
1 change: 0 additions & 1 deletion disable_bats/data/disable_bats/functions/loop.mcfunction

This file was deleted.

6 changes: 0 additions & 6 deletions disable_bats/data/slow_tick/tags/functions/5second.json

This file was deleted.

1 change: 0 additions & 1 deletion disable_cod/data/disable_cod/functions/loop.mcfunction

This file was deleted.

6 changes: 0 additions & 6 deletions disable_cod/data/slow_tick/tags/functions/5second.json

This file was deleted.

6 changes: 0 additions & 6 deletions disable_cod/pack.mcmeta

This file was deleted.

12 changes: 12 additions & 0 deletions disable_mobs/data/disable_mobs/functions/add.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tellraw @a[scores={.DisableMob=1}] [{"text":"Mobs that can be disabled are with commands:","color":"yellow"},{"text":"\n"},{"text":"/trigger .DisableMob set 2","color":"yellow","bold":true},{"text":" - All Fish"},{"text":"\n"},{"text":"/trigger .DisableMob set 3","color":"yellow","bold":true},{"text":" - Bats"},{"text":"\n"},{"text":"/trigger .DisableMob set 4","color":"yellow","bold":true},{"text":" - Guardians"}]

execute at @a[scores={.DisableMob=2}] run scoreboard players set Fish disabledMobs 1
execute at @a[scores={.DisableMob=2}] run tellraw @a[scores={.DisableMob=2}] [{"text":"Enabled void teleports for cod, salmon, tropical fish and pufferfish","color":"yellow"}]

execute at @a[scores={.DisableMob=3}] run scoreboard players set Bat disabledMobs 1
execute at @a[scores={.DisableMob=3}] run tellraw @a[scores={.DisableMob=3}] [{"text":"Enabled void teleports for bats","color":"yellow"}]

execute at @a[scores={.DisableMob=4}] run scoreboard players set Guardian disabledMobs 1
execute at @a[scores={.DisableMob=4}] run tellraw @a[scores={.DisableMob=4}] [{"text":"Enabled void teleports for guardians","color":"yellow"}]

scoreboard players reset @a[scores={.DisableMob=1..}] .DisableMob
6 changes: 6 additions & 0 deletions disable_mobs/data/disable_mobs/functions/install.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
scoreboard objectives add disabledMobs dummy
scoreboard objectives add .DisableMob trigger
scoreboard players set #ONE disabledMobs 1
scoreboard players set Bat disabledMobs 0
scoreboard players set Fish disabledMobs 1
scoreboard players set Guardian disabledMobs 0
19 changes: 19 additions & 0 deletions disable_mobs/data/disable_mobs/functions/loop.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
execute if score Bat disabledMobs = #ONE disabledMobs run execute as @e[type=minecraft:bat] at @s run teleport @s ~ -1000 ~
execute if score Fish disabledMobs = #ONE disabledMobs run execute as @e[type=minecraft:cod] at @s run teleport @s ~ -1000 ~
execute if score Fish disabledMobs = #ONE disabledMobs run execute as @e[type=minecraft:salmon] at @s run teleport @s ~ -1000 ~
execute if score Fish disabledMobs = #ONE disabledMobs run execute as @e[type=minecraft:tropical_fish] at @s run teleport @s ~ -1000 ~
execute if score Fish disabledMobs = #ONE disabledMobs run execute as @e[type=minecraft:pufferfish] at @s run teleport @s ~ -1000 ~
execute if score Guardian disabledMobs = #ONE disabledMobs run execute as @e[type=minecraft:guardian] at @s run teleport @s ~ -1000 ~

execute at @p[scores={.DisableMob=1}] run function disable_mobs:add

execute at @p[scores={.DisableMob=2}] run execute if score Fish disabledMobs matches 1 run function disable_mobs:remove
execute at @p[scores={.DisableMob=2}] run execute if score Fish disabledMobs matches 0 run function disable_mobs:add

execute at @p[scores={.DisableMob=3}] run execute if score Bat disabledMobs matches 1 run function disable_mobs:remove
execute at @p[scores={.DisableMob=3}] run execute if score Bat disabledMobs matches 0 run function disable_mobs:add

execute at @p[scores={.DisableMob=4}] run execute if score Guardian disabledMobs matches 1 run function disable_mobs:remove
execute at @p[scores={.DisableMob=4}] run execute if score Guardian disabledMobs matches 0 run function disable_mobs:add

scoreboard players enable @a[tag=admin] .DisableMob
10 changes: 10 additions & 0 deletions disable_mobs/data/disable_mobs/functions/remove.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
execute at @a[scores={.DisableMob=2}] run scoreboard players set Fish disabledMobs 0
execute at @a[scores={.DisableMob=2}] run tellraw @a[scores={.DisableMob=2}] [{"text":"Disabled void teleports for cod, salmon, tropical fish and pufferfish","color":"yellow"}]

execute at @a[scores={.DisableMob=3}] run scoreboard players set Bat disabledMobs 0
execute at @a[scores={.DisableMob=3}] run tellraw @a[scores={.DisableMob=3}] [{"text":"Disabled void teleports for bats","color":"yellow"}]

execute at @a[scores={.DisableMob=4}] run scoreboard players set Guardian disabledMobs 0
execute at @a[scores={.DisableMob=4}] run tellraw @a[scores={.DisableMob=4}] [{"text":"Disabled void teleports for guardians","color":"yellow"}]

scoreboard players reset @a[scores={.DisableMob=1..}] .DisableMob
6 changes: 6 additions & 0 deletions disable_mobs/data/slow_tick/tags/functions/5second.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"disable_mobs:loop"
]
}
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions fast_despawn/data/fast_despawn/functions/add.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
tellraw @a[scores={.DespawnItems=1}] [{"text":"Items that can be despawned quickly with commands:","color":"yellow"},{"text":"\n"},{"text":"/trigger .DespawnItems set 2","color":"yellow","bold":true},{"text":" - Stone"},{"text":"\n"},{"text":"/trigger .DespawnItems set 3","color":"yellow","bold":true},{"text":" - Gravel"},{"text":"\n"},{"text":"/trigger .DespawnItems set 4","color":"yellow","bold":true},{"text":" - Dirt"},{"text":"\n"},{"text":"/trigger .DespawnItems set 5","color":"yellow","bold":true},{"text":" - Special Stones"},{"text":"\n"},{"text":"/trigger .DespawnItems set 6","color":"yellow","bold":true},{"text":" - Netherrack"},{"text":"\n"},{"text":"/trigger .DespawnItems set 7","color":"yellow","bold":true},{"text":" - Ender Pearls"},{"text":"\n"},{"text":"/trigger .DespawnItems set 8","color":"yellow","bold":true},{"text":" - Kelp"}]

execute at @a[scores={.DespawnItems=2}] run scoreboard players set Stone despawnItems 1
execute at @a[scores={.DespawnItems=2}] run tellraw @a[scores={.DespawnItems=2}] [{"text":"Enabled fast despawn for stone and cobblestone items","color":"yellow"}]

execute at @a[scores={.DespawnItems=3}] run scoreboard players set Gravel despawnItems 1
execute at @a[scores={.DespawnItems=3}] run tellraw @a[scores={.DespawnItems=3}] [{"text":"Enabled fast despawn for gravel items","color":"yellow"}]

execute at @a[scores={.DespawnItems=4}] run scoreboard players set Dirt despawnItems 1
execute at @a[scores={.DespawnItems=4}] run tellraw @a[scores={.DespawnItems=4}] [{"text":"Enabled fast despawn for dirt items","color":"yellow"}]

execute at @a[scores={.DespawnItems=5}] run scoreboard players set SpecialStone despawnItems 1
execute at @a[scores={.DespawnItems=5}] run tellraw @a[scores={.DespawnItems=5}] [{"text":"Enabled fast despawn for granite, andesite and diorite items","color":"yellow"}]

execute at @a[scores={.DespawnItems=6}] run scoreboard players set Netherrack despawnItems 1
execute at @a[scores={.DespawnItems=6}] run tellraw @a[scores={.DespawnItems=6}] [{"text":"Enabled fast despawn for netherrack items","color":"yellow"}]

execute at @a[scores={.DespawnItems=7}] run scoreboard players set EnderPearl despawnItems 1
execute at @a[scores={.DespawnItems=7}] run tellraw @a[scores={.DespawnItems=7}] [{"text":"Enabled fast despawn for ender pearl items","color":"yellow"}]

execute at @a[scores={.DespawnItems=8}] run scoreboard players set Kelp despawnItems 1
execute at @a[scores={.DespawnItems=8}] run tellraw @a[scores={.DespawnItems=8}] [{"text":"Enabled fast despawn for kelp items","color":"yellow"}]

scoreboard players reset @a[scores={.DespawnItems=1..}] .DespawnItems
11 changes: 11 additions & 0 deletions fast_despawn/data/fast_despawn/functions/install.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
scoreboard objectives add despawnItems dummy
scoreboard objectives add .DespawnItems trigger

scoreboard players set #ONE despawnItems 1
scoreboard players set Kelp despawnItems 1
scoreboard players set Dirt despawnItems 0
scoreboard players set Stone despawnItems 0
scoreboard players set Gravel despawnItems 0
scoreboard players set EnderPearl despawnItems 1
scoreboard players set Netherrack despawnItems 0
scoreboard players set SpecialStone despawnItems 0
35 changes: 35 additions & 0 deletions fast_despawn/data/fast_despawn/functions/loop.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
execute if score Kelp despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:kelp"}}] run data merge entity @s {Age:5800s}
execute if score Dirt despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:dirt"}}] run data merge entity @s {Age:5800s}
execute if score Stone despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:stone"}}] run data merge entity @s {Age:5800s}
execute if score Stone despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:cobblestone"}}] run data merge entity @s {Age:5800s}
execute if score Gravel despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:gravel"}}] run data merge entity @s {Age:5900s}
execute if score Netherrack despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:ender_pearl"}}] run data merge entity @s {Age:5800s}
execute if score EnderPearl despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:netherrack"}}] run data merge entity @s {Age:5800s}
execute if score SpecialStone despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:granite"}}] run data merge entity @s {Age:5800s}
execute if score SpecialStone despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:andesite"}}] run data merge entity @s {Age:5800s}
execute if score SpecialStone despawnItems = #ONE despawnItems run execute as @e[nbt={Item:{id:"minecraft:diorite"}}] run data merge entity @s {Age:5800s}

execute at @p[scores={.DespawnItems=1}] run function fast_despawn:add

execute at @p[scores={.DespawnItems=2}] run execute if score Stone despawnItems matches 1 run function fast_despawn:remove
execute at @p[scores={.DespawnItems=2}] run execute if score Stone despawnItems matches 0 run function fast_despawn:add

execute at @p[scores={.DespawnItems=3}] run execute if score Gravel despawnItems matches 1 run function fast_despawn:remove
execute at @p[scores={.DespawnItems=3}] run execute if score Gravel despawnItems matches 0 run function fast_despawn:add

execute at @p[scores={.DespawnItems=4}] run execute if score Dirt despawnItems matches 1 run function fast_despawn:remove
execute at @p[scores={.DespawnItems=4}] run execute if score Dirt despawnItems matches 0 run function fast_despawn:add

execute at @p[scores={.DespawnItems=5}] run execute if score SpecialStone despawnItems matches 1 run function fast_despawn:remove
execute at @p[scores={.DespawnItems=5}] run execute if score SpecialStone despawnItems matches 0 run function fast_despawn:add

execute at @p[scores={.DespawnItems=6}] run execute if score Netherrack despawnItems matches 1 run function fast_despawn:remove
execute at @p[scores={.DespawnItems=6}] run execute if score Netherrack despawnItems matches 0 run function fast_despawn:add

execute at @p[scores={.DespawnItems=7}] run execute if score EnderPearl despawnItems matches 1 run function fast_despawn:remove
execute at @p[scores={.DespawnItems=7}] run execute if score EnderPearl despawnItems matches 0 run function fast_despawn:add

execute at @p[scores={.DespawnItems=8}] run execute if score Kelp despawnItems matches 1 run function fast_despawn:remove
execute at @p[scores={.DespawnItems=8}] run execute if score Kelp despawnItems matches 0 run function fast_despawn:add

scoreboard players enable @a[tag=admin] .DespawnItems
22 changes: 22 additions & 0 deletions fast_despawn/data/fast_despawn/functions/remove.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
execute at @a[scores={.DespawnItems=2}] run scoreboard players set Stone despawnItems 0
execute at @a[scores={.DespawnItems=2}] run tellraw @a[scores={.DespawnItems=2}] [{"text":"Disabled fast despawn for stone and cobblestone items","color":"yellow"}]

execute at @a[scores={.DespawnItems=3}] run scoreboard players set Gravel despawnItems 0
execute at @a[scores={.DespawnItems=3}] run tellraw @a[scores={.DespawnItems=3}] [{"text":"Disabled fast despawn for gravel items","color":"yellow"}]

execute at @a[scores={.DespawnItems=4}] run scoreboard players set Dirt despawnItems 0
execute at @a[scores={.DespawnItems=4}] run tellraw @a[scores={.DespawnItems=4}] [{"text":"Disabled fast despawn for dirt items","color":"yellow"}]

execute at @a[scores={.DespawnItems=5}] run scoreboard players set SpecialStone despawnItems 0
execute at @a[scores={.DespawnItems=5}] run tellraw @a[scores={.DespawnItems=5}] [{"text":"Disabled fast despawn for granite, andesite and diorite items","color":"yellow"}]

execute at @a[scores={.DespawnItems=6}] run scoreboard players set Netherrack despawnItems 0
execute at @a[scores={.DespawnItems=6}] run tellraw @a[scores={.DespawnItems=6}] [{"text":"Disabled fast despawn for netherrack items","color":"yellow"}]

execute at @a[scores={.DespawnItems=7}] run scoreboard players set EnderPearl despawnItems 0
execute at @a[scores={.DespawnItems=7}] run tellraw @a[scores={.DespawnItems=7}] [{"text":"Disabled fast despawn for ender pearl items","color":"yellow"}]

execute at @a[scores={.DespawnItems=8}] run scoreboard players set Kelp despawnItems 0
execute at @a[scores={.DespawnItems=8}] run tellraw @a[scores={.DespawnItems=8}] [{"text":"Disabled fast despawn for kelp items","color":"yellow"}]

scoreboard players reset @a[scores={.DespawnItems=1..}] .DespawnItems
6 changes: 6 additions & 0 deletions fast_despawn/data/slow_tick/tags/functions/5second.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"fast_despawn:loop"
]
}
File renamed without changes.

This file was deleted.

6 changes: 0 additions & 6 deletions fast_netherrack/data/slow_tick/tags/functions/5second.json

This file was deleted.

5 changes: 0 additions & 5 deletions fast_stone/data/fast_stone/functions/loop.mcfunction

This file was deleted.

6 changes: 0 additions & 6 deletions fast_stone/data/slow_tick/tags/functions/5second.json

This file was deleted.

6 changes: 0 additions & 6 deletions fast_stone/pack.mcmeta

This file was deleted.

2 changes: 2 additions & 0 deletions minerva/data/minerva/functions/get_admin.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tag @s add admin
tellraw @s [{"text":"You now have the admin tag","color":"yellow"}]
9 changes: 9 additions & 0 deletions minerva/data/minerva/functions/install_all.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function slow_tick:install
function scoreboards:install
function scoreboards:setup_scoreboards
function scoreboards:setup_triggers
function spectator:install
function tools:install
function afk:install
function fast_despawn:install
function disable_mobs:install
Empty file.
4 changes: 4 additions & 0 deletions minerva/data/slow_tick/tags/5second.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"replace": false,
"values": []
}
6 changes: 6 additions & 0 deletions minerva/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"pack": {
"description": "Main centre for datapack operations",
"pack_format": 4
}
}

This file was deleted.

27 changes: 0 additions & 27 deletions multiplayer_sleep/data/main/advancements/main/root.json

This file was deleted.

6 changes: 0 additions & 6 deletions sleep/data/minecraft/tags/functions/load.json

This file was deleted.

6 changes: 0 additions & 6 deletions sleep/data/minecraft/tags/functions/tick.json

This file was deleted.

Loading

0 comments on commit c195428

Please sign in to comment.