Started by
Isalick34
on
Topic category: Feature requests and ideas for MCreator
This would be for "Entity Attacked", "Entity is Hurt", and "Living Entity is hit with Tool" Triggers
It should also stack with other procedures that modify the Damage.
- New block: Provided Damage: The amount of health the hit did to the Event Entity
- New block: Provided Damage Type: The type of damage the hit was. Examples: Fire, Drown, Generic, Explosion, etc.
This would come with a new logic = block - New block: Set Damage to [#]: This will modify the amount of damage that will be done to the entity that was hurt:
Example: If {Get armor slot [0] of Entity (Event Target/Entity)} = (minecraft:iron_boots)} Set damage to [(Provided Damage) / 2].
This would divide the damage done to the entity by 2 if they're currently wearing iron boots.
Example 2: If {Provided Damage Type} = (Fire) If {Get armor slot [0] of Entity (Event Target/Entity)} = (minecraft:iron_boots) Set damage to [(Provided Damage) / 2]
This would do the same thing as the first example but only if the damage type was fire.
Here is probably what it would look like:
Edited by Isalick34 on Sat, 04/08/2023 - 18:46
YESSSSSSS please, this would be super helpful
This would be invaluable for me, as I am trying to update the armor system to where certain types of armor resist differing damage types. So like leather is good at resisting fall damage but bad at resisting explosion, and gold is good at resisting magic but not fire.
1. Triggers that do damage already give you amount of this damage in provided dependencies, I think just double click it and it'll give you a block.
2. Damage types are added in 2nd snapshot of mcreator 2023.3:
3. I don't think they want to add any trigger specific blocks since they wouldn't be usable with anything else.
My search through minecraft source code shows that code used in "Entity is Attacked" trigger doesn't allow you to change damage amount. Damage is done after during "Entity is Hurt" trigger and that's when you can change damage amount. However you can do this with a code snippet block and basic programming knowledge, literally one line that works only with "Entity is Hurt":
((LivingHurtEvent) event).setAmount(AMOUNT);
Just replace
AMOUNT
with a number or a variable name which contains damage you want to set.Interesting idea. Guess I'll make a plugin to make it quicker
this is a super awesome thing
trying to make a thing that works similarly to the Manntreads from TF2 but I can't detect how much fall damage the player is taking