java.lang.Object
net.rodofire.easierworldcreator.shapeutil.BlockList

public class BlockList extends Object
class used for the generation or the modification of a NBT file this is an easier version of the StructureTemplate.StructureBlockInfo
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState state)
    init a blockList
    BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState blockState, boolean force)
    init a BlockList
    BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState blockState, Set<net.minecraft.block.Block> blocksToForce)
    init a BlockList
    BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState state, @Nullable net.minecraft.nbt.NbtCompound tag)
    init a BlockList
    BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState blockState, @Nullable net.minecraft.nbt.NbtCompound tag, boolean force)
    init a BlockList
    BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState blockState, @Nullable net.minecraft.nbt.NbtCompound tag, Set<net.minecraft.block.Block> blocksToForce)
    init a BlockList
    BlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state)
    init a BlockList
    BlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState blockState, boolean force)
    init a BlockList
    BlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState blockState, Set<net.minecraft.block.Block> blocksToForce)
    init a BlockList
    BlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state, @Nullable net.minecraft.nbt.NbtCompound tag)
    init a BlockList
  • 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
    void
    addBlocksToForce(Set<net.minecraft.block.Block> blocksToForce)
    add a set of blocks to the set
    void
    addBlocksToForce(net.minecraft.block.Block block)
    add a block to the set
    net.minecraft.block.BlockState
    used to get the blockState
    Set<net.minecraft.block.Block>
    gives you the Set of every block that can be forced
    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 pos from an index in the posList
    List<net.minecraft.util.math.BlockPos>
    used to get the list of blockPos related to a layer
    @Nullable net.minecraft.nbt.NbtCompound
    used to get the NBT tag of the specified NBT
    boolean
    get if any block can be replaced by any BlockState of this blockList
    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
    removeBlocksToForce(Set<net.minecraft.block.Block> blocksToForce)
    remove a set of blocks to the set
    void
    removeBlocksToForce(net.minecraft.block.Block block)
    remove a block to the set
    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 BlockList
    void
    setBlocksToForce(Set<net.minecraft.block.Block> blocksToForce)
    sets all the blocks that can be forced in the case force == false
    void
    setForce(boolean force)
    sets if any block can be replaced by any BlockState of this blockList
    void
    setPosList(List<net.minecraft.util.math.BlockPos> posList)
    It uses a list of blockPos to allow multiple BlockPos to have a BlockState
    void
    setTag(@Nullable net.minecraft.nbt.NbtCompound tag)
    allow you to change the tag of the relatedBlock
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BlockList

      public BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState blockState, @Nullable @Nullable net.minecraft.nbt.NbtCompound tag, boolean force)
      init a BlockList
      Parameters:
      posList - pos of the blockState
      blockState - the blockState related to the pos list
      tag - the nbt of the block if it has a nbt
      force - set if any block can be replaced by any blockState in this BlockList
    • BlockList

      public BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState blockState, @Nullable @Nullable net.minecraft.nbt.NbtCompound tag, Set<net.minecraft.block.Block> blocksToForce)
      init a BlockList
      Parameters:
      posList - pos of the blockState
      blockState - the blockState related to the pos list
      tag - the nbt of the block if it has a nbt
      blocksToForce - list of blocks that can be forced by any blockStates of this posList
    • BlockList

      public BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState blockState, Set<net.minecraft.block.Block> blocksToForce)
      init a BlockList
      Parameters:
      posList - pos of the blockState
      blockState - the blockState related to the pos list
      blocksToForce - list of blocks that can be forced by any blockStates of this posList
    • BlockList

      public BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState blockState, boolean force)
      init a BlockList
      Parameters:
      posList - pos of the blockState
      blockState - the blockState related to the pos list
      force - set if any block can be replaced by any blockState in this BlockList
    • BlockList

      public BlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState blockState, boolean force)
      init a BlockList
      Parameters:
      pos - pos of the blockState
      blockState - the blockState related to the pos list
      force - set if any block can be replaced by any blockState in this BlockList
    • BlockList

      public BlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState blockState, Set<net.minecraft.block.Block> blocksToForce)
      init a BlockList
      Parameters:
      pos - pos of the blockState
      blockState - the blockState related to the pos list
      blocksToForce - list of blocks that can be forced by any blockStates of this posList
    • BlockList

      public BlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state)
      init a BlockList
      Parameters:
      pos - pos of the blockState
      state - the blockState related to the pos list
    • BlockList

      public BlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state, @Nullable @Nullable net.minecraft.nbt.NbtCompound tag)
      init a BlockList
      Parameters:
      pos - pos of the blockState
      state - the blockState related to the pos list
      tag - the nbt of the block if it has a nbt
    • BlockList

      public BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState state)
      init a blockList
      Parameters:
      posList - the list of pos of the blockState
      state - the blockState related to the pos
    • BlockList

      public BlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState state, @Nullable @Nullable net.minecraft.nbt.NbtCompound tag)
      init a BlockList
      Parameters:
      posList - the list of pos of the blockState
      state - the blockState related to the pos
      tag - the nbt of the block if it has a nbt
  • Method Details

    • getPosList

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

      public Set<net.minecraft.block.Block> getBlocksToForce()
      gives you the Set of every block that can be forced
      Returns:
      the set of the blocks that can be forced
    • setBlocksToForce

      public void setBlocksToForce(Set<net.minecraft.block.Block> blocksToForce)
      sets all the blocks that can be forced in the case force == false
      Parameters:
      blocksToForce - the set of blocks that can be forced
    • addBlocksToForce

      public void addBlocksToForce(net.minecraft.block.Block block)
      add a block to the set
      Parameters:
      block - the block added
    • addBlocksToForce

      public void addBlocksToForce(Set<net.minecraft.block.Block> blocksToForce)
      add a set of blocks to the set
      Parameters:
      blocksToForce - the set that will be added
    • removeBlocksToForce

      public void removeBlocksToForce(net.minecraft.block.Block block)
      remove a block to the set
      Parameters:
      block - the block removed
    • removeBlocksToForce

      public void removeBlocksToForce(Set<net.minecraft.block.Block> blocksToForce)
      remove a set of blocks to the set
      Parameters:
      blocksToForce - the set that will be removed
    • isForce

      public boolean isForce()
      get if any block can be replaced by any BlockState of this blockList
      Returns:
      the boolean related to it
    • setForce

      public void setForce(boolean force)
      sets if any block can be replaced by any BlockState of this blockList
      Parameters:
      force - the boolean used
    • setPosList

      public 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

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

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

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

      public 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

      public 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

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

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

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

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

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

      @Nullable public @Nullable net.minecraft.nbt.NbtCompound getTag()
      used to get the NBT tag of the specified NBT
      Returns:
      the tag of the BlockList if it exists
    • setTag

      public void setTag(@Nullable @Nullable net.minecraft.nbt.NbtCompound tag)
      allow you to change the tag of the relatedBlock
      Parameters:
      tag - the nbt parameter of the related Block
    • toString

      public String toString()
      Overrides:
      toString in class Object