~vpzom/falldeathfix

4c9601b688e40ea1374afad2a6496f7edab5efeb — Colin Reeder 3 months ago f298cb8 master
cleanup
1 files changed, 0 insertions(+), 9 deletions(-)

M src/main/java/click/vpzom/mods/falldeathfix/mixin/DamageTrackerMixin.java
M src/main/java/click/vpzom/mods/falldeathfix/mixin/DamageTrackerMixin.java => src/main/java/click/vpzom/mods/falldeathfix/mixin/DamageTrackerMixin.java +0 -9
@@ 1,7 1,6 @@
package click.vpzom.mods.falldeathfix.mixin;

import click.vpzom.mods.falldeathfix.EntityDuck;
import com.google.common.collect.Lists;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageRecord;


@@ 16,7 15,6 @@ import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import java.util.List;



@@ 53,22 51,15 @@ public class DamageTrackerMixin {

    @Overwrite
    public Text getDeathMessage() {
        System.out.println("getDeathMessage");

        DamageRecord lastDamage = getMostRecentDamage();

        if (lastDamage == null) {
            return new TranslatableText("death.attack.generic", entity.getDisplayName());
        }

        System.out.println("lastDamage = " + lastDamage.getDamageSource());
        System.out.println("damage record count = " + recentDamage.size());

        if (lastDamage.getDamageSource() == DamageSource.FALL) {
            LivingEntity biggestAttacker = getBiggestAttacker();

            System.out.println("biggestAttacker = " + biggestAttacker);

            if (biggestAttacker != null) {
                Text attackerName = biggestAttacker.getDisplayName();
                ItemStack itemStack = biggestAttacker.getMainHandStack();