Mining Dimensions [FABRIC]

Mining Dimensions [FABRIC]

491k Downloads

[1.17.1] Change: Apply thorns damage instead of generic damage

James103 opened this issue ยท 3 comments

commented

https://github.com/kwpugh/mining_Dimensions-1.17/blob/c181b6fd420e1c7e7a1468de7194c9c79c03adee/src/main/java/com/kwpugh/mining_dims/mixin/ZombieEntityMixin.java#L61
https://github.com/kwpugh/mining_Dimensions-1.17/blob/c181b6fd420e1c7e7a1468de7194c9c79c03adee/src/main/java/com/kwpugh/mining_dims/mixin/PiglinBruteEntityMixin.java#L56
Based on the above code samples, the damage applied is generic damage, which produces the death message "Player died [because of Zombie]" instead of what I think would be the correct death message of "Player was killed trying to hurt Zombie".

commented

When I try this, I get "... was killed by Zombie" and "...was slain by Piglin brute".

commented

Thorns is not one of the defined DamageSources in vanilla. Thorns is actually a method, that also sets it as magic use, which could create unintended results for my purposes.

These are the vanilla constants I work with:
Screen Shot 2021-10-09 at 12 52 59 PM

After a bunch of testing, I only ever get the [player name] was killed by [mob name], which is what I would want.

commented

I tried to fix this myself, but can't get the death message to the way I want. Closing this issue for now until a proper solution is found.