Started by
Dr. Zer0
on
Topic category: Help with Minecraft modding (Java Edition)
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
Yes you can in fact! Use this block,
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 will be replaced with the victim in game.
Would the following image be correct to display the death message?
https://drive.google.com/file/d/1XaI7hdUpQezuiWPSZK8Xa3XaSLw6jRFK/view?usp=sharing
Can you please use this button to upload the picture?
yup that should work.
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?
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..
Alright. Thanks for all your help! Have a good rest of your day.
what if you check when the player is damaged and then check if they're standing on a stonecutter
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!
20 ticks are in one second btw
Didn't work