Interface IColonyTagCapability

All Known Implementing Classes:
IColonyTagCapability.Impl

public interface IColonyTagCapability
Capability for the colony tag for chunks
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    The implementation of the colonyTagCapability.
    static class 
    The storage class of the capability.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addBuildingClaim(int colonyId, net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk chunk)
    Add the building claim of a certain building.
    void
    addColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk)
    Add a new colony to the chunk.
    @NotNull Map<Integer,Set<net.minecraft.core.BlockPos>>
    Get the claiming buildings map.
    int
    Get the owning colony.
    @NotNull List<Integer>
    Get a list of colonies with a static claim.
    void
    readFromNBT(net.minecraft.nbt.CompoundTag compound)
     
    void
    removeBuildingClaim(int colonyId, net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk chunk)
    Remove the building claim of a certain building.
    void
    removeColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk)
    Remove a colony from the list.
    void
    reset(net.minecraft.world.level.chunk.LevelChunk chunk)
    Reset the capability.
    void
    setOwningColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk)
    Set the owning colony.
    void
    Sets all close colonies.
  • Method Details

    • removeColony

      void removeColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk)
      Remove a colony from the list. Only relevant in non dynamic claiming.
      Parameters:
      chunk - the chunk to remove it from.
      id - the id to remove.
    • addColony

      void addColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk)
      Add a new colony to the chunk. Only relevant in non dynamic claiming.
      Parameters:
      chunk - the chunk to add it to.
      id - the id to add.
    • getStaticClaimColonies

      @NotNull @NotNull List<Integer> getStaticClaimColonies()
      Get a list of colonies with a static claim.
      Returns:
      a list of their ids.
    • setOwningColony

      void setOwningColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk)
      Set the owning colony.
      Parameters:
      chunk - the chunk to set it for.
      id - the id to set.
    • getOwningColony

      int getOwningColony()
      Get the owning colony.
      Returns:
      the id of it.
    • reset

      void reset(net.minecraft.world.level.chunk.LevelChunk chunk)
      Reset the capability.
      Parameters:
      chunk - the chunk to reset.
    • addBuildingClaim

      void addBuildingClaim(int colonyId, net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk chunk)
      Add the building claim of a certain building.
      Parameters:
      colonyId - the colony id.
      pos - the position of the building.
      chunk - the chunk to add the claim for.
    • removeBuildingClaim

      void removeBuildingClaim(int colonyId, net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk chunk)
      Remove the building claim of a certain building.
      Parameters:
      colonyId - the colony id.
      pos - the position of the building.
      chunk - the chunk to remove it from.
    • setStaticColonyClaim

      void setStaticColonyClaim(List<Integer> colonies)
      Sets all close colonies.
      Parameters:
      colonies - the set of colonies.
    • getAllClaimingBuildings

      @NotNull @NotNull Map<Integer,Set<net.minecraft.core.BlockPos>> getAllClaimingBuildings()
      Get the claiming buildings map.
      Returns:
      the entire map.
    • readFromNBT

      void readFromNBT(net.minecraft.nbt.CompoundTag compound)