In my mod, I need to make a special kind of damage.
I put the value of it into a custom DamageSource class that extends the original one, then I applied it on entities with LivingHurtEvent in an event handler.
In 1.19.3, the constructor of the DamageSource was simple. All you needed was a simple String. It worked pretty well.
But in 1.19.4, Mojang added something like tons of DamageTypes and Holders. I checked the source code of net.minecraft.world.damagesource.DamageSources, but I cannot understand it at all.
So my question is: How can I create custom DamageSources in 1.19.4?
(I'm not a native English speaker, and I'm new to forge modding and this forum. If there are any mistakes, please correct me!)