Package com.minecolonies.api.colony
Class IColonyTagCapability.Impl
java.lang.Object
com.minecolonies.api.colony.IColonyTagCapability.Impl
- All Implemented Interfaces:
IColonyTagCapability
- Enclosing interface:
- IColonyTagCapability
The implementation of the colonyTagCapability.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.minecolonies.api.colony.IColonyTagCapability
IColonyTagCapability.Impl, IColonyTagCapability.Storage -
Constructor Summary
Constructors -
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.voidreadFromNBT(net.minecraft.nbt.CompoundTag compound) 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.
-
Constructor Details
-
Impl
public Impl()
-
-
Method Details
-
addColony
public void addColony(int id, net.minecraft.world.level.chunk.LevelChunk chunk) Description copied from interface:IColonyTagCapabilityAdd a new colony to the chunk. Only relevant in non dynamic claiming.- Specified by:
addColonyin interfaceIColonyTagCapability- 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:IColonyTagCapabilityRemove a colony from the list. Only relevant in non dynamic claiming.- Specified by:
removeColonyin interfaceIColonyTagCapability- Parameters:
id- the id to remove.chunk- the chunk to remove it from.
-
setStaticColonyClaim
Description copied from interface:IColonyTagCapabilitySets all close colonies.- Specified by:
setStaticColonyClaimin interfaceIColonyTagCapability- Parameters:
colonies- the set of colonies.
-
reset
public void reset(net.minecraft.world.level.chunk.LevelChunk chunk) Description copied from interface:IColonyTagCapabilityReset the capability.- Specified by:
resetin interfaceIColonyTagCapability- 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:IColonyTagCapabilityAdd the building claim of a certain building.- Specified by:
addBuildingClaimin interfaceIColonyTagCapability- 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:IColonyTagCapabilityRemove the building claim of a certain building.- Specified by:
removeBuildingClaimin interfaceIColonyTagCapability- 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:IColonyTagCapabilitySet the owning colony.- Specified by:
setOwningColonyin interfaceIColonyTagCapability- Parameters:
id- the id to set.chunk- the chunk to set it for.
-
getOwningColony
public int getOwningColony()Description copied from interface:IColonyTagCapabilityGet the owning colony.- Specified by:
getOwningColonyin interfaceIColonyTagCapability- Returns:
- the id of it.
-
getStaticClaimColonies
Description copied from interface:IColonyTagCapabilityGet a list of colonies with a static claim.- Specified by:
getStaticClaimColoniesin interfaceIColonyTagCapability- Returns:
- a list of their ids.
-
getAllClaimingBuildings
Description copied from interface:IColonyTagCapabilityGet the claiming buildings map.- Specified by:
getAllClaimingBuildingsin interfaceIColonyTagCapability- Returns:
- the entire map.
-
readFromNBT
public void readFromNBT(net.minecraft.nbt.CompoundTag compound) - Specified by:
readFromNBTin interfaceIColonyTagCapability
-