• check_circle Functions
  • 5,379 views, 5 today
  • 210 downloads, 0 today
  • 10
  • 13
PIGUP's Avatar PIGUP
Level 32 : Artisan Nerd
10
☠ Death Punishments

This data pack punishes players if they die by degrading attributes (health, speed, attack damage/speed, luck) of players

Useful, if your server/world has keepInventory activated and you don't want your players to exploit this gamerule.

(ex. kill yourself in minecraft on purpose and respawn in your base instantly, without traveling thousands of blocks. Normally without keepInventory activated you wouldn't do it, because you don't want to lose all of your stuff)

If you die, you will get 1 Death and every 5 min or 300 secs or 6000 ticks it removes 1 Death
The more Deaths you have, the worse it will get!

Have fun :)

All Punishments:
dth_deaths matches <number> = ammount of deaths
minecraft.generic.<modifier> = type (luck, attack speed, movement speed, attack damage, max health)


-> punishments.mcfunction

# Punishments

# generic.luck
execute at @a if score @p dth_deaths matches ..0 run attribute @p minecraft:generic.luck base set 0.0
execute at @a if score @p dth_deaths matches 1 run attribute @p minecraft:generic.luck base set -10.0
execute at @a if score @p dth_deaths matches 2 run attribute @p minecraft:generic.luck base set -20.0
execute at @a if score @p dth_deaths matches 3 run attribute @p minecraft:generic.luck base set -30.0
execute at @a if score @p dth_deaths matches 4 run attribute @p minecraft:generic.luck base set -40.0
execute at @a if score @p dth_deaths matches 5 run attribute @p minecraft:generic.luck base set -50.0
execute at @a if score @p dth_deaths matches 6 run attribute @p minecraft:generic.luck base set -60.0
execute at @a if score @p dth_deaths matches 7 run attribute @p minecraft:generic.luck base set -70.0
execute at @a if score @p dth_deaths matches 8 run attribute @p minecraft:generic.luck base set -80.0
execute at @a if score @p dth_deaths matches 9 run attribute @p minecraft:generic.luck base set -90.0
execute at @a if score @p dth_deaths matches 10 run attribute @p minecraft:generic.luck base set -100.0
execute at @a if score @p dth_deaths matches 11..20 run attribute @p minecraft:generic.luck base set -200.0
execute at @a if score @p dth_deaths matches 21..30 run attribute @p minecraft:generic.luck base set -300.0
execute at @a if score @p dth_deaths matches 31..40 run attribute @p minecraft:generic.luck base set -400.0
execute at @a if score @p dth_deaths matches 41..50 run attribute @p minecraft:generic.luck base set -500.0
execute at @a if score @p dth_deaths matches 51..60 run attribute @p minecraft:generic.luck base set -600.0
execute at @a if score @p dth_deaths matches 61..70 run attribute @p minecraft:generic.luck base set -700.0
execute at @a if score @p dth_deaths matches 71..80 run attribute @p minecraft:generic.luck base set -800.0
execute at @a if score @p dth_deaths matches 81..90 run attribute @p minecraft:generic.luck base set -900.0
execute at @a if score @p dth_deaths matches 91..100 run attribute @p minecraft:generic.luck base set -1000.0
execute at @a if score @p dth_deaths matches 101.. run attribute @p minecraft:generic.luck base set -1024.0

# generic.attack_speed
execute at @a if score @p dth_deaths matches ..0 run attribute @p minecraft:generic.attack_speed base set 4.0
execute at @a if score @p dth_deaths matches 1 run attribute @p minecraft:generic.attack_speed base set 3.9
execute at @a if score @p dth_deaths matches 2 run attribute @p minecraft:generic.attack_speed base set 3.8
execute at @a if score @p dth_deaths matches 3 run attribute @p minecraft:generic.attack_speed base set 3.7
execute at @a if score @p dth_deaths matches 4 run attribute @p minecraft:generic.attack_speed base set 3.6
execute at @a if score @p dth_deaths matches 5 run attribute @p minecraft:generic.attack_speed base set 3.5
execute at @a if score @p dth_deaths matches 6 run attribute @p minecraft:generic.attack_speed base set 3.4
execute at @a if score @p dth_deaths matches 7 run attribute @p minecraft:generic.attack_speed base set 3.3
execute at @a if score @p dth_deaths matches 8 run attribute @p minecraft:generic.attack_speed base set 3.2
execute at @a if score @p dth_deaths matches 9 run attribute @p minecraft:generic.attack_speed base set 3.1
execute at @a if score @p dth_deaths matches 10.. run attribute @p minecraft:generic.attack_speed base set 3.0

# generic.movement_speed
execute at @a if score @p dth_deaths matches ..0 run attribute @p minecraft:generic.movement_speed base set 0.10000000149011612
execute at @a if score @p dth_deaths matches 1 run attribute @p minecraft:generic.movement_speed base set 0.0975
execute at @a if score @p dth_deaths matches 2 run attribute @p minecraft:generic.movement_speed base set 0.0950
execute at @a if score @p dth_deaths matches 3 run attribute @p minecraft:generic.movement_speed base set 0.0925
execute at @a if score @p dth_deaths matches 4 run attribute @p minecraft:generic.movement_speed base set 0.0900
execute at @a if score @p dth_deaths matches 5 run attribute @p minecraft:generic.movement_speed base set 0.0875
execute at @a if score @p dth_deaths matches 6 run attribute @p minecraft:generic.movement_speed base set 0.0850
execute at @a if score @p dth_deaths matches 7 run attribute @p minecraft:generic.movement_speed base set 0.0825
execute at @a if score @p dth_deaths matches 8 run attribute @p minecraft:generic.movement_speed base set 0.0800
execute at @a if score @p dth_deaths matches 9 run attribute @p minecraft:generic.movement_speed base set 0.0775
execute at @a if score @p dth_deaths matches 10.. run attribute @p minecraft:generic.movement_speed base set 0.0750
execute at @a if score @p dth_deaths matches 11..20 run attribute @p minecraft:generic.movement_speed base set 0.0500
execute at @a if score @p dth_deaths matches 21.. run attribute @p minecraft:generic.movement_speed base set 0.0250

# generic.attack_damage
execute at @a if score @p dth_deaths matches ..0 run attribute @p minecraft:generic.attack_damage base set 1.0
execute at @a if score @p dth_deaths matches 1 run attribute @p minecraft:generic.attack_damage base set 1.0
execute at @a if score @p dth_deaths matches 2 run attribute @p minecraft:generic.attack_damage base set 0.9
execute at @a if score @p dth_deaths matches 3 run attribute @p minecraft:generic.attack_damage base set 0.8
execute at @a if score @p dth_deaths matches 4 run attribute @p minecraft:generic.attack_damage base set 0.7
execute at @a if score @p dth_deaths matches 5 run attribute @p minecraft:generic.attack_damage base set 0.6
execute at @a if score @p dth_deaths matches 6 run attribute @p minecraft:generic.attack_damage base set 0.5
execute at @a if score @p dth_deaths matches 7 run attribute @p minecraft:generic.attack_damage base set 0.4
execute at @a if score @p dth_deaths matches 8 run attribute @p minecraft:generic.attack_damage base set 0.3
execute at @a if score @p dth_deaths matches 9 run attribute @p minecraft:generic.attack_damage base set 0.2
execute at @a if score @p dth_deaths matches 10.. run attribute @p minecraft:generic.attack_damage base set 0.1

# generic.max_health
execute at @a if score @p dth_deaths matches ..0 run attribute @p minecraft:generic.max_health base set 20.0
execute at @a if score @p dth_deaths matches 1 run attribute @p minecraft:generic.max_health base set 19.0
execute at @a if score @p dth_deaths matches 2 run attribute @p minecraft:generic.max_health base set 18.0
execute at @a if score @p dth_deaths matches 3 run attribute @p minecraft:generic.max_health base set 17.0
execute at @a if score @p dth_deaths matches 4 run attribute @p minecraft:generic.max_health base set 16.0
execute at @a if score @p dth_deaths matches 5 run attribute @p minecraft:generic.max_health base set 15.0
execute at @a if score @p dth_deaths matches 6 run attribute @p minecraft:generic.max_health base set 14.0
execute at @a if score @p dth_deaths matches 7 run attribute @p minecraft:generic.max_health base set 13.0
execute at @a if score @p dth_deaths matches 8 run attribute @p minecraft:generic.max_health base set 12.0
execute at @a if score @p dth_deaths matches 9 run attribute @p minecraft:generic.max_health base set 11.0
execute at @a if score @p dth_deaths matches 10.. run attribute @p minecraft:generic.max_health base set 10.0
CompatibilityMinecraft 1.16
Tags

1 Update Logs

1.0.0 : by PIGUP 06/27/2020 3:15:05 pmJun 27th, 2020

Made the Death Punishments Datapack

(Improvements soon...)

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome