Topic category: User side tutorials
This is a tutorial about how to create damage sources
Download:
https://mcreator.net/plugin/93380/plugin-damage-source-plugin-forge-1192
First, create a new variable for damage sources
Next, set a damage type. You can also set a direct attacker and an indirect attacker
If necessary, add tags to the damage source
Lastly, deal damage to entity
Create a new damage type:
If you use a new damage type, You will need to define a ID (Here, "fall_apart")
Next, You will need to define death messages. First, add localization entries from your workspace, and input a key like the following. You will need to replace "fall_apart" at the back of "death.attack." with a your damage ID
If you add no anything at the key end, you can use 1 argument "%1$s" for your death messages. It will be the name of the killed entity
If you add ".player" at the key end, you can use 2 arguments, which are "%1$s" and "%2$s". "%1$s" is same as the above, "%2$s" will be a name of the attacker
If you add ".player.item" at the key end, you can use 3 arguments, which are "%1$s", "%2$s" and "%3$s". "%1$s" and "%2$s" are same as the above, "%3$s" will be a name of holding item of the attacker. Note that the message will display only if the item has a custom name
Here is examples of localized texts