Interface IChunkClaimData
- All Known Implementing Classes:
ChunkClaimData
public interface IChunkClaimData
Capability for the colony tag for chunks
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddBuildingClaim(int colonyId, net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk chunk) Add the building claim of a certain building.voidaddColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk) Add a new colony to the chunk.Get the claiming buildings map.intGet the owning colony.Get a list of colonies with a static claim.voidremoveBuildingClaim(int colonyId, net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk chunk) Remove the building claim of a certain building.voidremoveColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk) Remove a colony from the list.voidreset(net.minecraft.world.level.chunk.LevelChunk chunk) Reset the capability.voidsetOwningColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk) Set the owning colony.voidsetStaticColonyClaim(List<Integer> colonies) 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:
id- the id to remove.chunk- the chunk to remove it from.
-
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:
id- the id to add.chunk- the chunk to add it to.
-
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:
id- the id to set.chunk- the chunk to set it for.
-
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
Sets all close colonies.- Parameters:
colonies- the set of colonies.
-
getAllClaimingBuildings
Get the claiming buildings map.- Returns:
- the entire map.
-