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

public class BuildingMiner extends AbstractBuildingStructureBuilder
The miners building.
  • Field Details

  • Constructor Details

    • BuildingMiner

      public BuildingMiner(IColony c, net.minecraft.core.BlockPos l)
      Required constructor.
      Parameters:
      c - colony containing the building.
      l - location of the building.
  • Method Details

    • getSchematicName

      @NotNull public @NotNull String getSchematicName()
      Getter of the structure name.
      Returns:
      the structure name.
    • getMaxBuildingLevel

      public int getMaxBuildingLevel()
      Getter of the max building level.
      Specified by:
      getMaxBuildingLevel in interface ISchematicProvider
      Overrides:
      getMaxBuildingLevel in class AbstractBuildingStructureBuilder
      Returns:
      the integer.
    • getResourceBatchMultiplier

      public int getResourceBatchMultiplier()
      The Miner wants to get multiple nodes/levels worth of stuff when requesting.
      Overrides:
      getResourceBatchMultiplier in class AbstractBuildingStructureBuilder
    • deserializeNBT

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

      public net.minecraft.nbt.CompoundTag serializeNBT()
      Specified by:
      serializeNBT in interface IBuildingContainer
      Specified by:
      serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
      Overrides:
      serializeNBT in class AbstractBuildingStructureBuilder
    • getDepthLimit

      public int getDepthLimit(net.minecraft.world.level.Level level)
      Returns the depth limit. Limitted by building level.
       - Level 1: 50
       - Level 2: 20
       - Level 3: 0
       
      Returns:
      Depth limit.
    • normalizeMaxDepth

      public int normalizeMaxDepth(int max, net.minecraft.world.level.Level level)
      Normalize the maximum depth. Make sure that the returned depth respects the world limits and follows the building setting..
      Parameters:
      max - the max depth of the given building level.
      level - the world.
      Returns:
      the max.
    • getLadderLocation

      public net.minecraft.core.BlockPos getLadderLocation()
      Getter of the ladderLocation.
      Returns:
      the ladder location.
    • getCobbleLocation

      public net.minecraft.core.BlockPos getCobbleLocation()
      Getter of the cobbleLocation.
      Returns:
      the location.
    • initStructure

      public static void initStructure(MineNode mineNode, int rotateTimes, net.minecraft.core.BlockPos structurePos, BuildingMiner buildingMiner, net.minecraft.world.level.Level world, JobMiner job)
      Initiates structure loading.
      Parameters:
      mineNode - the node to load it for.
      rotateTimes - The amount of time to rotate the structure.
      structurePos - The position of the structure.