Class HackableTameable
java.lang.Object
me.desht.pneumaticcraft.common.hacking.entity.AbstractTameableHack<net.minecraft.world.entity.TamableAnimal>
me.desht.pneumaticcraft.common.hacking.entity.HackableTameable
- All Implemented Interfaces:
IHackableEntity<net.minecraft.world.entity.TamableAnimal>
public class HackableTameable
extends AbstractTameableHack<net.minecraft.world.entity.TamableAnimal>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Class<net.minecraft.world.entity.TamableAnimal>Get the class of the entity this hack should apply to.net.minecraft.resources.ResourceLocationShould return a unique id to represent this hackable.voidonHackFinished(net.minecraft.world.entity.TamableAnimal entity, net.minecraft.world.entity.player.Player player) Called when a player successfully hacks an entity; basicallygetHackTime(Entity)ticks after the hack was initiated.Methods inherited from class me.desht.pneumaticcraft.common.hacking.entity.AbstractTameableHack
addHackInfo, addPostHackInfo, canHack, getHackTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.api.pneumatic_armor.hacking.IHackableEntity
_addHackInfo, _addPostHackInfo, _afterHackTick, _getHackTime, _onHackFinished, afterHackTick
-
Constructor Details
-
HackableTameable
public HackableTameable()
-
-
Method Details
-
getHackableId
public net.minecraft.resources.ResourceLocation getHackableId()Description copied from interface:IHackableEntityShould return a unique id to represent this hackable.- Returns:
- a unique String id
-
getHackableClass
Description copied from interface:IHackableEntityGet the class of the entity this hack should apply to. All subclasses of this class will also be applicable.- Returns:
- the target entity class
-
onHackFinished
public void onHackFinished(net.minecraft.world.entity.TamableAnimal entity, net.minecraft.world.entity.player.Player player) Description copied from interface:IHackableEntityCalled when a player successfully hacks an entity; basicallygetHackTime(Entity)ticks after the hack was initiated.- Parameters:
entity- the hacked entityplayer- the player who has hacked the entity
-