Package com.minecolonies.core.colony
Class ColonyView
java.lang.Object
com.minecolonies.core.colony.ColonyView
- All Implemented Interfaces:
IColony,IColonyView
Client side representation of the Colony.
-
Field Summary
Fields inherited from interface com.minecolonies.api.colony.IColony
CLOSE_COLONY_CAP -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFreeBlock(@NotNull net.minecraft.world.level.block.Block block) Add a new free to interact block.voidaddFreePosition(@NotNull net.minecraft.core.BlockPos pos) Add a new free to interact position.voidaddGuardToAttackers(AbstractEntityCitizen entityCitizen, net.minecraft.world.entity.player.Player followPlayer) voidaddLoadedChunk(long chunkPos, net.minecraft.world.level.chunk.LevelChunk chunk) Adds a loaded chunk to the colony listvoidUpdate a players permissions.voidaddVisitingPlayer(net.minecraft.world.entity.player.Player player) Add a visiting player.voidaddWayPoint(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState newWayPointState) booleanbooleanCalled to check if the colony can be deleted by an automatic cleanup.static @NotNull ColonyViewcreateFromNetwork(int id) Create a ColonyView given a UUID and CompoundTag.getAnimal(int animalId) Gets the data view for an animalGets the animal manager of the colony view.net.minecraft.core.BlockPosReturns the position of the colony.getCitizen(int id) Gets the CitizenDataView for a citizen id.intReturns the maximum amount of citizen in the colony.intReturns the maximum amount of citizen slots in the colony considering beds and guard towersGet the matching citizen name file of the colony .Getter for the citizens map.Client side building manager.net.minecraft.nbt.ListTagGetter for the pattern list of the colony flagnet.minecraft.nbt.CompoundTagGet the connection manager of the colony.intgetDay()Get the current day of the colony.net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>Returns the dimension ID of the view.longgetDistanceSquared(@NotNull net.minecraft.core.BlockPos pos) Returns the squared (x, z) distance to the center.Get the event description manager of the colony.Get the event manager of the colony.List<net.minecraft.world.level.block.Block>Get a copy of the freeBlocks list.List<net.minecraft.core.BlockPos>Get a copy of the freePositions list.intgetID()Returns the ID of the view.@NotNull List<net.minecraft.world.entity.player.Player>Returns a set of players receiving important messages for the colony.intGet the last contact of a player to the colony in hours.List<net.minecraft.core.BlockPos>Get a list of all barb spawn positions in the colony view.intReturns the amount of loaded chunkslongGet the last time mercenaries were used.@NotNull List<net.minecraft.world.entity.player.Player>Get the players in the colony which should receive the message.getName()Returns the name of the colony.Get a list of all available citizen name style options.Get the colony name style.doubleGetter for the overall happiness.The colony networking packaging manager.@NotNull IPermissionsReturns the permissions of the colony.@NotNull Map<UUID,ColonyPlayer> Returns a map of players in the colony.Get the quest manager of the colony.Get the reproduction manager of the colony.@Nullable IRequestergetRequesterBuildingForPosition(@NotNull net.minecraft.core.BlockPos pos) Method used to get aIRequesterfrom a given Position.@NotNull IRequestManagerGet the currentIRequestManagerfor this Colony.Get the research manager.Get the colony level settings module.getState()Returns the colonies current state.Get the statistics manager of the colony.Get the style of the colony.net.minecraft.ChatFormattingGetter for the team colony color.Get the colony style.Get the set of chunk positions which the colony is loading through ticketsGet the travelling manager of the colony.getVisitor(int citizenId) Gets the data view for a visitorGets the visitor managerMap<net.minecraft.core.BlockPos,net.minecraft.world.level.block.state.BlockState> @NotNull IWorkManagergetWorkOrder(int id) Getter for a single workorder.Getter for the workOrders.net.minecraft.world.level.LevelgetWorld()Method to get the World this colony is in.voidhandleColonyViewAnimalMessage(net.minecraft.network.FriendlyByteBuf animalBuf, boolean refresh) Handles animal view messages@Nullable IMessagehandleColonyViewCitizensMessage(int id, net.minecraft.network.FriendlyByteBuf buf) Update a ColonyView's citizens given a network data ColonyView update packet.@Nullable IMessagehandleColonyViewMessage(@NotNull net.minecraft.network.FriendlyByteBuf buf, @NotNull net.minecraft.world.level.Level world, boolean isNewSubscription) Populate a ColonyView from the network data.@Nullable IMessagehandleColonyViewRemoveCitizenMessage(int citizen) Remove a citizen from the ColonyView.@Nullable IMessagehandleColonyViewRemoveWorkOrderMessage(int workOrderId) Remove a workOrder from the ColonyView.voidhandleColonyViewResearchManagerUpdate(net.minecraft.nbt.CompoundTag compoundTag) Handle the colony view research manager updating.voidhandleColonyViewVisitorMessage(net.minecraft.network.FriendlyByteBuf visitorBuf, boolean refresh) Handles visitor view messages@Nullable IMessagehandleColonyViewWorkOrderMessage(net.minecraft.network.FriendlyByteBuf buf) Update a ColonyView's workOrders given a network data ColonyView update packet.@Nullable IMessagehandlePermissionsViewMessage(@NotNull net.minecraft.network.FriendlyByteBuf buf) Update permissions.booleanisActive()Is the colony active currently.booleanbooleanisCoordInColony(@NotNull net.minecraft.world.level.Level w, @NotNull net.minecraft.core.BlockPos pos) Determine if a given chunk coordinate is considered to be within the colony's bounds.booleanisDay()Whether it is day for the colonybooleanIf currently being raided.booleanisRemote()Check if the colony is on the server or client.booleanbooleanisValidAttackingPlayer(net.minecraft.world.entity.player.Player entity) voidCalled to mark this colony dirty, and in need of syncing / saving.voidonServerTick(net.minecraftforge.event.TickEvent.ServerTickEvent event) voidonWorldLoad(@NotNull net.minecraft.world.level.Level w) voidonWorldTick(net.minecraftforge.event.TickEvent.LevelTickEvent event) voidonWorldUnload(@NotNull net.minecraft.world.level.Level w) voidread(net.minecraft.nbt.CompoundTag compound) voidremoveFreeBlock(@NotNull net.minecraft.world.level.block.Block block) Remove a free to interact block.voidremoveFreePosition(@NotNull net.minecraft.core.BlockPos pos) Remove a free to interact position.voidremoveLoadedChunk(long chunkPos) Adds a chunk from the colony listvoidremovePlayer(UUID player) Remove player from colony permissions.voidremoveVisitingPlayer(net.minecraft.world.entity.player.Player player) Remove a visiting player.static voidserializeNetworkData(@NotNull Colony colony, @NotNull net.minecraft.network.FriendlyByteBuf buf, boolean hasNewSubscribers) Populate an NBT compound for a network packet representing a ColonyView.voidsetCanBeAutoDeleted(boolean canBeDeleted) voidsetColonyColor(net.minecraft.ChatFormatting color) voidsetColonyFlag(net.minecraft.nbt.ListTag colonyFlag) voidSets the name of the view.voidsetNameStyle(String style) Set the colony name style.voidsetStructurePack(String style) voidsetTextureStyle(String style) Set the texture style of the colony.voidSets whether the colony has a child.booleanuseAdditionalChildTime(int amount) Tries to use a given amount of additional growth-time for childs.voidSave the time when mercenaries are used, to set a cooldown.net.minecraft.nbt.CompoundTagwrite(net.minecraft.nbt.CompoundTag colonyCompound) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.IColony
getWayPoints
-
Method Details
-
createFromNetwork
Create a ColonyView given a UUID and CompoundTag.- Parameters:
id- Id of the colony view.- Returns:
- the new colony view.
-
serializeNetworkData
public static void serializeNetworkData(@NotNull @NotNull Colony colony, @NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf, boolean hasNewSubscribers) Populate an NBT compound for a network packet representing a ColonyView.- Parameters:
colony- Colony to write data about.buf-FriendlyByteBufto write data in.hasNewSubscribers- true if there is a new subscription.
-
getFreePositions
Get a copy of the freePositions list.- Specified by:
getFreePositionsin interfaceIColonyView- Returns:
- the list of free to interact positions.
-
getFreeBlocks
Get a copy of the freeBlocks list.- Specified by:
getFreeBlocksin interfaceIColonyView- Returns:
- the list of free to interact blocks.
-
addFreePosition
public void addFreePosition(@NotNull @NotNull net.minecraft.core.BlockPos pos) Add a new free to interact position.- Specified by:
addFreePositionin interfaceIColony- Specified by:
addFreePositionin interfaceIColonyView- Parameters:
pos- position to add.
-
addFreeBlock
public void addFreeBlock(@NotNull @NotNull net.minecraft.world.level.block.Block block) Add a new free to interact block.- Specified by:
addFreeBlockin interfaceIColony- Specified by:
addFreeBlockin interfaceIColonyView- Parameters:
block- block to add.
-
removeFreePosition
public void removeFreePosition(@NotNull @NotNull net.minecraft.core.BlockPos pos) Remove a free to interact position.- Specified by:
removeFreePositionin interfaceIColony- Specified by:
removeFreePositionin interfaceIColonyView- Parameters:
pos- position to remove.
-
removeFreeBlock
public void removeFreeBlock(@NotNull @NotNull net.minecraft.world.level.block.Block block) Remove a free to interact block.- Specified by:
removeFreeBlockin interfaceIColony- Specified by:
removeFreeBlockin interfaceIColonyView- Parameters:
block- state to remove.
-
setCanBeAutoDeleted
public void setCanBeAutoDeleted(boolean canBeDeleted) - Specified by:
setCanBeAutoDeletedin interfaceIColony
-
getDimension
public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension()Returns the dimension ID of the view.- Specified by:
getDimensionin interfaceIColony- Specified by:
getDimensionin interfaceIColonyView- Returns:
- dimension ID of the view.
-
write
public net.minecraft.nbt.CompoundTag write(net.minecraft.nbt.CompoundTag colonyCompound) -
read
public void read(net.minecraft.nbt.CompoundTag compound) -
addWayPoint
public void addWayPoint(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState newWayPointState) - Specified by:
addWayPointin interfaceIColony
-
isValidAttackingGuard
- Specified by:
isValidAttackingGuardin interfaceIColony
-
useAdditionalChildTime
public boolean useAdditionalChildTime(int amount) Tries to use a given amount of additional growth-time for childs.- Specified by:
useAdditionalChildTimein interfaceIColony- Parameters:
amount- amount to use- Returns:
- true if used up.
-
updateHasChilds
public void updateHasChilds()Description copied from interface:IColonySets whether the colony has a child.- Specified by:
updateHasChildsin interfaceIColony
-
addLoadedChunk
public void addLoadedChunk(long chunkPos, net.minecraft.world.level.chunk.LevelChunk chunk) Description copied from interface:IColonyAdds a loaded chunk to the colony list- Specified by:
addLoadedChunkin interfaceIColony- Parameters:
chunkPos- chunk to add
-
removeLoadedChunk
public void removeLoadedChunk(long chunkPos) Description copied from interface:IColonyAdds a chunk from the colony list- Specified by:
removeLoadedChunkin interfaceIColony- Parameters:
chunkPos- chunk to remove
-
getLoadedChunkCount
public int getLoadedChunkCount()Description copied from interface:IColonyReturns the amount of loaded chunks- Specified by:
getLoadedChunkCountin interfaceIColony- Returns:
- amount of chunks
-
getLoadedChunks
- Specified by:
getLoadedChunksin interfaceIColony
-
getState
Description copied from interface:IColonyReturns the colonies current state. -
isActive
public boolean isActive()Description copied from interface:IColonyIs the colony active currently. -
getTicketedChunks
Description copied from interface:IColonyGet the set of chunk positions which the colony is loading through tickets- Specified by:
getTicketedChunksin interfaceIColony- Returns:
- set of positions
-
setTextureStyle
Description copied from interface:IColonySet the texture style of the colony.- Specified by:
setTextureStylein interfaceIColony- Parameters:
style- the style to set.
-
getTextureStyleId
Description copied from interface:IColonyGet the colony style.- Specified by:
getTextureStyleIdin interfaceIColony- Returns:
- the string id of the style.
-
getPlayers
Returns a map of players in the colony. Key is the UUID, value isColonyPlayer- Specified by:
getPlayersin interfaceIColonyView- Returns:
- Map of UUID's and
ColonyPlayer
-
getCitizenCount
public int getCitizenCount()Returns the maximum amount of citizen in the colony.- Specified by:
getCitizenCountin interfaceIColonyView- Returns:
- maximum amount of citizens.
-
getCitizenCountLimit
public int getCitizenCountLimit()Description copied from interface:IColonyViewReturns the maximum amount of citizen slots in the colony considering beds and guard towers- Specified by:
getCitizenCountLimitin interfaceIColonyView- Returns:
- maximum amount of citizens.
-
getCitizens
Getter for the citizens map.- Specified by:
getCitizensin interfaceIColonyView- Returns:
- a unmodifiable Map of the citizen.
-
getWorkOrders
Getter for the workOrders.- Specified by:
getWorkOrdersin interfaceIColonyView- Returns:
- a unmodifiable Collection of the workOrders.
-
getWorkOrder
Description copied from interface:IColonyViewGetter for a single workorder.- Specified by:
getWorkOrderin interfaceIColonyView- Parameters:
id- workorder id.- Returns:
- a specific workorder.
-
getCitizen
Gets the CitizenDataView for a citizen id.- Specified by:
getCitizenin interfaceIColony- Specified by:
getCitizenin interfaceIColonyView- Parameters:
id- the citizen id.- Returns:
- CitizenDataView for the citizen.
-
handleColonyViewMessage
@Nullable public @Nullable IMessage handleColonyViewMessage(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf, @NotNull @NotNull net.minecraft.world.level.Level world, boolean isNewSubscription) Populate a ColonyView from the network data.- Specified by:
handleColonyViewMessagein interfaceIColonyView- Parameters:
buf-FriendlyByteBufto read from.isNewSubscription- Whether this is a new subscription of not.world- the world it is in.- Returns:
- null == no response.
-
handlePermissionsViewMessage
@Nullable public @Nullable IMessage handlePermissionsViewMessage(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) Update permissions.- Specified by:
handlePermissionsViewMessagein interfaceIColonyView- Parameters:
buf- buffer containing permissions.- Returns:
- null == no response
-
handleColonyViewWorkOrderMessage
@Nullable public @Nullable IMessage handleColonyViewWorkOrderMessage(net.minecraft.network.FriendlyByteBuf buf) Update a ColonyView's workOrders given a network data ColonyView update packet. This uses a full-replacement - workOrders do not get updated and are instead overwritten.- Specified by:
handleColonyViewWorkOrderMessagein interfaceIColonyView- Parameters:
buf- Network data.- Returns:
- null == no response.
-
handleColonyViewCitizensMessage
@Nullable public @Nullable IMessage handleColonyViewCitizensMessage(int id, net.minecraft.network.FriendlyByteBuf buf) Update a ColonyView's citizens given a network data ColonyView update packet. The ICitizenManager makes sure to update citizens instead of replacing them.- Specified by:
handleColonyViewCitizensMessagein interfaceIColonyView- Parameters:
id- ID of the citizen.buf- Network data.- Returns:
- null == no response.
-
handleColonyViewVisitorMessage
public void handleColonyViewVisitorMessage(net.minecraft.network.FriendlyByteBuf visitorBuf, boolean refresh) Description copied from interface:IColonyViewHandles visitor view messages- Specified by:
handleColonyViewVisitorMessagein interfaceIColonyView- Parameters:
visitorBuf- the new data to setrefresh- if all need to be refreshed.
-
handleColonyViewAnimalMessage
public void handleColonyViewAnimalMessage(net.minecraft.network.FriendlyByteBuf animalBuf, boolean refresh) Handles animal view messages- Specified by:
handleColonyViewAnimalMessagein interfaceIColonyView- Parameters:
animalBuf- the new data to setrefresh- if all need to be refreshed
-
handleColonyViewRemoveCitizenMessage
Remove a citizen from the ColonyView.- Specified by:
handleColonyViewRemoveCitizenMessagein interfaceIColonyView- Parameters:
citizen- citizen ID.- Returns:
- null == no response.
-
handleColonyViewRemoveWorkOrderMessage
Remove a workOrder from the ColonyView.- Specified by:
handleColonyViewRemoveWorkOrderMessagein interfaceIColonyView- Parameters:
workOrderId- id of the workOrder.- Returns:
- null == no response
-
handleColonyViewResearchManagerUpdate
public void handleColonyViewResearchManagerUpdate(net.minecraft.nbt.CompoundTag compoundTag) Description copied from interface:IColonyViewHandle the colony view research manager updating.- Specified by:
handleColonyViewResearchManagerUpdatein interfaceIColonyView- Parameters:
compoundTag- the tag to update the research manager with.
-
addPlayer
Update a players permissions.- Specified by:
addPlayerin interfaceIColonyView- Parameters:
player- player username.
-
removePlayer
Remove player from colony permissions.- Specified by:
removePlayerin interfaceIColonyView- Parameters:
player- the UUID of the player to remove.
-
getOverallHappiness
public double getOverallHappiness()Getter for the overall happiness.- Specified by:
getOverallHappinessin interfaceIColony- Specified by:
getOverallHappinessin interfaceIColonyView- Returns:
- the happiness, a double.
-
getCenter
public net.minecraft.core.BlockPos getCenter()Description copied from interface:IColonyReturns the position of the colony.- Specified by:
getCenterin interfaceIColony- Specified by:
getCenterin interfaceIColonyView- Returns:
- pos of the colony.
-
getName
Description copied from interface:IColonyReturns the name of the colony.- Specified by:
getNamein interfaceIColony- Specified by:
getNamein interfaceIColonyView- Returns:
- Name of the colony.
-
getTeamColonyColor
public net.minecraft.ChatFormatting getTeamColonyColor()Getter for the team colony color.- Specified by:
getTeamColonyColorin interfaceIColony- Returns:
- the color.
-
getColonyFlag
public net.minecraft.nbt.ListTag getColonyFlag()Getter for the pattern list of the colony flag- Specified by:
getColonyFlagin interfaceIColony- Returns:
- the ListNBT of flag (banner) patterns
-
setName
Sets the name of the view.- Specified by:
setNamein interfaceIColony- Specified by:
setNamein interfaceIColonyView- Parameters:
name- Name of the view.
-
getPermissions
Description copied from interface:IColonyReturns the permissions of the colony.- Specified by:
getPermissionsin interfaceIColony- Specified by:
getPermissionsin interfaceIColonyView- Returns:
IPermissionsof the colony.
-
isCoordInColony
public boolean isCoordInColony(@NotNull @NotNull net.minecraft.world.level.Level w, @NotNull @NotNull net.minecraft.core.BlockPos pos) Description copied from interface:IColonyDetermine if a given chunk coordinate is considered to be within the colony's bounds.- Specified by:
isCoordInColonyin interfaceIColony- Specified by:
isCoordInColonyin interfaceIColonyView- Parameters:
w- World to check.pos- Block Position.- Returns:
- True if inside colony, otherwise false.
-
getDistanceSquared
public long getDistanceSquared(@NotNull @NotNull net.minecraft.core.BlockPos pos) Description copied from interface:IColonyReturns the squared (x, z) distance to the center.- Specified by:
getDistanceSquaredin interfaceIColony- Specified by:
getDistanceSquaredin interfaceIColonyView- Parameters:
pos- Block Position.- Returns:
- Squared distance to the center in (x, z) direction.
-
getID
public int getID()Returns the ID of the view.- Specified by:
getIDin interfaceIColony- Specified by:
getIDin interfaceIColonyView- Returns:
- ID of the view.
-
isDay
public boolean isDay()Description copied from interface:IColonyWhether it is day for the colony -
getLastContactInHours
public int getLastContactInHours()Description copied from interface:IColonyGet the last contact of a player to the colony in hours.- Specified by:
getLastContactInHoursin interfaceIColony- Specified by:
getLastContactInHoursin interfaceIColonyView- Returns:
- an integer with a describing value.
-
getWorld
public net.minecraft.world.level.Level getWorld()Description copied from interface:IColonyMethod to get the World this colony is in.- Specified by:
getWorldin interfaceIColony- Specified by:
getWorldin interfaceIColonyView- Returns:
- the World the colony is in.
-
getRequestManager
Description copied from interface:IColonyGet the currentIRequestManagerfor this Colony. Returns null if the current Colony does not support the request system.- Specified by:
getRequestManagerin interfaceIColony- Specified by:
getRequestManagerin interfaceIColonyView- Returns:
- the
IRequestManagerfor this colony, null if not supported.
-
markDirty
public void markDirty()Description copied from interface:IColonyCalled to mark this colony dirty, and in need of syncing / saving.- Specified by:
markDirtyin interfaceIColony- Specified by:
markDirtyin interfaceIColonyView
-
canBeAutoDeleted
public boolean canBeAutoDeleted()Description copied from interface:IColonyCalled to check if the colony can be deleted by an automatic cleanup.- Specified by:
canBeAutoDeletedin interfaceIColony- Specified by:
canBeAutoDeletedin interfaceIColonyView- Returns:
- true if so.
-
getRequesterBuildingForPosition
@Nullable public @Nullable IRequester getRequesterBuildingForPosition(@NotNull @NotNull net.minecraft.core.BlockPos pos) Description copied from interface:IColonyMethod used to get aIRequesterfrom a given Position. Is always a Building.- Specified by:
getRequesterBuildingForPositionin interfaceIColony- Specified by:
getRequesterBuildingForPositionin interfaceIColonyView- Parameters:
pos- The position to get the Building that acts as a requester.- Returns:
- The
IRequesterfrom the position, or null.
-
removeVisitingPlayer
public void removeVisitingPlayer(net.minecraft.world.entity.player.Player player) Description copied from interface:IColonyRemove a visiting player.- Specified by:
removeVisitingPlayerin interfaceIColony- Specified by:
removeVisitingPlayerin interfaceIColonyView- Parameters:
player- the player.
-
getMessagePlayerEntities
Description copied from interface:IColonyGet the players in the colony which should receive the message.- Specified by:
getMessagePlayerEntitiesin interfaceIColony- Returns:
- list of players
-
addVisitingPlayer
public void addVisitingPlayer(net.minecraft.world.entity.player.Player player) Description copied from interface:IColonyAdd a visiting player.- Specified by:
addVisitingPlayerin interfaceIColony- Specified by:
addVisitingPlayerin interfaceIColonyView- Parameters:
player- the player.
-
onWorldLoad
public void onWorldLoad(@NotNull @NotNull net.minecraft.world.level.Level w) - Specified by:
onWorldLoadin interfaceIColony
-
onWorldUnload
public void onWorldUnload(@NotNull @NotNull net.minecraft.world.level.Level w) - Specified by:
onWorldUnloadin interfaceIColony
-
onServerTick
public void onServerTick(@NotNull net.minecraftforge.event.TickEvent.ServerTickEvent event) - Specified by:
onServerTickin interfaceIColony
-
getWorkManager
- Specified by:
getWorkManagerin interfaceIColony
-
onWorldTick
public void onWorldTick(@NotNull net.minecraftforge.event.TickEvent.LevelTickEvent event) - Specified by:
onWorldTickin interfaceIColony
-
getWayPoints
public Map<net.minecraft.core.BlockPos,net.minecraft.world.level.block.state.BlockState> getWayPoints()- Specified by:
getWayPointsin interfaceIColony
-
getLastSpawnPoints
Get a list of all barb spawn positions in the colony view.- Specified by:
getLastSpawnPointsin interfaceIColonyView- Returns:
- a copy of the list.
-
isRemote
public boolean isRemote()Description copied from interface:IColonyCheck if the colony is on the server or client.- Specified by:
isRemotein interfaceIColony- Specified by:
isRemotein interfaceIColonyView- Returns:
- true if so.
-
getColonyTag
public net.minecraft.nbt.CompoundTag getColonyTag()- Specified by:
getColonyTagin interfaceIColony
-
isColonyUnderAttack
public boolean isColonyUnderAttack()- Specified by:
isColonyUnderAttackin interfaceIColony
-
isValidAttackingPlayer
public boolean isValidAttackingPlayer(net.minecraft.world.entity.player.Player entity) - Specified by:
isValidAttackingPlayerin interfaceIColony
-
addGuardToAttackers
public void addGuardToAttackers(AbstractEntityCitizen entityCitizen, net.minecraft.world.entity.player.Player followPlayer) - Specified by:
addGuardToAttackersin interfaceIColony
-
setColonyColor
public void setColonyColor(net.minecraft.ChatFormatting color) - Specified by:
setColonyColorin interfaceIColony
-
setColonyFlag
public void setColonyFlag(net.minecraft.nbt.ListTag colonyFlag) - Specified by:
setColonyFlagin interfaceIColony
-
getImportantMessageEntityPlayers
@NotNull public @NotNull List<net.minecraft.world.entity.player.Player> getImportantMessageEntityPlayers()Description copied from interface:IColonyReturns a set of players receiving important messages for the colony.- Specified by:
getImportantMessageEntityPlayersin interfaceIColony- Returns:
- set of players.
-
getStructurePack
Get the style of the colony.- Specified by:
getStructurePackin interfaceIColony- Specified by:
getStructurePackin interfaceIColonyView- Returns:
- the current default style.
-
setStructurePack
- Specified by:
setStructurePackin interfaceIColony
-
getServerBuildingManager
- Specified by:
getServerBuildingManagerin interfaceIColony
-
getCommonBuildingManager
- Specified by:
getCommonBuildingManagerin interfaceIColony
-
getGraveManager
- Specified by:
getGraveManagerin interfaceIColony
-
getCitizenManager
- Specified by:
getCitizenManagerin interfaceIColony
-
getVisitorManager
Description copied from interface:IColonyGets the visitor manager- Specified by:
getVisitorManagerin interfaceIColony- Returns:
- manager
-
getAnimalManager
Gets the animal manager of the colony view.- Specified by:
getAnimalManagerin interfaceIColony- Returns:
- null in the view
-
getRaiderManager
- Specified by:
getRaiderManagerin interfaceIColony
-
getEventManager
Description copied from interface:IColonyGet the event manager of the colony.- Specified by:
getEventManagerin interfaceIColony- Returns:
- the event manager.
-
getReproductionManager
Description copied from interface:IColonyGet the reproduction manager of the colony.- Specified by:
getReproductionManagerin interfaceIColony- Returns:
- the reproduction manager.
-
getEventDescriptionManager
Description copied from interface:IColonyGet the event description manager of the colony.- Specified by:
getEventDescriptionManagerin interfaceIColony- Returns:
- the event description manager.
-
getPackageManager
Description copied from interface:IColonyThe colony networking packaging manager.- Specified by:
getPackageManagerin interfaceIColony- Returns:
- The packaging manager.
-
getTravellingManager
Description copied from interface:IColonyGet the travelling manager of the colony.- Specified by:
getTravellingManagerin interfaceIColony- Returns:
- the travelling manager.
-
getConnectionManager
Description copied from interface:IColonyGet the connection manager of the colony.- Specified by:
getConnectionManagerin interfaceIColony- Returns:
- the connection manager.
-
isRaiding
public boolean isRaiding()Description copied from interface:IColonyViewIf currently being raided.- Specified by:
isRaidingin interfaceIColonyView- Returns:
- true if so.
-
getMercenaryUseTime
public long getMercenaryUseTime()Description copied from interface:IColonyGet the last time mercenaries were used.- Specified by:
getMercenaryUseTimein interfaceIColony- Returns:
- the mercenary use time.
-
usedMercenaries
public void usedMercenaries()Description copied from interface:IColonySave the time when mercenaries are used, to set a cooldown.- Specified by:
usedMercenariesin interfaceIColony
-
getResearchManager
Description copied from interface:IColonyGet the research manager.- Specified by:
getResearchManagerin interfaceIColony- Returns:
- the research manager object.
-
areSpiesEnabled
public boolean areSpiesEnabled()- Specified by:
areSpiesEnabledin interfaceIColonyView
-
getVisitor
Description copied from interface:IColonyViewGets the data view for a visitor- Specified by:
getVisitorin interfaceIColonyView- Parameters:
citizenId- id to query- Returns:
- citizen data for visitor
-
getAnimal
Description copied from interface:IColonyViewGets the data view for an animal- Specified by:
getAnimalin interfaceIColonyView- Parameters:
animalId- id to query- Returns:
- animal data for visitor
-
setNameStyle
Description copied from interface:IColonySet the colony name style.- Specified by:
setNameStylein interfaceIColony- Parameters:
style- the string id of the style.
-
getNameStyle
Description copied from interface:IColonyGet the colony name style.- Specified by:
getNameStylein interfaceIColony- Returns:
- the string id of the style.
-
getNameFileIds
Description copied from interface:IColonyViewGet a list of all available citizen name style options.- Specified by:
getNameFileIdsin interfaceIColonyView- Returns:
- the list of options.
-
getCitizenNameFile
Description copied from interface:IColonyGet the matching citizen name file of the colony .- Specified by:
getCitizenNameFilein interfaceIColony- Returns:
- the matching file.
-
getStatisticsManager
Description copied from interface:IColonyGet the statistics manager of the colony.- Specified by:
getStatisticsManagerin interfaceIColony- Returns:
- the statistics manager.
-
getDay
public int getDay()Description copied from interface:IColonyGet the current day of the colony. -
getQuestManager
Description copied from interface:IColonyGet the quest manager of the colony.- Specified by:
getQuestManagerin interfaceIColony- Returns:
- the quest manager.
-
getClientBuildingManager
Description copied from interface:IColonyViewClient side building manager.- Specified by:
getClientBuildingManagerin interfaceIColonyView- Returns:
- the client side building manager
-
getSettings
Description copied from interface:IColonyGet the colony level settings module.- Specified by:
getSettingsin interfaceIColony- Returns:
- the settings module.
-