java.lang.Object
net.rodofire.easierworldcreator.blockdata.blocklist.basic.DefaultBlockList
net.rodofire.easierworldcreator.blockdata.blocklist.basic.CompoundBlockList
All Implemented Interfaces:
BlockListManager
Direct Known Subclasses:
FullBlockList

public class CompoundBlockList extends DefaultBlockList
add possibility of having NbtCompound in compound blockList
  • Constructor Details

    • CompoundBlockList

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

      public CompoundBlockList(List<net.minecraft.util.math.BlockPos> posList, net.minecraft.block.BlockState state, @Nullable @Nullable net.minecraft.nbt.NbtCompound tag)
      init a CompoundBlockList
      Parameters:
      posList - pos of the blockState
      state - the blockState related to the pos list
      tag - the nbt tag that is related to the blockState
    • CompoundBlockList

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

      public CompoundBlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state, @Nullable @Nullable net.minecraft.nbt.NbtCompound tag)
      init a CompoundBlockList
      Parameters:
      pos - pos of the blockState
      state - the blockState related to the pos list
      tag - the nbt tag that is related to the blockState
  • Method Details

    • 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
    • place

      public void place(net.minecraft.world.StructureWorldAccess world, int index)
      method to place the Block related to the index
      Overrides:
      place in class DefaultBlockList
      Parameters:
      world - the world the block will be placed
      index - the index of the BlockPos
    • placeWithDeletion

      public void placeWithDeletion(net.minecraft.world.StructureWorldAccess world, int index)
      method to place the block with the deletion of the BlockPos
      Overrides:
      placeWithDeletion in class DefaultBlockList
      Parameters:
      world - the world the block will be placed
      index - the index of the block
    • placeWithVerification

      public boolean placeWithVerification(net.minecraft.world.StructureWorldAccess world, int index)
      Method to place the block related to the index. The method also performs verification to know if the block can be placed.
      Overrides:
      placeWithVerification in class DefaultBlockList
      Parameters:
      world - the world the block will be placed
      index - the index of the block
      Returns:
      true if the block was placed, false if not
    • placeWithVerificationDeletion

      public boolean placeWithVerificationDeletion(net.minecraft.world.StructureWorldAccess world, int index)
      Method to place the block with the deletion of the BlockPos The method also performs verification to know if the block can be placed.
      Overrides:
      placeWithVerificationDeletion in class DefaultBlockList
      Parameters:
      world - the world the block will be placed
      index - the index of the block
      Returns:
      true if the block was placed, false if not
    • placeFirst

      public void placeFirst(net.minecraft.world.StructureWorldAccess world)
      method to place the first Block
      Overrides:
      placeFirst in class DefaultBlockList
      Parameters:
      world - the world the block will be placed
    • placeFirstWithDeletion

      public void placeFirstWithDeletion(net.minecraft.world.StructureWorldAccess world)
      Method to place the first Block and deleting it. You shouldn't use this method in normal case since that the method is pretty costly O(n). Use instead placeLastWithDeletion() that is faster O(1).
      Overrides:
      placeFirstWithDeletion in class DefaultBlockList
      Parameters:
      world - the world where the block will be placed
    • placeFirstWithVerification

      public boolean placeFirstWithVerification(net.minecraft.world.StructureWorldAccess world)
      Method to place the first Block.

      The method also performs verification to know if the block can be placed.

      Overrides:
      placeFirstWithVerification in class DefaultBlockList
      Parameters:
      world - the world where the block will be placed
      Returns:
      true if the block was placed, false if not.
    • placeFirstWithVerificationDeletion

      public boolean placeFirstWithVerificationDeletion(net.minecraft.world.StructureWorldAccess world)

      Method to place the first Block and deleting it.

      The method also performs verification to know if the block can be placed.

      You shouldn't use this method in normal case since that the method is pretty costly O(n).

      Use instead placeLastWithDeletion() that is faster O(1).

      Overrides:
      placeFirstWithVerificationDeletion in class DefaultBlockList
      Parameters:
      world - the world where the block will be placed
      Returns:
      true if the block was placed, false if not.
    • placeLastWithDeletion

      public void placeLastWithDeletion(net.minecraft.world.StructureWorldAccess world)
      Method to place the last Block of the comparator and removing it then. Consider using this method because it gives you better performance.
      Overrides:
      placeLastWithDeletion in class DefaultBlockList
      Parameters:
      world - the world the last block will be placed
    • placeLast

      public void placeLast(net.minecraft.world.StructureWorldAccess world)
      Method to place the last Block of the comparator.
      Overrides:
      placeLast in class DefaultBlockList
      Parameters:
      world - the world the last block will be placed
    • placeLastWithVerification

      public boolean placeLastWithVerification(net.minecraft.world.StructureWorldAccess world)
      Method to place the last Block.
      Overrides:
      placeLastWithVerification in class DefaultBlockList
      Parameters:
      world - the world the last block will be placed The method also performs verification to know if the block can be placed.
      Returns:
      true if the block was placed, false if not
    • placeLastWithVerificationDeletion

      public boolean placeLastWithVerificationDeletion(net.minecraft.world.StructureWorldAccess world)
      Method to place the last Block of the comparator and removing it then. The method also performs verification to know if the block can be placed. Consider using this method because it gives you better performance.
      Overrides:
      placeLastWithVerificationDeletion in class DefaultBlockList
      Parameters:
      world - the world the last block will be placed
      Returns:
      true if the block was placed, false if not