Select damage type in procedures.

Published by JRGlitches on
Issue description

So this is an pretty simple request, when you use the damage entity procedure block, there should be a drop down to choose what type of damage that it is dealing.
So, lava damage, cactus damage, void damage ect. this is used to set the death message and immunities

For example

entity.attackEntityFrom(DamageSource.GENERIC, (float) 2);

Changed to something like this for lava damage

entity.attackEntityFrom(DamageSource.LAVA, (float) 2);

 

Here is a list of all damage types in the game as of 1.12.2 (I think)

IN_FIRE

LIGHTNING_BOLT

ON_FIRE

LAVA

HOT_FLOOR

IN_WALL

CRAMMING

DROWN

STARVE

CACTUS

FALL

FLY_INTO_WALL

OUT_OF_WORLD

GENERIC

MAGIC

WITHER

ANVIL

FALLING_BLOCK

DRAGON_BREATH

FIREWORKS

 

Now, there is another thing that I would like to request that is far more difficult, which would be making custom damage types (would probably be a new element)

But I haven't really figured how I would go about doing that so that is all I have to say

It would allow us to add the death messages and maybe a procedure on death if that is possible

 

By the way, there is some other interesting stuff you could probably take a look at in regards to custom damage sources

net.minecraft.util.DamageSource  in the forge src

 

Issue comments

a procedure on death if that is possible

This is already possible. I will consider adding a damage source selector to the deal damage procedure block.

crispy_chips1234: for now this will only be possible with procedures, custom damage sources are out of scope currently.