stinky-mod/src/main/java/xyz/devcomp/mixin/LivingEntityMixin.java.bak

22 lines
959 B
Java

package xyz.devcomp.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
@Mixin(LivingEntity.class)
public class LivingEntityMixin {
@Inject(method = "die(Lnet/minecraft/world/damagesource/DamageSource;)V", at = @At(value = "INVOKE", target = "createWitherRose(Lnet/minecraft/world/entity/LivingEntity;)V"), locals = LocalCapture.CAPTURE_FAILHARD)
private void broadcastCustomDeathMessage(DamageSource source, CallbackInfo ci, Entity entity) {
if (entity instanceof ServerPlayer) {
}
}
}