Class BuildingUniversity

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 BuildingUniversity extends AbstractBuilding
Creates a new building for the university.
  • Constructor Details

    • BuildingUniversity

      public BuildingUniversity(IColony c, net.minecraft.core.BlockPos l)
      Instantiates the building.
      Parameters:
      c - the colony.
      l - the location.
  • Method Details

    • getSchematicName

      @NotNull public @NotNull String getSchematicName()
      Description copied from interface: ISchematicProvider
      Children must return the name of their structure.
      Returns:
      StructureProxy name.
    • 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 AbstractBuilding
    • 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 AbstractBuilding
    • registerBlockPosition

      public void registerBlockPosition(@NotNull @NotNull net.minecraft.world.level.block.Block block, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.Level world)
      Description copied from interface: IBuildingContainer
      Register a block and position. We suppress this warning since this parameter will be used in child classes which override this method.
      Specified by:
      registerBlockPosition in interface IBuildingContainer
      Overrides:
      registerBlockPosition in class AbstractBuildingContainer
      Parameters:
      block - to be registered
      pos - of the block
      world - world to register it at.
    • getRandomBookShelf

      public net.minecraft.core.BlockPos getRandomBookShelf()
      Returns a random bookshelf from the list.
      Returns:
      the position of it.
    • onColonyTick

      public void onColonyTick(@NotNull @NotNull IColony colony)
      Description copied from class: AbstractBuilding
      Regularly tick this building and check if we got the minimum stock(like once a minute is still fine) - If not: Check if there is a request for this already. -- If not: Create a request. - If so: Check if there is a request for this still. -- If so: cancel it.
      Specified by:
      onColonyTick in interface IBuilding
      Overrides:
      onColonyTick in class AbstractBuilding
    • onSuccess

      public void onSuccess(ILocalResearch research)
      Called on successfully concluding a research.
      Parameters:
      research - the concluded research.
    • processOfflineTime

      public void processOfflineTime(long time)
      Description copied from interface: IBuilding
      Process time the colony was offline.
      Specified by:
      processOfflineTime in interface IBuilding
      Overrides:
      processOfflineTime in class AbstractBuilding
      Parameters:
      time - the time in seconds.