Class IColonyTagCapability.Impl

java.lang.Object
com.minecolonies.api.colony.IColonyTagCapability.Impl
All Implemented Interfaces:
IColonyTagCapability
Enclosing interface:
IColonyTagCapability

public static class IColonyTagCapability.Impl extends Object implements IColonyTagCapability
The implementation of the colonyTagCapability.
  • Constructor Details

    • Impl

      public Impl()
  • Method Details

    • addColony

      public void addColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk)
      Description copied from interface: IColonyTagCapability
      Add a new colony to the chunk. Only relevant in non dynamic claiming.
      Specified by:
      addColony in interface IColonyTagCapability
      Parameters:
      id - the id to add.
      chunk - the chunk to add it to.
    • removeColony

      public void removeColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk)
      Description copied from interface: IColonyTagCapability
      Remove a colony from the list. Only relevant in non dynamic claiming.
      Specified by:
      removeColony in interface IColonyTagCapability
      Parameters:
      id - the id to remove.
      chunk - the chunk to remove it from.
    • setStaticColonyClaim

      public void setStaticColonyClaim(List<Integer> colonies)
      Description copied from interface: IColonyTagCapability
      Sets all close colonies.
      Specified by:
      setStaticColonyClaim in interface IColonyTagCapability
      Parameters:
      colonies - the set of colonies.
    • reset

      public void reset(net.minecraft.world.level.chunk.LevelChunk chunk)
      Description copied from interface: IColonyTagCapability
      Reset the capability.
      Specified by:
      reset in interface IColonyTagCapability
      Parameters:
      chunk - the chunk to reset.
    • addBuildingClaim

      public void addBuildingClaim(int colonyId, net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk chunk)
      Description copied from interface: IColonyTagCapability
      Add the building claim of a certain building.
      Specified by:
      addBuildingClaim in interface IColonyTagCapability
      Parameters:
      colonyId - the colony id.
      pos - the position of the building.
      chunk - the chunk to add the claim for.
    • removeBuildingClaim

      public void removeBuildingClaim(int colonyId, net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk chunk)
      Description copied from interface: IColonyTagCapability
      Remove the building claim of a certain building.
      Specified by:
      removeBuildingClaim in interface IColonyTagCapability
      Parameters:
      colonyId - the colony id.
      pos - the position of the building.
      chunk - the chunk to remove it from.
    • setOwningColony

      public void setOwningColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk)
      Description copied from interface: IColonyTagCapability
      Set the owning colony.
      Specified by:
      setOwningColony in interface IColonyTagCapability
      Parameters:
      id - the id to set.
      chunk - the chunk to set it for.
    • getOwningColony

      public int getOwningColony()
      Description copied from interface: IColonyTagCapability
      Get the owning colony.
      Specified by:
      getOwningColony in interface IColonyTagCapability
      Returns:
      the id of it.
    • getStaticClaimColonies

      @NotNull public @NotNull List<Integer> getStaticClaimColonies()
      Description copied from interface: IColonyTagCapability
      Get a list of colonies with a static claim.
      Specified by:
      getStaticClaimColonies in interface IColonyTagCapability
      Returns:
      a list of their ids.
    • getAllClaimingBuildings

      @NotNull public @NotNull Map<Integer,Set<net.minecraft.core.BlockPos>> getAllClaimingBuildings()
      Description copied from interface: IColonyTagCapability
      Get the claiming buildings map.
      Specified by:
      getAllClaimingBuildings in interface IColonyTagCapability
      Returns:
      the entire map.
    • readFromNBT

      public void readFromNBT(net.minecraft.nbt.CompoundTag compound)
      Specified by:
      readFromNBT in interface IColonyTagCapability