mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fire EntityInteractSpecific on server side. Closes #9984
This commit is contained in:
2 files changed
+16
No files matched your search
@@ -255,6 +255,13 @@ public final class ForgeHooks {
|
||||
return (MinecraftForge.EVENT_BUS.post(event) ? 0 : event.getAmount());
|
||||
}
|
||||
|
||||
public static InteractionResult onInteractEntityAt(Entity entity, Player player, Vec3 vec3d, InteractionHand hand) {
|
||||
var ret = ForgeEventFactory.onEntityInteractSpecific(player, entity, hand, vec3d);
|
||||
if (ret.isCanceled())
|
||||
return ret.getCancellationResult();
|
||||
return entity.interactAt(player, vec3d, hand);
|
||||
}
|
||||
|
||||
public static int getLootingLevel(Entity target, @Nullable Entity killer, @Nullable DamageSource cause) {
|
||||
int looting = 0;
|
||||
if (killer instanceof LivingEntity living)
|
||||
|
||||
Reference in new issue
Block a user