The Meaning of Life, the Universe, and Everything.
Join Date:
2/11/2017
Posts:
662
Member Details
I have a villager that I set to be invulnerable so that it couldn't be killed by the player. However, I suspect this invulnerability is causing me trouble because I attempt to get the amount of damage the villager has taken in a score. If my theory is correct, the villager is taking no damage because it is invulnerable.
Is there any way I can prevent a mob from being killed without being invulnerable?
Rollback Post to RevisionRollBack
Remember those versions that minecraft pranked us with? Specifically:
Minecraft 2.0
Minecraft 1.VR-Pre1
Snapshot 15w14a
Minecraft 3D
Those are still downloadable! Watch this video for 2.0:
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
The Meaning of Life, the Universe, and Everything.
Join Date:
2/11/2017
Posts:
662
Member Details
It turns out my problem was caused by the fact that the damage_taken statistic only works for player entities and no other types. Are there any other ways to track the damage a specific entity has taken?
Rollback Post to RevisionRollBack
Remember those versions that minecraft pranked us with? Specifically:
Minecraft 2.0
Minecraft 1.VR-Pre1
Snapshot 15w14a
Minecraft 3D
Those are still downloadable! Watch this video for 2.0:
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
The Meaning of Life, the Universe, and Everything.
Join Date:
11/3/2017
Posts:
56
Location:
United States
Minecraft:
AmericanBagel
Discord:
AmericanBagel#2785
PMC:
AmericanBagel
Member Details
I know how to detect if an entity has taken damage. Detect if they have {HurtTime:10}
Alternatively, to gather the exact amount of damage that was taken, you will need two scoreboards. One that stores entities' max health and one that stores their current health. Subtract the max health by the current health and if it isn't 0, it will give you the exact number of damage the mob took. (If you are interested in this and don't understand it, ask me. I don't have much time right now.)
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
I have a villager that I set to be invulnerable so that it couldn't be killed by the player. However, I suspect this invulnerability is causing me trouble because I attempt to get the amount of damage the villager has taken in a score. If my theory is correct, the villager is taking no damage because it is invulnerable.
Is there any way I can prevent a mob from being killed without being invulnerable?
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
Give it an nbt tag of: {AbsorptionAmount:2147483647f}
That gives it over two billion health, making it impossible to kill.
It turns out my problem was caused by the fact that the damage_taken statistic only works for player entities and no other types. Are there any other ways to track the damage a specific entity has taken?
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
I know how to detect if an entity has taken damage. Detect if they have {HurtTime:10}
Alternatively, to gather the exact amount of damage that was taken, you will need two scoreboards. One that stores entities' max health and one that stores their current health. Subtract the max health by the current health and if it isn't 0, it will give you the exact number of damage the mob took. (If you are interested in this and don't understand it, ask me. I don't have much time right now.)
Uh nvm I wanted to answer but I guess it's solved
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).