Interface IBlueprintDataProviderBE

All Known Implementing Classes:
BlockEntityTagSubstitution

public interface IBlueprintDataProviderBE
Interface for TE's which hold schematic specific data. They need to write and read the data to nbt to save it!
  • Field Details

  • Method Details

    • getSchematicName

      String getSchematicName()
      Gets the schematic name, required to be saved
      Returns:
      schematic name
    • setSchematicName

      void setSchematicName(String name)
      Sets the schematic name
      Parameters:
      name - name to set
    • getPositionedTags

      Map<net.minecraft.core.BlockPos,List<String>> getPositionedTags()
      Gets the map of blockpos and its applied tags. Positions are relative to the anchorpos, use pos + anchor bos to obtain real world coords.
      Returns:
      tagPosMap
    • setPositionedTags

      void setPositionedTags(Map<net.minecraft.core.BlockPos,List<String>> positionedTags)
      Sets the map of positioned tags.
      Parameters:
      positionedTags - tag map
    • getSchematicCorners

      net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> getSchematicCorners()
      Gets the schematics corner positions, default is anchor Pos
    • getInWorldCorners

      default net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> getInWorldCorners()
      Gets world positions
    • setSchematicCorners

      void setSchematicCorners(net.minecraft.core.BlockPos pos1, net.minecraft.core.BlockPos pos2)
      Sets the schematics corner positions
      Parameters:
      pos1 - first pos
      pos2 - second pos
    • writeSchematicDataToNBT

      default void writeSchematicDataToNBT(net.minecraft.nbt.CompoundTag originalCompound)
      Default write to nbt
    • writeMapToCompound

      static void writeMapToCompound(net.minecraft.nbt.CompoundTag compoundNBT, Map<net.minecraft.core.BlockPos,List<String>> tagPosMap)
      Writes the given tag pos map to nbt
      Parameters:
      compoundNBT - compound to write to
      tagPosMap - map to write
    • readSchematicDataFromNBT

      default void readSchematicDataFromNBT(net.minecraft.nbt.CompoundTag originalCompound)
      Default read schematic data from nbt
    • readTagPosMapFrom

      static Map<net.minecraft.core.BlockPos,List<String>> readTagPosMapFrom(net.minecraft.nbt.CompoundTag compoundNBT)
      Reads the tagPosmap from nbt
      Parameters:
      compoundNBT - compound to read from
      Returns:
      map of positions and tags
    • removeTag

      default void removeTag(net.minecraft.core.BlockPos pos, String tag)
      Removes a tag from the data
      Parameters:
      tag - to remove
    • addTag

      default void addTag(net.minecraft.core.BlockPos pos, String tag)
      Removes a tag from the data
      Parameters:
      tag - to remove
    • getWorldTagPosMap

      default Map<net.minecraft.core.BlockPos,List<String>> getWorldTagPosMap()
      Gets the tag pos map with real world coords
      Returns:
      the tag pos map with current world coords
    • getWorldTagNamePosMap

      default Map<String,Set<net.minecraft.core.BlockPos>> getWorldTagNamePosMap()
      Gets the tag name to positions map
      Returns:
      the tag pos map with current world coords
    • getRealWorldPos

      default net.minecraft.core.BlockPos getRealWorldPos(net.minecraft.core.BlockPos relativePos)
      Converts a relative pos to its real world pos
      Parameters:
      relativePos -
      Returns:
    • getTilePos

      net.minecraft.core.BlockPos getTilePos()
      Gets the TE's world position
      Returns:
      position
    • getUpdatePacket

      net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()
      Gets the update packet, needed for initial placement through schematic paste
      Returns:
      client update packet
    • setBlueprintPath

      void setBlueprintPath(String filePath)
      Set the blueprint path in the provider.
      Parameters:
      filePath - the path where the blueprint of this file was loaded from within a pack.
    • setPackName

      void setPackName(String packName)
      Set the pack this blueprint belongs to.
      Parameters:
      packName - the pack.
    • getPackName

      String getPackName()
      Get the pack name.
      Returns:
      the pack name.
    • getBlueprintPath

      String getBlueprintPath()
      Getter for the blueprint path.
      Returns:
      the pack name.