Class JobFisherman

All Implemented Interfaces:
IJob<EntityAIWorkFisherman>, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class JobFisherman extends AbstractJob<EntityAIWorkFisherman,JobFisherman>
The fisherman's job class. implements some useful things for him.
  • Constructor Details

    • JobFisherman

      public JobFisherman(ICitizenData entity)
      Initializes the job class.
      Parameters:
      entity - The entity which will use this job class.
  • Method Details

    • getModel

      @NotNull public @NotNull net.minecraft.resources.ResourceLocation getModel()
      Get the RenderBipedCitizen.Model to use when the Citizen performs this job role.
      Specified by:
      getModel in interface IJob<EntityAIWorkFisherman>
      Overrides:
      getModel in class AbstractJob<EntityAIWorkFisherman,JobFisherman>
      Returns:
      Model of the citizen.
    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT()
      Specified by:
      serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Overrides:
      serializeNBT in class AbstractJob<EntityAIWorkFisherman,JobFisherman>
    • deserializeNBT

      public void deserializeNBT(net.minecraft.nbt.CompoundTag compound)
      Specified by:
      deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Overrides:
      deserializeNBT in class AbstractJob<EntityAIWorkFisherman,JobFisherman>
    • generateAI

      @NotNull public @NotNull EntityAIWorkFisherman generateAI()
      Generate your AI class to register.
      Returns:
      your personal AI instance.
    • triggerDeathAchievement

      public void triggerDeathAchievement(net.minecraft.world.damagesource.DamageSource source, AbstractEntityCitizen citizen)
      Description copied from interface: IJob
      Override this to implement Job specific death achievements.
      Specified by:
      triggerDeathAchievement in interface IJob<EntityAIWorkFisherman>
      Overrides:
      triggerDeathAchievement in class AbstractJob<EntityAIWorkFisherman,JobFisherman>
      Parameters:
      source - of the death
      citizen - which just died
    • getWater

      public Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> getWater()
      Getter for current water.
      Returns:
      Location of the current water block.
    • setWater

      public void setWater(Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> water)
      Setter for current water.
      Parameters:
      water - New location for the current water block.
    • getPonds

      @NotNull public @NotNull List<Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos>> getPonds()
      Returns a safe copy of all current ponds.
      Returns:
      a list of coordinates.
    • addToPonds

      public void addToPonds(net.minecraft.core.BlockPos pond, net.minecraft.core.BlockPos parent)
      Add one pond to our list of ponds.
      Parameters:
      pond - the pond to add.
      parent - the parent position.
    • removeFromPonds

      public void removeFromPonds(Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> pond)
      remove one pond from the ponds list.
      Parameters:
      pond - the coordinate pair matching one pond.
    • onStackPickUp

      public boolean onStackPickUp(@NotNull @NotNull net.minecraft.world.item.ItemStack pickedUpStack)
      Records in hut statistics what the Fisherperson has collected.
      Specified by:
      onStackPickUp in interface IJob<EntityAIWorkFisherman>
      Overrides:
      onStackPickUp in class AbstractJob<EntityAIWorkFisherman,JobFisherman>
      Parameters:
      pickedUpStack - The stack that is being picked up.
      Returns:
      true when the stack has been used to resolve a request, false when not.