Package net.xun.armory.api.item.tools
Class AbstractHitEffectCustomizer
java.lang.Object
net.xun.armory.api.item.tools.AbstractHitEffectCustomizer
- All Implemented Interfaces:
ToolCustomizer
- Since:
- 2.1.0
-
Field Summary
Fields inherited from interface net.xun.armory.api.item.tools.ToolCustomizer
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidonHit(ToolPieceType piece, net.minecraft.world.entity.LivingEntity target, net.minecraft.world.entity.LivingEntity attacker) Handles the hit effect for a specific tool type on the target entity.final voidtriggerHit(ToolPieceType piece, net.minecraft.world.entity.LivingEntity target, net.minecraft.world.entity.LivingEntity attacker) Invoked internally by the platform combat integration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.xun.armory.api.item.tools.ToolCustomizer
create
-
Constructor Details
-
AbstractHitEffectCustomizer
public AbstractHitEffectCustomizer()
-
-
Method Details
-
onHit
protected abstract void onHit(ToolPieceType piece, net.minecraft.world.entity.LivingEntity target, net.minecraft.world.entity.LivingEntity attacker) Handles the hit effect for a specific tool type on the target entity.This method is called only on the server side and only when the attack successfully damages the target. Subclasses must implement this method to define the actual effect, such as applying potion effects, dealing additional damage, or playing sounds.
- Parameters:
piece- the type of tool that caused the hittarget- the entity that was hitattacker- the entity that performed the attack
-
triggerHit
public final void triggerHit(ToolPieceType piece, net.minecraft.world.entity.LivingEntity target, net.minecraft.world.entity.LivingEntity attacker) Invoked internally by the platform combat integration.
-