Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Commit

Permalink
Update v1.6.10
Browse files Browse the repository at this point in the history
- Small code optimizations
- Better compatibility with other datapacks
  • Loading branch information
2mal3 committed Aug 28, 2020
1 parent 2c0a7f3 commit c9ee580
Show file tree
Hide file tree
Showing 20 changed files with 134 additions and 134 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Advanced Monsters Datapack v.1.6.8
# Advanced Monsters Datapack v1.6.10
Compatibility: Multiplayer 1.14+

With the Advanced Monsters Datapack v.1.6.8 by 2mal3 there is a chance (usually 10%) that a monster will become an Advanced Monster. This monster has 50% more life, does 50% more damage, is 10% faster and sees players 10% longer.
With the Advanced Monsters Datapack v1.6.10 by 2mal3 there is a chance (usually 10%) that a monster will become an Advanced Monster. This monster has 50% more life, does 50% more damage, is 10% faster and sees players 10% longer.

The chance can be changed under data > amd > loot_tables > random.json by changing the second number. The probability then results from 1 / The specified number.

Expand Down
4 changes: 2 additions & 2 deletions data/amd/advancements/amd.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"display": {
"title": "Advanced Monsters v.1.6.8",
"description": "With the Advanced Monsters Datapack v.1.6.8 by 2mal3 there is a chance that a monster will become an Advanced Monster. This monster is much stronger and harder to defeat.",
"title": "Advanced Monsters v1.6.10",
"description": "With the Advanced Monsters Datapack v1.6.10 by 2mal3 there is a chance that a monster will become an Advanced Monster. This monster is much stronger and harder to defeat.",
"icon": {
"item": "minecraft:zombie_head"
},
Expand Down
7 changes: 7 additions & 0 deletions data/amd/functions/core/reload/first_run.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Description: send the installation message 3 sekonds after reload
# Called by: core/reload/reload
# Datapack by 2mal3

tellraw @a[tag=!global.ignore,tag=!global.ignore.gui] ["",{"text":"Advanced Monsters Datapack v","color":"blue"},{"score":{"name":"$V1","objective":"amd.data"},"color":"blue"},{"text":".","color":"blue"},{"score":{"name":"$V2","objective":"amd.data"},"color":"blue"},{"text":".","color":"blue"},{"score":{"name":"$V3","objective":"amd.data"},"color":"blue"},{"text":" by 2mal3 was installed!","color":"blue"}]

scoreboard players set $amd.first_run amd.data 1
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@ scoreboard objectives add amd.data dummy

scoreboard players set $V1 amd.data 1
scoreboard players set $V2 amd.data 6
scoreboard players set $V3 amd.data 8
scoreboard players set $V3 amd.data 10


# test minecraft version
function version:test


# send the reload message 4 sekonds after reload
schedule function amd:main/reload/reload_message 3s
execute unless score $amd.first_run amd.data matches 1 run schedule function amd:core/reload/first_run 4s


# start game loop
execute if score $version version matches 1140..1152 run function amd:main/tick/second/1.14
execute if score $version version matches 1160..1161 run function amd:main/tick/second/1.16
execute if score $version version matches 1162.. run function amd:main/tick/second/1.16.2

# better compitiblity with other datapacks 1.5.6
# support for 1.14.X, 1.15.X, 1.16.1, 1.16.2 1.6.6
# removed nametag visiblity 1.6.7
# removed transaltion because it not used 1.6.8
execute if score $version version matches 1140..1152 run function amd:f/tick/second/1.14
execute if score $version version matches 1160..1161 run function amd:core/tick/second/1.16
execute if score $version version matches 1162.. run function amd:core/tick/second/1.16.2

# small optmizations 1.6.9
# better compatiblity with other datapacks 1.6.10
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Description: Game loop for 1.14+ every second
# Called by: main/reload/reload, main/tick/second
# Called by: core/reload/reload, core/tick/second
# Datapack by 2mal3

# choose a random monster
Expand All @@ -10,4 +10,4 @@ execute as @e[scores={amd.random=1},tag=!amd.transformed,tag=!global.ignore] at


# tick
schedule function amd:main/tick/second/1.14 1s
schedule function amd:core/tick/second/1.14 1s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Description: Game loop for 1.16.2 every second
# Called by: main/reload/reload, main/tick/second
# Called by: core/reload/reload, core/tick/second
# Datapack by 2mal3

# choose a random monster
Expand All @@ -10,4 +10,4 @@ execute as @e[scores={amd.random=1},tag=!amd.transformed,tag=!global.ignore] at


# tick
schedule function amd:main/tick/second/1.16.2 1s
schedule function amd:core/tick/second/1.16.2 1s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Description: Game loop for 1.16 every second
# Called by: main/reload/reload, main/tick/second
# Called by: core/reload/reload, core/tick/second
# Datapack by 2mal3

# choose a random monster
Expand All @@ -10,4 +10,4 @@ execute as @e[scores={amd.random=1},tag=!amd.transformed,tag=!global.ignore] at


# tick
schedule function amd:main/tick/second/1.16 1s
schedule function amd:core/tick/second/1.16 1s
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Description: Game loop tick for 1.14+
# Called by: main/tick/tick/main
# Called by: core/tick/tick/core
# Datapack by 2mal3

# better advanced monsters projectiles
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Description: uninstalling
# Called by: main/uninstall/uninstall_ask
# Called by: core/uninstall/uninstall_ask
# Datapack by 2mal3

# send remove message
tellraw @a[tag=!global.ignore,tag=!global.ignore.gui] [{"text":"[Server] Advanced Monsters Datapack v."},{"score":{"name":"$V1","objective":"amd.data"}},{"text":"."},{"score":{"name":"$V2","objective":"amd.data"}},{"text":"."},{"score":{"name":"$V3","objective":"amd.data"}},{"text":" by 2mal3 was successfully uninstalled."}]
tellraw @a[tag=!global.ignore,tag=!global.ignore.gui] [{"text":"[Server] Advanced Monsters Datapack v"},{"score":{"name":"$V1","objective":"amd.data"}},{"text":"."},{"score":{"name":"$V2","objective":"amd.data"}},{"text":"."},{"score":{"name":"$V3","objective":"amd.data"}},{"text":" by 2mal3 was successfully uninstalled."}]


# remove scoreboards
Expand All @@ -21,9 +21,9 @@ execute as @e[tag=amd.transformed] run data merge entity @s {CustomName:""}


# diasable datapack tick
schedule clear amd:main/tick/second/1.14
schedule clear amd:main/tick/second/1.16
schedule clear amd:main/tick/second/1.16.2
schedule clear amd:core/tick/second/1.14
schedule clear amd:core/tick/second/1.16
schedule clear amd:core/tick/second/1.16.2


# disable datapck
Expand Down
5 changes: 5 additions & 0 deletions data/amd/functions/core/uninstall/uninstall_ask.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Description: uninstalling
# Called by: #uninstall
# Datapack by 2mal3

tellraw @s[tag=!global.ignore,tag=!global.ignore.gui] [{"text":"Do you really want to deinstall the ","color":"red"},{"text":"Advanced Monsters Dtapack","color":"red"},{"text":" v","color":"red"},{"score":{"name":"$V1","objective":"amd.data"},"color":"red"},{"text":".","color":"red"},{"score":{"name":"$V2","objective":"amd.data"},"color":"red"},{"text":".","color":"red"},{"score":{"name":"$V3","objective":"amd.data"},"color":"red"},{"text":" by 2mal3?","color":"red"},{"text":"\n"},{"text":"[No]","color":"dark_green","hoverEvent":{"action":"show_text","value":"*click*"}},{"text":" \u0020"},{"text":"[Yes]","color":"dark_red","clickEvent":{"action":"run_command","value":"/function amd:core/uninstall/uninstall"},"hoverEvent":{"action":"show_text","value":"*click*"}}]
2 changes: 1 addition & 1 deletion data/amd/functions/custom.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Description: Additional abilities for transformed monsters
# Called by: main/tick/tick
# Called by: core/tick/tick
# Datapack by 2mal3

execute if entity @s[type=#amd:arrow] run data merge entity @e[type=minecraft:arrow,limit=1,sort=nearest,distance=..2] {damage:4d}
Expand Down
5 changes: 0 additions & 5 deletions data/amd/functions/main/reload/reload_message.mcfunction

This file was deleted.

5 changes: 0 additions & 5 deletions data/amd/functions/main/uninstall/uninstall_ask.mcfunction

This file was deleted.

58 changes: 29 additions & 29 deletions data/amd/functions/transform/1.14.mcfunction
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# Description: Turns the monsters into advanced for 1.14+
# Called by: main/tick/second/1.14
# Called by: core/tick/second/1.14
# Datapack by 2mal3

# rename monsters
data merge entity @s {CustomName:'[{"text":"Advanced","color":"red"}]'}
data merge entity @s[type=minecraft:blaze] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Blaze","color":"white"}]'}
data merge entity @s[type=minecraft:cave_spider] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Cave Spider","color":"white"}]'}
data merge entity @s[type=minecraft:creeper] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Creeper","color":"white"}]'}
data merge entity @s[type=minecraft:drowned] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Drowned","color":"white"}]'}
data merge entity @s[type=minecraft:elder_guardian] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Elder guardian","color":"white"}]'}
data merge entity @s[type=minecraft:endermite] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Endermite","color":"white"}]'}
data merge entity @s[type=minecraft:evoker] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Evoker","color":"white"}]'}
data merge entity @s[type=minecraft:ghast] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Ghast","color":"white"}]'}
data merge entity @s[type=minecraft:guardian] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Guardian","color":"white"}]'}
data merge entity @s[type=minecraft:husk] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Husk","color":"white"}]'}
data merge entity @s[type=minecraft:illusioner] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Illusioner","color":"white"}]'}
data merge entity @s[type=minecraft:magma_cube] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Magma cube","color":"white"}]'}
data merge entity @s[type=minecraft:phantom] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Phantom","color":"white"}]'}
data merge entity @s[type=minecraft:ravager] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Ravager","color":"white"}]'}
data merge entity @s[type=minecraft:shulker] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Shulker","color":"white"}]'}
data merge entity @s[type=minecraft:silverfish] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Silverfish","color":"white"}]'}
data merge entity @s[type=minecraft:skeleton] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Skeleton","color":"white"}]'}
data merge entity @s[type=minecraft:slime] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Slime","color":"white"}]'}
data merge entity @s[type=minecraft:spider] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Spider","color":"white"}]'}
data merge entity @s[type=minecraft:stray] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Stray","color":"white"}]'}
data merge entity @s[type=minecraft:vex] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Vex","color":"white"}]'}
data merge entity @s[type=minecraft:vindicator] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Vindicator","color":"white"}]'}
data merge entity @s[type=minecraft:wither_skeleton] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Wither Skeleton","color":"white"}]'}
data merge entity @s[type=minecraft:zombie] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Zombie","color":"white"}]'}
data merge entity @s[type=minecraft:zombie_villager] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Zombie Villager","color":"white"}]'}
data merge entity @s[type=minecraft:pillager] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Pillager","color":"white"}]'}
data merge entity @s[type=minecraft:witch] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Witch","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui] {CustomName:'[{"text":"Advanced","color":"red"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:blaze] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Blaze","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:cave_spider] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Cave Spider","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:creeper] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Creeper","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:drowned] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Drowned","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:elder_guardian] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Elder guardian","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:endermite] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Endermite","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:evoker] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Evoker","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:ghast] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Ghast","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:guardian] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Guardian","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:husk] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Husk","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:illusioner] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Illusioner","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:magma_cube] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Magma cube","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:phantom] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Phantom","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:ravager] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Ravager","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:shulker] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Shulker","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:silverfish] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Silverfish","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:skeleton] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Skeleton","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:slime] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Slime","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:spider] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Spider","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:stray] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Stray","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:vex] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Vex","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:vindicator] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Vindicator","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:wither_skeleton] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Wither Skeleton","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:zombie] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Zombie","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:zombie_villager] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Zombie Villager","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:pillager] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Pillager","color":"white"}]'}
data merge entity @s[tag=!global.ignore.gui,type=minecraft:witch] {CustomName:'[{"text":"Advanced: ","color":"red"},{"text":"Witch","color":"white"}]'}


# make the monsters stronger
Expand Down
Loading

0 comments on commit c9ee580

Please sign in to comment.