Interface BlockListManager

All Known Implementing Classes:
CompoundBlockList, DefaultBlockList, ForceBlockList, FullBlockList

public interface BlockListManager

Interface to define the base of the BlockList.

BlockList are objects that are composed of at one BlockState and at least one BlockPos,

and eventually others parameters.

This allows saving memory by removing any duplicate BlockState

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addBlockPos(List<net.minecraft.util.math.BlockPos> pos)
    allow you to add multiple BlockPos to the existing list
    void
    addBlockPos(net.minecraft.util.math.BlockPos pos)
    allow you to add a BlockPos to the existing list
    net.minecraft.block.BlockState
    used to get the BlockState
    net.minecraft.util.math.BlockPos
    method to get the first BlockPos of the posList
    net.minecraft.util.math.BlockPos
    method to get the last BlockPos of the posList
    net.minecraft.util.math.BlockPos
    getPos(int index)
    method to get a certain BlockPos from an index in the posList
    List<net.minecraft.util.math.BlockPos>
    used to get the list of BlockPos related to a layer
    net.minecraft.util.math.BlockPos
    method to get a random BlockPos of the posList
    net.minecraft.util.math.BlockPos
    getRandomPos(net.minecraft.util.math.random.Random random)
    method to get a random BlockPos of the posList
    void
    removeBlockPos(List<net.minecraft.util.math.BlockPos> pos)
    allow you to remove a list of BlockPos to the existing list
    void
    removeBlockPos(net.minecraft.util.math.BlockPos pos)
    allow you to remove a BlockPos to the existing list
    void
    replaceBlockPos(net.minecraft.util.math.BlockPos oldPos, net.minecraft.util.math.BlockPos newPos)
    method to replace one blockPos to another one
    void
    setBlockState(net.minecraft.block.BlockState blockState)
    change the BlockState of the BlockShapeManager
    void
    setPosList(List<net.minecraft.util.math.BlockPos> posList)
    It uses a list of BlockPos to allow multiple BlockPos to have a BlockState
    int
    method to get the number of BlockPos present in the related BlockList
  • Method Details

    • getPosList

      List<net.minecraft.util.math.BlockPos> getPosList()
      used to get the list of BlockPos related to a layer
      Returns:
      the list of BlockPos
    • setPosList

      void setPosList(List<net.minecraft.util.math.BlockPos> posList)
      It uses a list of BlockPos to allow multiple BlockPos to have a BlockState
      Parameters:
      posList - a list of BlockPos
    • addBlockPos

      void addBlockPos(net.minecraft.util.math.BlockPos pos)
      allow you to add a BlockPos to the existing list
      Parameters:
      pos - BlockPos pos added
    • addBlockPos

      void addBlockPos(List<net.minecraft.util.math.BlockPos> pos)
      allow you to add multiple BlockPos to the existing list
      Parameters:
      pos - the BlockPos list added
    • removeBlockPos

      void removeBlockPos(net.minecraft.util.math.BlockPos pos)
      allow you to remove a BlockPos to the existing list
      Parameters:
      pos - the pos removed
    • removeBlockPos

      void removeBlockPos(List<net.minecraft.util.math.BlockPos> pos)
      allow you to remove a list of BlockPos to the existing list
      Parameters:
      pos - the list pos removed
    • replaceBlockPos

      void replaceBlockPos(net.minecraft.util.math.BlockPos oldPos, net.minecraft.util.math.BlockPos newPos)
      method to replace one blockPos to another one
      Parameters:
      oldPos - the oldPos that will be replaced
      newPos - the newPos that will replace the other BlockPos
    • getPos

      net.minecraft.util.math.BlockPos getPos(int index)
      method to get a certain BlockPos from an index in the posList
      Parameters:
      index - the index of the BlockPos
      Returns:
      the BlockPos of the index
    • getLastPos

      net.minecraft.util.math.BlockPos getLastPos()
      method to get the last BlockPos of the posList
      Returns:
      the last BlockPos of the posList
    • getFirstPos

      net.minecraft.util.math.BlockPos getFirstPos()
      method to get the first BlockPos of the posList
      Returns:
      the first BlockPos of the posList
    • getRandomPos

      net.minecraft.util.math.BlockPos getRandomPos()
      method to get a random BlockPos of the posList
      Returns:
      the first BlockPos of the posList
    • getRandomPos

      net.minecraft.util.math.BlockPos getRandomPos(net.minecraft.util.math.random.Random random)
      method to get a random BlockPos of the posList
      Parameters:
      random - the random object that will be used to get the index
      Returns:
      the first BlockPos of the posList
    • getBlockState

      net.minecraft.block.BlockState getBlockState()
      used to get the BlockState
      Returns:
      the BlockState of the BlockShapeManager
    • setBlockState

      void setBlockState(net.minecraft.block.BlockState blockState)
      change the BlockState of the BlockShapeManager
      Parameters:
      blockState - the BlockState related to the BlockPos list
    • size

      int size()
      method to get the number of BlockPos present in the related BlockList
      Returns:
      the number of BlockPos