Can you make custom damage types?

Started by Dr. Zer0 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you make custom damage types?

I'm thinking of implementing the idea of being dealt damage when touching a block; however, I would like, if possible, for a certain damage type to be used instead of "GENERIC", "OUT_OF_WORLD", etc. With this, I hope it would make a custom death message for that damage type. And, if not, I would appreciate to know how.

Thanks in advance,
Dr. Zero

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes you can in fact! Use…
Fri, 02/11/2022 - 20:03

Yes you can in fact! Use this block,

sdfgfds

and then add it to your localizations with the key death.attack.custom (or whatever you want to call it) and the value,

%1$s died.

%1$s will be replaced with the victim in game.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you please use this…
Fri, 02/11/2022 - 20:36

gfrdgfdgCan you please use this button to upload the picture?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yup that should work.
Fri, 02/11/2022 - 21:06

yup that should work.

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also, sorry to add in a…
Fri, 02/11/2022 - 21:07

Also, sorry to add in a different comment, but I was unsure how to implement the actual damage. I want the player to be damaged every second they stand on a stone cutter. I know that you can check if the player's x, y, and z equal a stonecutter to output damage, but I need it to check the player's x, y, and z every player tick update and deal damage every second. Would you mind explaining a possible work-around?

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm sorry but that'd require…
Fri, 02/11/2022 - 21:20

I'm sorry but that'd require modification of minecraft code which is currently not possible with mcreator. But yeah you can just check every tick, but of course like you've probably realized that's not exactly a good idea..

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright. Thanks for all your…
Fri, 02/11/2022 - 21:24

Alright. Thanks for all your help! Have a good rest of your day.

Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what if you check when the…
Sun, 06/05/2022 - 21:42

what if you check when the player is damaged and then check if they're standing on a stonecutter

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know! make a variable that…
Sun, 07/02/2023 - 22:49

I know! make a variable that starts off at 0 then when you get damaged set it to 1 and make it so where thew variable is player persistent and the damage only triggers when it is 0 and once it is equal to 1 use the "wait __ ticks on server side" block and then make the variable set to 0 after the timer is over!

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
20 ticks are in one second…
Sun, 07/02/2023 - 22:50

20 ticks are in one second btw