All Implemented Interfaces:
IBuilding, IBuildingContainer, ICommonBuilding, ISchematicProvider, IBuildingModuleContainer, IModuleContainer<IBuildingModule>, IRequester, IRequestResolverProvider, IItemHandlerCapProvider, net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class BuildingBuilder extends AbstractBuildingStructureBuilder
The builders building.
  • Field Details

  • Constructor Details

    • BuildingBuilder

      public BuildingBuilder(IColony c, net.minecraft.core.BlockPos l)
      Public constructor of the building, creates an object of the building.
      Parameters:
      c - the colony.
      l - the position.
  • Method Details

    • getSchematicName

      @NotNull public @NotNull String getSchematicName()
      Getter of the schematic name.
      Returns:
      the schematic name.
    • onWakeUp

      public void onWakeUp()
      Description copied from class: AbstractBuilding
      Executed when a new day start.
      Specified by:
      onWakeUp in interface IBuilding
      Overrides:
      onWakeUp in class AbstractBuilding
    • deserializeNBT

      public void deserializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound)
      Specified by:
      deserializeNBT in interface IBuildingContainer
      Specified by:
      deserializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Overrides:
      deserializeNBT in class AbstractBuildingStructureBuilder
    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      serializeNBT in interface IBuildingContainer
      Specified by:
      serializeNBT in interface net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Overrides:
      serializeNBT in class AbstractBuildingStructureBuilder
    • setPurgedMobsToday

      public void setPurgedMobsToday(boolean purgedMobsToday)
      Set if mobs have been purged by this builder at his hut already today.
      Parameters:
      purgedMobsToday - true if so.
    • hasPurgedMobsToday

      public boolean hasPurgedMobsToday()
      Check if the builder has purged the mobs already.
      Returns:
      true if so.
    • getManualMode

      public boolean getManualMode()
      Checks whether the builder should automatically accept build orders.
      Returns:
      false if he should.
    • setWorkOrder

      public void setWorkOrder(int orderId, net.minecraft.server.level.ServerPlayer serverPlayer)
      Sets the work order with the given id as the work order for this buildings citizen.
      Parameters:
      orderId - the id of the work order to select.
    • canBeBuiltByBuilder

      public boolean canBeBuiltByBuilder(int newLevel)
      Description copied from class: AbstractBuilding
      Method to define if a builder can build this although the builder is not level 1 yet.
      Specified by:
      canBeBuiltByBuilder in interface IBuilding
      Overrides:
      canBeBuiltByBuilder in class AbstractBuilding
      Parameters:
      newLevel - the new level of the building.
      Returns:
      true if so.
    • canAssignCitizens

      public boolean canAssignCitizens()
      Description copied from interface: IBuilding
      Check if this building is sufficiently built to be able to assign workers.
      Returns:
      true if so.
    • canEat

      public boolean canEat(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: IBuilding
      Check if the assigned citizens are allowed to eat the following stack.
      Parameters:
      stack - the stack to test.
      Returns:
      true if so.