You Monster Event

This commit is contained in:
Vos
2025-11-11 00:35:24 -06:00
parent 69ec2bea0b
commit 40b8500fee
@@ -0,0 +1,25 @@
package com.acethewildfire.acesbs.util;
import net.fabricmc.fabric.api.event.player.AttackEntityCallback;
import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.SheepEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Items;
import net.minecraft.text.Text;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;
public class YouMonsterEvent implements AttackEntityCallback {
@Override
public ActionResult interact(PlayerEntity player, World world, Hand hand, Entity entity, @Nullable EntityHitResult hitResult) {
if(entity instanceof SheepEntity && player.getMainHandStack().getItem() == Items.END_ROD && world.isClient()){
player.sendMessage(Text.literal(player.getName().getLiteralString() + ", YOU SICK FUCKER!"));
}
return ActionResult.PASS;
}
}