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 state, @Nullable net.minecraft.nbt.NbtCompound tag)
    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 state, 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
    net.minecraft.block.BlockState
    used to get the blockState
    List<net.minecraft.util.math.BlockPos>
    used to get the list of blockPos related to a layer
    net.minecraft.nbt.NbtCompound
    used to get the NBT tag of the specified NBT
    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
    setBlockstate(net.minecraft.block.BlockState blockstate)
    change the blockState of the 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(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(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, 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 an 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 an 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
    • 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
    • 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

      public 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(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