java.lang.Object
me.desht.pneumaticcraft.common.progwidgets.area.AreaType
Direct Known Subclasses:
AreaTypeBox, AreaTypeCylinder, AreaTypeGrid, AreaTypeLine, AreaTypePyramid, AreaTypeRandom, AreaTypeSphere, AreaTypeWall

public abstract class AreaType extends Object
  • Constructor Details

    • AreaType

      public AreaType(String name)
  • Method Details

    • getName

      public String getName()
    • getTranslationKey

      public String getTranslationKey()
    • addArea

      public abstract void addArea(Consumer<net.minecraft.core.BlockPos> areaAdder, net.minecraft.core.BlockPos p1, net.minecraft.core.BlockPos p2, int minX, int minY, int minZ, int maxX, int maxY, int maxZ)
      Actually add the positions defined by this area to the given blockpos set
      Parameters:
      areaAdder - the adder; call adder.accept(pos) to add a blockpos
      p1 - the first raw blockpos of the area
      p2 - the second raw blockpos of the area
      minX - min X coord
      minY - min Y coord
      minZ - min Z coord
      maxX - max X coord
      maxY - max Y coord
      maxZ - max Z coord
    • convertFromLegacy

      public void convertFromLegacy(LegacyAreaWidgetConverter.EnumOldAreaType oldType, int typeInfo)
      Called when loading old-style programs from pastebin etc. Convert any old-fashioned area representations to their modern equivalents.
      Parameters:
      oldType - the old-style area type
      typeInfo - extra integer type information used by some types
    • isDeterministic

      public boolean isDeterministic()
      Whether or not the area added in addArea is deterministic (used to determine if stuff can be cached or not).
      Returns:
      true if deterministic, false otherwise
    • writeToPacket

      public void writeToPacket(net.minecraft.network.FriendlyByteBuf buffer)
    • readFromPacket

      public void readFromPacket(net.minecraft.network.FriendlyByteBuf buf)
    • writeToNBT

      public void writeToNBT(net.minecraft.nbt.CompoundTag tag)
    • readFromNBT

      public void readFromNBT(net.minecraft.nbt.CompoundTag tag)
    • addUIWidgets

      public void addUIWidgets(List<AreaType.AreaTypeWidget> widgets)