mirror of
https://github.com/CompeyDev/stinky-mod.git
synced 2025-03-13 14:34:30 +00:00
22 lines
959 B
Java
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) {
|
|
|
|
}
|
|
}
|
|
}
|