Interface IBuildingContainer

All Superinterfaces:
net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>, ISchematicProvider
All Known Subinterfaces:
IBuilding, IBuildingDeliveryman, IBuildingWorker, IGuardBuilding, IMysticalSite, ITownHall, IWareHouse
All Known Implementing Classes:
AbstractBuilding, AbstractBuildingContainer, AbstractBuildingGuards, AbstractBuildingStructureBuilder, AbstractSchematicProvider, BuildingAlchemist, BuildingArchery, BuildingBaker, BuildingBarracks, BuildingBarracksTower, BuildingBeekeeper, BuildingBlacksmith, BuildingBuilder, BuildingChickenHerder, BuildingCombatAcademy, BuildingComposter, BuildingConcreteMixer, BuildingCook, BuildingCowboy, BuildingCrusher, BuildingDeliveryman, BuildingDyer, BuildingEnchanter, BuildingFarmer, BuildingFisherman, BuildingFletcher, BuildingFlorist, BuildingGateHouse, BuildingGlassblower, BuildingGraveyard, BuildingGuardTower, BuildingHospital, BuildingKitchen, BuildingLibrary, BuildingLumberjack, BuildingMechanic, BuildingMiner, BuildingMysticalSite, BuildingNetherWorker, BuildingPlantation, BuildingRabbitHutch, BuildingSawmill, BuildingSchool, BuildingShepherd, BuildingSifter, BuildingSmeltery, BuildingStable, BuildingStonemason, BuildingStoneSmeltery, BuildingSwineHerder, BuildingTownHall, BuildingUniversity, BuildingWareHouse, DefaultBuildingInstance, PostBox, Stash

public interface IBuildingContainer extends ISchematicProvider, net.minecraftforge.common.capabilities.ICapabilityProvider
  • Method Details

    • deserializeNBT

      void deserializeNBT(net.minecraft.nbt.CompoundTag compound)
      Specified by:
      deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • serializeNBT

      net.minecraft.nbt.CompoundTag serializeNBT()
      Specified by:
      serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • getPickUpPriority

      int getPickUpPriority()
      Get the pick up priority of the building.
      Returns:
      the priority, an integer.
    • alterPickUpPriority

      void alterPickUpPriority(int value)
      Increase or decrease the current pickup priority.
      Parameters:
      value - the new prio to add to.
    • addContainerPosition

      void addContainerPosition(@NotNull @NotNull net.minecraft.core.BlockPos pos)
      Add a new container to the building.
      Parameters:
      pos - position to add.
    • removeContainerPosition

      void removeContainerPosition(net.minecraft.core.BlockPos pos)
      Remove a container from the building.
      Parameters:
      pos - position to remove.
    • getContainers

      List<net.minecraft.core.BlockPos> getContainers()
      Get all containers which belong to the building (including hutblock).
      Returns:
      a copy of the list to avoid currentModification exception.
    • registerBlockPosition

      void registerBlockPosition(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState blockState, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.Level world)
      Register a blockState and position. We suppress this warning since this parameter will be used in child classes which override this method.
      Parameters:
      blockState - to be registered
      pos - of the blockState
      world - world to register it at.
    • registerBlockPosition

      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)
      Register a block and position. We suppress this warning since this parameter will be used in child classes which override this method.
      Parameters:
      block - to be registered
      pos - of the block
      world - world to register it at.
    • getTileEntity

      Returns the tile entity that belongs to the colony building.
      Returns:
      AbstractTileEntityColonyBuilding object of the building.
    • setTileEntity

      void setTileEntity(AbstractTileEntityColonyBuilding te)
      Sets the tile entity for the building.
      Parameters:
      te - The tileentity
    • getCapability

      @Nonnull <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(@Nonnull net.minecraftforge.common.capabilities.Capability<T> cap, net.minecraft.core.Direction direction)
      Specified by:
      getCapability in interface net.minecraftforge.common.capabilities.ICapabilityProvider