Class BuildingBarracksTower

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

public class BuildingBarracksTower extends AbstractBuildingGuards
Building class for the Barracks Tower.
  • Constructor Details

    • BuildingBarracksTower

      public BuildingBarracksTower(@NotNull @NotNull IColony c, net.minecraft.core.BlockPos l)
      The abstract constructor of the building.
      Parameters:
      c - the colony
      l - the position
  • Method Details

    • 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.
    • requestUpgrade

      public void requestUpgrade(net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos builder)
      Description copied from class: AbstractBuilding
      Requests an upgrade for the current building.
      Specified by:
      requestUpgrade in interface IBuilding
      Overrides:
      requestUpgrade in class AbstractBuilding
      Parameters:
      player - the requesting player.
      builder - the assigned builder.
    • canDeconstruct

      public boolean canDeconstruct()
      Description copied from class: AbstractBuilding
      Check if this particular building can be deconstructed.
      Overrides:
      canDeconstruct in class AbstractBuilding
      Returns:
      true if so.
    • getClaimRadius

      public int getClaimRadius(int newLevel)
      Description copied from class: AbstractBuilding
      Method to calculate the radius to be claimed by this building depending on the level.
      Specified by:
      getClaimRadius in interface IBuilding
      Overrides:
      getClaimRadius in class AbstractBuilding
      Parameters:
      newLevel - the new level of the building.
      Returns:
      the radius.
    • onUpgradeComplete

      public void onUpgradeComplete(@Nullable @Nullable com.ldtteam.structurize.blueprints.v1.Blueprint blueprint, int newLevel)
      Description copied from class: AbstractBuildingGuards
      We use this to set possible health multipliers and give achievements.
      Specified by:
      onUpgradeComplete in interface IBuilding
      Overrides:
      onUpgradeComplete in class AbstractBuildingGuards
      Parameters:
      newLevel - The new level.
    • 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 AbstractBuildingGuards
    • 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 AbstractBuildingGuards
    • addBarracks

      public void addBarracks(net.minecraft.core.BlockPos pos)
      Adds the position of the main barracks.
      Parameters:
      pos - the BlockPos.