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

public static class BuildingPlantation.PlantationFieldsModuleView extends FieldsModuleView
Field module view implementation for the plantation.
  • Constructor Details

    • PlantationFieldsModuleView

      public PlantationFieldsModuleView()
  • Method Details

    • deserialize

      public void deserialize(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Description copied from interface: IBuildingModuleView
      Deserialize the data on the client side.
      Specified by:
      deserialize in interface IBuildingModuleView
      Overrides:
      deserialize in class FieldsModuleView
      Parameters:
      buf - the buffer to read it from.
    • canAssignFieldOverride

      protected boolean canAssignFieldOverride(IBuildingExtension field)
      Description copied from class: FieldsModuleView
      Additional checks to see if this field can be assigned to the building.
      Specified by:
      canAssignFieldOverride in class FieldsModuleView
      Parameters:
      field - the field which is being added.
      Returns:
      true if so.
    • getFieldsInColony

      protected List<IBuildingExtension> getFieldsInColony()
      Description copied from class: FieldsModuleView
      Obtains the list of fields from the colony.
      Specified by:
      getFieldsInColony in class FieldsModuleView
      Returns:
      the list of field instances.
    • getFieldWarningTooltip

      @Nullable public @Nullable net.minecraft.network.chat.MutableComponent getFieldWarningTooltip(IBuildingExtension field)
      Description copied from class: FieldsModuleView
      Get a warning text component for the specific field whenever this field cannot be assigned for any reason.
      Overrides:
      getFieldWarningTooltip in class FieldsModuleView
      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: IBuildingModuleView
      Get 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.