java.lang.Object
net.rodofire.easierworldcreator.structure.NbtPlacer

public class NbtPlacer extends Object
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

    Constructors
    Constructor
    Description
    NbtPlacer(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.Identifier templateName)
    init a NbtPlacer
    NbtPlacer(net.minecraft.world.StructureWorldAccess world, net.minecraft.util.Identifier templateName, StructurePlaceAnimator animator)
    init a NbtPlacer
  • Method Summary

    Modifier and Type
    Method
    Description
    method to get the animator of the object
    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
    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, boolean force, Set<net.minecraft.block.Block> blockToForce, Set<net.minecraft.block.Block> blockToSkip)
    this method allows you to place a structure in the world during world gen or not
    void
    place(net.minecraft.util.math.BlockPos pos)
    this method allows you to place a structure in the world during world gen or not
    void
    method to change the animator

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 in
      templateName - 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 in
      templateName - the identifier of the structure
      animator - the animation of the structure place
  • Method Details

    • getAnimator

      public StructurePlaceAnimator getAnimator()
      method to get the animator of the object
      Returns:
      the animator of the object
    • setAnimator

      public void setAnimator(StructurePlaceAnimator animator)
      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 1f
      pos - the pos of the structure
      offset - the offset of the pos structure
      mirror - the block mirror if wanted
      rotation - the structure rotation if wanted
      ignoreEntities - ignore entities 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, boolean force, Set<net.minecraft.block.Block> blockToForce, Set<net.minecraft.block.Block> blockToSkip)
      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 1f
      pos - the pos of the structure
      offset - the offset of the pos structure
      mirror - the block mirror if wanted
      rotation - the structure rotation if wanted
      ignoreEntities - ignore entities of the structure
      force - determines if each block has to replace the already existing block if it exists
      blockToForce - set of block that the structure can still force in the case force = false
      blockToSkip - the list of blocks to skip during the pos