Class HackableGuardian

java.lang.Object
me.desht.pneumaticcraft.api.pneumatic_armor.hacking.AbstractPersistentEntityHack<net.minecraft.world.entity.monster.Guardian>
me.desht.pneumaticcraft.common.hacking.entity.HackableGuardian
All Implemented Interfaces:
IHackableEntity<net.minecraft.world.entity.monster.Guardian>

public class HackableGuardian extends AbstractPersistentEntityHack<net.minecraft.world.entity.monster.Guardian>
  • Constructor Details

    • HackableGuardian

      public HackableGuardian()
  • Method Details

    • getHackableId

      public net.minecraft.resources.ResourceLocation getHackableId()
      Description copied from interface: IHackableEntity
      Should return a unique id to represent this hackable.
      Returns:
      a unique String id
    • getHackableClass

      @NotNull public @NotNull Class<net.minecraft.world.entity.monster.Guardian> getHackableClass()
      Description copied from interface: IHackableEntity
      Get 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.monster.Guardian entity, net.minecraft.world.entity.player.Player player)
      Description copied from interface: IHackableEntity
      Called when a player successfully hacks an entity; basically getHackTime(Entity) ticks after the hack was initiated.
      Specified by:
      onHackFinished in interface IHackableEntity<net.minecraft.world.entity.monster.Guardian>
      Overrides:
      onHackFinished in class AbstractPersistentEntityHack<net.minecraft.world.entity.monster.Guardian>
      Parameters:
      entity - the hacked entity
      player - the player who has hacked the entity
    • afterHackTick

      public boolean afterHackTick(net.minecraft.world.entity.monster.Guardian entity)
      Description copied from interface: IHackableEntity
      Called every tick after the hack completed. Return false for one-shot hacks, or true to keep this hack ticking. The majority of hacks are one-shot; see also AbstractPersistentEntityHack for a class to use for persistent hacks.

      Dead or otherwise removed entities will automatically be removed from the after-hack tick list.

      Specified by:
      afterHackTick in interface IHackableEntity<net.minecraft.world.entity.monster.Guardian>
      Overrides:
      afterHackTick in class AbstractPersistentEntityHack<net.minecraft.world.entity.monster.Guardian>
      Parameters:
      entity - the hacked entity
      Returns:
      true to keep having this method called each tick for the entity, false to stop ticking