Class BuildingConcreteMixer

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 BuildingConcreteMixer extends AbstractBuilding
Class of the concrete mason building.
  • Constructor Details

    • BuildingConcreteMixer

      public BuildingConcreteMixer(IColony c, net.minecraft.core.BlockPos l)
      Instantiates a new concrete mason building.
      Parameters:
      c - the colony.
      l - the location
  • Method Details

    • registerBlockPosition

      public 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)
      Description copied from interface: IBuildingContainer
      Register a blockState 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 AbstractBuilding
      Parameters:
      blockState - to be registered
      pos - of the blockState
      world - world to register it at.
    • 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
    • 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
    • getSchematicName

      @NotNull public @NotNull String getSchematicName()
      Description copied from interface: ISchematicProvider
      Children must return the name of their structure.
      Returns:
      StructureProxy name.
    • getMaxBuildingLevel

      public int getMaxBuildingLevel()
      Description copied from interface: ISchematicProvider
      Children must return their max building level.
      Specified by:
      getMaxBuildingLevel in interface ISchematicProvider
      Overrides:
      getMaxBuildingLevel in class AbstractBuilding
      Returns:
      Max building level.
    • getMaxConcretePlaced

      public int getMaxConcretePlaced()
      Get the max amount of concrete placed at once.
      Returns:
      the number of concrete.
    • getBlockToMine

      @Nullable public @Nullable net.minecraft.core.BlockPos getBlockToMine()
      Check if there are open positions to mine.
      Returns:
      the open position if so.
    • getBlockToPlace

      @Nullable public @Nullable net.minecraft.core.BlockPos getBlockToPlace()
      Check if there are open positions to place.
      Returns:
      the open position if so.
    • outputBlockCountInWorld

      public int outputBlockCountInWorld(net.minecraft.world.item.ItemStack primaryOutput)
      Get how much of an itemStack we already placed in the world.
      Parameters:
      primaryOutput - the block to check for.
      Returns:
      the total count.