Class StructureMap

java.lang.Object
net.notcoded.codelib.util.world.structure.StructureMap

@Environment(SERVER) public class StructureMap extends Object
Uses Structure Blocks to paste a map using /setblock.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
     
    boolean
     
    net.minecraft.resources.ResourceLocation
     
    net.minecraft.core.BlockPos
     
    net.minecraft.core.BlockPos
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    StructureMap(net.minecraft.resources.ResourceLocation structureId, Rotation rotation, boolean cleanUp)
     
    StructureMap(net.minecraft.resources.ResourceLocation structureId, Rotation rotation, boolean cleanUp, net.minecraft.core.BlockPos placePos, net.minecraft.core.BlockPos pastePos, boolean forceLoad)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    pasteMap(net.minecraft.server.level.ServerLevel level)
    Pastes a map with some pre-set parameters.
    void
    pasteMap(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos placePos, net.minecraft.core.BlockPos pastePos, boolean forceLoad)
    Pastes a map.
    returnCommand(net.minecraft.server.level.ServerLevel level)
    Returns a command which you can use in the console.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • id

      public net.minecraft.resources.ResourceLocation id
    • rotation

      public Rotation rotation
    • cleanUp

      public boolean cleanUp
    • placePos

      public net.minecraft.core.BlockPos placePos
    • pastePos

      public net.minecraft.core.BlockPos pastePos
    • forceLoad

      public boolean forceLoad
  • Constructor Details

    • StructureMap

      public StructureMap(net.minecraft.resources.ResourceLocation structureId, Rotation rotation, boolean cleanUp)
    • StructureMap

      public StructureMap(net.minecraft.resources.ResourceLocation structureId, Rotation rotation, boolean cleanUp, net.minecraft.core.BlockPos placePos, net.minecraft.core.BlockPos pastePos, boolean forceLoad)
  • Method Details

    • pasteMap

      public void pasteMap(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos placePos, net.minecraft.core.BlockPos pastePos, boolean forceLoad)
      Pastes a map.
      Parameters:
      level - The level where is going to get pasted in.
      placePos - Where the structure block is going to get placed in.
      pastePos - Where the map is going to get pasted in.
      forceLoad - If the chunk should get force loaded.
    • pasteMap

      public void pasteMap(net.minecraft.server.level.ServerLevel level)
      Pastes a map with some pre-set parameters.
      Parameters:
      level - The level where is going to get pasted in.
    • returnCommand

      public String returnCommand(net.minecraft.server.level.ServerLevel level)
      Returns a command which you can use in the console.
      Parameters:
      level - The level where is going to get pasted in.
      Returns:
      The command (/setblock ...).