Class NbtPlacer
java.lang.Object
net.rodofire.easierworldcreator.structure.NbtPlacer
Class to place nbt structures in the world. To use a NbtPlacer, you can use this code:
NbtPlacer placer = new NbtPlacer(world, new Identifier("Path_of_your_structure"));
placer.place(pos)
-
Constructor Summary
ConstructorsConstructorDescriptionNbtPlacer(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.Identifier templateName) init a NbtPlacerNbtPlacer(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.Identifier templateName, StructurePlaceAnimator animator) init a NbtPlacer -
Method Summary
Modifier and TypeMethodDescriptionget(float integrity, net.minecraft.util.math.BlockPos pos, net.minecraft.util.math.BlockPos offset, net.minecraft.util.BlockMirror mirror, net.minecraft.util.BlockRotation rotation, boolean ignoreEntities) method to get aBlockListManagerbased on a structuremethod to get the animator of the objectvoidplace(float integrity, net.minecraft.util.math.BlockPos pos, net.minecraft.util.math.BlockPos offset, net.minecraft.util.BlockMirror mirror, net.minecraft.util.BlockRotation rotation, boolean ignoreEntities) this method allows you to place a structure in the world during world gen or notvoidplace(net.minecraft.util.math.BlockPos pos) this method allows you to place a structure in the world during world gen or notvoidsetAnimator(StructurePlaceAnimator animator) method to change the animator
-
Constructor Details
-
NbtPlacer
public NbtPlacer(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.Identifier templateName) init a NbtPlacer- Parameters:
world- the world the structure will spawn intemplateName- the identifier of the structure
-
NbtPlacer
public NbtPlacer(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.Identifier templateName, StructurePlaceAnimator animator) init a NbtPlacer- Parameters:
world- the world the structure will spawn intemplateName- the identifier of the structureanimator- the animation of the structure place
-
-
Method Details
-
getAnimator
method to get the animator of the object- Returns:
- the animator of the object
-
setAnimator
method to change the animator- Parameters:
animator- the animator that will be changed
-
place
public void place(net.minecraft.util.math.BlockPos pos) this method allows you to place a structure in the world during world gen or not- Parameters:
pos- the pos of the structure
-
place
public void place(float integrity, net.minecraft.util.math.BlockPos pos, net.minecraft.util.math.BlockPos offset, net.minecraft.util.BlockMirror mirror, net.minecraft.util.BlockRotation rotation, boolean ignoreEntities) this method allows you to place a structure in the world during world gen or not- Parameters:
integrity- the integrity of the structure must be between 0f and 1fpos- the pos of the structureoffset- the offset of the pos structuremirror- the block mirror if wantedrotation- the structure rotation if wantedignoreEntities- ignore entities of the structure
-
get
public BlockListManager get(float integrity, net.minecraft.util.math.BlockPos pos, net.minecraft.util.math.BlockPos offset, net.minecraft.util.BlockMirror mirror, net.minecraft.util.BlockRotation rotation, boolean ignoreEntities) method to get aBlockListManagerbased on a structure- Parameters:
integrity- the integrity of the structure must be between 0f and 1fpos- the pos of the structureoffset- the offset of the pos structuremirror- the block mirror if wantedrotation- the structure rotation if wantedignoreEntities- ignore entities of the structure- Returns:
- the Structure converted into
BlockListManager
-