Class BuildingPlantation.PlantationFieldsModuleView
java.lang.Object
com.minecolonies.api.colony.buildings.modules.AbstractBuildingModuleView
com.minecolonies.core.colony.buildings.moduleviews.FieldsModuleView
com.minecolonies.core.colony.buildings.workerbuildings.BuildingPlantation.PlantationFieldsModuleView
- All Implemented Interfaces:
IBuildingModuleView
- Enclosing class:
- BuildingPlantation
Field module view implementation for the plantation.
-
Field Summary
Fields inherited from class com.minecolonies.api.colony.buildings.modules.AbstractBuildingModuleView
buildingView, colonyView -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanAdditional checks to see if this field can be assigned to the building.voiddeserialize(@NotNull net.minecraft.network.FriendlyByteBuf buf) Deserialize the data on the client side.intGetter of the worked plants.protected List<IBuildingExtension>Obtains the list of fields from the colony.@Nullable net.minecraft.network.chat.MutableComponentGet a warning text component for the specific field whenever this field cannot be assigned for any reason.intGet the maximum allowed plants the plantation can work on simultaneously.com.ldtteam.blockui.views.BOWindowGet the matching window for the module.Methods inherited from class com.minecolonies.core.colony.buildings.moduleviews.FieldsModuleView
assignField, assignFieldManually, canAssignField, freeField, getDesc, getFields, getIconResourceLocation, getMaxFieldCount, getOwnedFields, setAssignFieldManuallyMethods inherited from class com.minecolonies.api.colony.buildings.modules.AbstractBuildingModuleView
canBeHiredAs, getBuildingView, getColony, getProducer, setBuildingView, setColonyView, setProducerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.buildings.modules.IBuildingModuleView
getIcon, isPageVisible
-
Constructor Details
-
PlantationFieldsModuleView
public PlantationFieldsModuleView()
-
-
Method Details
-
deserialize
public void deserialize(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) Description copied from interface:IBuildingModuleViewDeserialize the data on the client side.- Specified by:
deserializein interfaceIBuildingModuleView- Overrides:
deserializein classFieldsModuleView- Parameters:
buf- the buffer to read it from.
-
canAssignFieldOverride
Description copied from class:FieldsModuleViewAdditional checks to see if this field can be assigned to the building.- Specified by:
canAssignFieldOverridein classFieldsModuleView- Parameters:
field- the field which is being added.- Returns:
- true if so.
-
getFieldsInColony
Description copied from class:FieldsModuleViewObtains the list of fields from the colony.- Specified by:
getFieldsInColonyin classFieldsModuleView- Returns:
- the list of field instances.
-
getFieldWarningTooltip
@Nullable public @Nullable net.minecraft.network.chat.MutableComponent getFieldWarningTooltip(IBuildingExtension field) Description copied from class:FieldsModuleViewGet a warning text component for the specific field whenever this field cannot be assigned for any reason.- Overrides:
getFieldWarningTooltipin classFieldsModuleView- Parameters:
field- the field in question.- Returns:
- a text component that should be shown if there is a problem for the specific field, else null.
-
getCurrentPlants
public int getCurrentPlants()Getter of the worked plants.- Returns:
- the amount of worked plants.
-
getWindow
public com.ldtteam.blockui.views.BOWindow getWindow()Description copied from interface:IBuildingModuleViewGet the matching window for the module.- Returns:
- the window.
-
getMaxConcurrentPlants
public int getMaxConcurrentPlants()Get the maximum allowed plants the plantation can work on simultaneously.- Returns:
- the maximum amount of concurrent plants.
-