Class BlockList
java.lang.Object
net.rodofire.easierworldcreator.shapeutil.BlockList
class used for the generation or the modification of a NBT file
this is an easier version of the
StructureTemplate.StructureBlockInfo-
Constructor Summary
ConstructorsConstructorDescriptioninit a blockListBlockList(List<net.minecraft.util.math.BlockPos> poslist, net.minecraft.block.BlockState state, @Nullable net.minecraft.nbt.NbtCompound tag) init a BlockListBlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state) init a BlockListBlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state, net.minecraft.nbt.NbtCompound tag) init a BlockList -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlockPos(List<net.minecraft.util.math.BlockPos> pos) allow you to add multiple BlockPos to the existing listvoidaddBlockPos(net.minecraft.util.math.BlockPos pos) allow you to add a BlockPos to the existing listnet.minecraft.block.BlockStateused to get the blockStateList<net.minecraft.util.math.BlockPos> used to get the list of blockPos related to a layernet.minecraft.nbt.NbtCompoundgetTag()used to get the NBT tag of the specified NBTvoidremoveBlockPos(List<net.minecraft.util.math.BlockPos> pos) allow you to remove a list of BlockPos to the existing listvoidremoveBlockPos(net.minecraft.util.math.BlockPos pos) allow you to remove a BlockPos to the existing listvoidsetBlockstate(net.minecraft.block.BlockState blockstate) change the blockState of the BlockListvoidsetPoslist(List<net.minecraft.util.math.BlockPos> poslist) It uses a list of blockPos to allow multiple BlockPos to have a BlockStatevoidsetTag(net.minecraft.nbt.NbtCompound tag) allow you to change the tag of the relatedBlocktoString()
-
Constructor Details
-
BlockList
public BlockList(net.minecraft.util.math.BlockPos pos, net.minecraft.block.BlockState state) init a BlockList- Parameters:
pos- pos of the blockStatestate- 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 blockStatestate- the blockState related to the pos listtag- 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 blockStatestate- 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 blockStatestate- the blockState related to the postag- the nbt of the block if it has an nbt
-
-
Method Details
-
getPoslist
used to get the list of blockPos related to a layer- Returns:
- the list of BlockPos
-
setPoslist
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
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
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
-