Interface ICitizenColonyHandler
- All Known Implementing Classes:
CitizenColonyHandler,VisitorColonyHandler
public interface ICitizenColonyHandler
-
Method Summary
Modifier and TypeMethodDescriptionUnsafe colony getter, doesn't run registration.intGetter for the colony id.@Nullable IColonyGetter for the colony.@Nullable IBuilding@Nullable IBuildingcalculate this worker building.voidActions when the entity is removed.voidonSyncDataUpdate(net.minecraft.network.syncher.EntityDataAccessor<?> dataAccessor) Entity data update callbackbooleanvoidregisterWithColony(int colonyID, int citizenID) Server-specific update for the EntityCitizen.voidsetColonyId(int colonyId) Setter for the colony id.voidUpdate the client side of the citizen entity.
-
Method Details
-
getWorkBuilding
calculate this worker building.- Returns:
- the building or null if none present.
-
getHomeBuilding
-
registerWithColony
void registerWithColony(int colonyID, int citizenID) Server-specific update for the EntityCitizen.- Parameters:
colonyID- the colony id.citizenID- the citizen id.
-
updateColonyClient
void updateColonyClient()Update the client side of the citizen entity. -
getColonyOrRegister
Getter for the colony.- Returns:
- the colony of the citizen or null.
-
getColonyId
int getColonyId()Getter for the colony id.- Returns:
- the colony id.
-
setColonyId
void setColonyId(int colonyId) Setter for the colony id.- Parameters:
colonyId- the new colonyId.
-
onCitizenRemoved
void onCitizenRemoved()Actions when the entity is removed. -
onSyncDataUpdate
void onSyncDataUpdate(net.minecraft.network.syncher.EntityDataAccessor<?> dataAccessor) Entity data update callback- Parameters:
dataAccessor-
-
registered
boolean registered() -
getColony
IColony getColony()Unsafe colony getter, doesn't run registration.- Returns:
- the colony.
-