Class HackableSheep

java.lang.Object
me.desht.pneumaticcraft.common.hacking.entity.HackableSheep
All Implemented Interfaces:
IHackableEntity<net.minecraft.world.entity.animal.Sheep>

public class HackableSheep extends Object implements IHackableEntity<net.minecraft.world.entity.animal.Sheep>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addHackInfo(net.minecraft.world.entity.animal.Sheep entity, List<net.minecraft.network.chat.Component> curInfo, net.minecraft.world.entity.player.Player player)
    Add info that is displayed on the entity tracker panel, describing what the hack would do to the entity.
    void
    addPostHackInfo(net.minecraft.world.entity.animal.Sheep entity, List<net.minecraft.network.chat.Component> curInfo, net.minecraft.world.entity.player.Player player)
    Add info that is displayed on the entity tracker panel, describing what the hack has done to the entity.
    @NotNull Class<net.minecraft.world.entity.animal.Sheep>
    Get the class of the entity this hack should apply to.
    net.minecraft.resources.ResourceLocation
    Should return a unique id to represent this hackable.
    int
    getHackTime(net.minecraft.world.entity.animal.Sheep entity, net.minecraft.world.entity.player.Player player)
    Return the time it takes to hack this entity in ticks.
    void
    onHackFinished(net.minecraft.world.entity.animal.Sheep entity, net.minecraft.world.entity.player.Player player)
    Called when a player successfully hacks an entity; basically getHackTime(Entity) ticks after the hack was initiated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface me.desht.pneumaticcraft.api.pneumatic_armor.hacking.IHackableEntity

    _addHackInfo, _addPostHackInfo, _afterHackTick, _getHackTime, _onHackFinished, afterHackTick, canHack
  • Constructor Details

    • HackableSheep

      public HackableSheep()
  • Method Details

    • getHackableId

      public net.minecraft.resources.ResourceLocation getHackableId()
      Description copied from interface: IHackableEntity
      Should return a unique id to represent this hackable.
      Specified by:
      getHackableId in interface IHackableEntity<net.minecraft.world.entity.animal.Sheep>
      Returns:
      a unique String id
    • getHackableClass

      @NotNull public @NotNull Class<net.minecraft.world.entity.animal.Sheep> 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.
      Specified by:
      getHackableClass in interface IHackableEntity<net.minecraft.world.entity.animal.Sheep>
      Returns:
      the target entity class
    • addHackInfo

      public void addHackInfo(net.minecraft.world.entity.animal.Sheep entity, List<net.minecraft.network.chat.Component> curInfo, net.minecraft.world.entity.player.Player player)
      Description copied from interface: IHackableEntity
      Add info that is displayed on the entity tracker panel, describing what the hack would do to the entity. This is only called if IHackableEntity.canHack(Entity, Player) returned true. Keep this message short; one short phrase is enough.
      Specified by:
      addHackInfo in interface IHackableEntity<net.minecraft.world.entity.animal.Sheep>
      Parameters:
      entity - the potential hack target
      curInfo - a text component list to append info to
      player - the player who is potentially hacking the target entity
    • addPostHackInfo

      public void addPostHackInfo(net.minecraft.world.entity.animal.Sheep entity, List<net.minecraft.network.chat.Component> curInfo, net.minecraft.world.entity.player.Player player)
      Description copied from interface: IHackableEntity
      Add info that is displayed on the entity tracker panel, describing what the hack has done to the entity. This is displayed for a second or so after the hack completes.
      Specified by:
      addPostHackInfo in interface IHackableEntity<net.minecraft.world.entity.animal.Sheep>
      Parameters:
      entity - the hacked target
      curInfo - a text component list to append info to
      player - the player who has hacked the entity
    • getHackTime

      public int getHackTime(net.minecraft.world.entity.animal.Sheep entity, net.minecraft.world.entity.player.Player player)
      Description copied from interface: IHackableEntity
      Return the time it takes to hack this entity in ticks. Most builtin PneumaticCraft hacks use a time of 60 ticks, but for more powerful hacks, a longer required hacking time is suggested.
      Specified by:
      getHackTime in interface IHackableEntity<net.minecraft.world.entity.animal.Sheep>
      Parameters:
      entity - the potential hack target
      player - the player who is potentially hacking the target entity
    • onHackFinished

      public void onHackFinished(net.minecraft.world.entity.animal.Sheep 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.animal.Sheep>
      Parameters:
      entity - the hacked entity
      player - the player who has hacked the entity