Class StructureTemplateManager

java.lang.Object
net.minecraft.structure.StructureTemplateManager

public class StructureTemplateManager extends Object
Mappings:
Namespace Name
official dsi
intermediary net/minecraft/class_3485
named net/minecraft/structure/StructureTemplateManager
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a:Lorg/slf4j/Logger;
      intermediary field_15514 Lnet/minecraft/class_3485;field_15514:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/structure/StructureTemplateManager;LOGGER:Lorg/slf4j/Logger;
    • STRUCTURES_DIRECTORY

      private static final String STRUCTURES_DIRECTORY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Ldsi;b:Ljava/lang/String;
      intermediary field_31684 Lnet/minecraft/class_3485;field_31684:Ljava/lang/String;
      named STRUCTURES_DIRECTORY Lnet/minecraft/structure/StructureTemplateManager;STRUCTURES_DIRECTORY:Ljava/lang/String;
    • GAME_TEST_STRUCTURES_DIRECTORY

      private static final String GAME_TEST_STRUCTURES_DIRECTORY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official c Ldsi;c:Ljava/lang/String;
      intermediary field_39416 Lnet/minecraft/class_3485;field_39416:Ljava/lang/String;
      named GAME_TEST_STRUCTURES_DIRECTORY Lnet/minecraft/structure/StructureTemplateManager;GAME_TEST_STRUCTURES_DIRECTORY:Ljava/lang/String;
    • NBT_FILE_EXTENSION

      private static final String NBT_FILE_EXTENSION
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Ldsi;d:Ljava/lang/String;
      intermediary field_31685 Lnet/minecraft/class_3485;field_31685:Ljava/lang/String;
      named NBT_FILE_EXTENSION Lnet/minecraft/structure/StructureTemplateManager;NBT_FILE_EXTENSION:Ljava/lang/String;
    • SNBT_FILE_EXTENSION

      private static final String SNBT_FILE_EXTENSION
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Ldsi;e:Ljava/lang/String;
      intermediary field_31686 Lnet/minecraft/class_3485;field_31686:Ljava/lang/String;
      named SNBT_FILE_EXTENSION Lnet/minecraft/structure/StructureTemplateManager;SNBT_FILE_EXTENSION:Ljava/lang/String;
    • NBT_FINDER

      private static final ResourceFinder NBT_FINDER
      Mappings:
      Namespace Name Mixin selector
      official l Ldsi;l:Laby;
      intermediary field_40370 Lnet/minecraft/class_3485;field_40370:Lnet/minecraft/class_7654;
      named NBT_FINDER Lnet/minecraft/structure/StructureTemplateManager;NBT_FINDER:Lnet/minecraft/resource/ResourceFinder;
    • templates

      private final Map<Identifier,Optional<StructureTemplate>> templates
      Mappings:
      Namespace Name Mixin selector
      official f Ldsi;f:Ljava/util/Map;
      intermediary field_15513 Lnet/minecraft/class_3485;field_15513:Ljava/util/Map;
      named templates Lnet/minecraft/structure/StructureTemplateManager;templates:Ljava/util/Map;
    • dataFixer

      private final com.mojang.datafixers.DataFixer dataFixer
      Mappings:
      Namespace Name Mixin selector
      official g Ldsi;g:Lcom/mojang/datafixers/DataFixer;
      intermediary field_15515 Lnet/minecraft/class_3485;field_15515:Lcom/mojang/datafixers/DataFixer;
      named dataFixer Lnet/minecraft/structure/StructureTemplateManager;dataFixer:Lcom/mojang/datafixers/DataFixer;
    • resourceManager

      private ResourceManager resourceManager
      Mappings:
      Namespace Name Mixin selector
      official h Ldsi;h:Lake;
      intermediary field_25189 Lnet/minecraft/class_3485;field_25189:Lnet/minecraft/class_3300;
      named resourceManager Lnet/minecraft/structure/StructureTemplateManager;resourceManager:Lnet/minecraft/resource/ResourceManager;
    • generatedPath

      private final Path generatedPath
      Mappings:
      Namespace Name Mixin selector
      official i Ldsi;i:Ljava/nio/file/Path;
      intermediary field_15512 Lnet/minecraft/class_3485;field_15512:Ljava/nio/file/Path;
      named generatedPath Lnet/minecraft/structure/StructureTemplateManager;generatedPath:Ljava/nio/file/Path;
    • providers

      private final List<StructureTemplateManager.Provider> providers
      Mappings:
      Namespace Name Mixin selector
      official j Ldsi;j:Ljava/util/List;
      intermediary field_39417 Lnet/minecraft/class_3485;field_39417:Ljava/util/List;
      named providers Lnet/minecraft/structure/StructureTemplateManager;providers:Ljava/util/List;
    • blockLookup

      private final RegistryEntryLookup<Block> blockLookup
      Mappings:
      Namespace Name Mixin selector
      official k Ldsi;k:Lha;
      intermediary field_40369 Lnet/minecraft/class_3485;field_40369:Lnet/minecraft/class_7871;
      named blockLookup Lnet/minecraft/structure/StructureTemplateManager;blockLookup:Lnet/minecraft/registry/RegistryEntryLookup;
  • Constructor Details

    • StructureTemplateManager

      public StructureTemplateManager(ResourceManager resourceManager, LevelStorage.Session session, com.mojang.datafixers.DataFixer dataFixer, RegistryEntryLookup<Block> blockLookup)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldsi;<init>(Lake;Ldve$c;Lcom/mojang/datafixers/DataFixer;Lha;)V
      intermediary <init> Lnet/minecraft/class_3485;<init>(Lnet/minecraft/class_3300;Lnet/minecraft/class_32$class_5143;Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/class_7871;)V
      named <init> Lnet/minecraft/structure/StructureTemplateManager;<init>(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/world/level/storage/LevelStorage$Session;Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/registry/RegistryEntryLookup;)V
  • Method Details

    • getTemplateOrBlank

      public StructureTemplate getTemplateOrBlank(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Lacf;)Ldsh;
      intermediary method_15091 Lnet/minecraft/class_3485;method_15091(Lnet/minecraft/class_2960;)Lnet/minecraft/class_3499;
      named getTemplateOrBlank Lnet/minecraft/structure/StructureTemplateManager;getTemplateOrBlank(Lnet/minecraft/util/Identifier;)Lnet/minecraft/structure/StructureTemplate;
    • getTemplate

      public Optional<StructureTemplate> getTemplate(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official b Ldsi;b(Lacf;)Ljava/util/Optional;
      intermediary method_15094 Lnet/minecraft/class_3485;method_15094(Lnet/minecraft/class_2960;)Ljava/util/Optional;
      named getTemplate Lnet/minecraft/structure/StructureTemplateManager;getTemplate(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
    • streamTemplates

      public Stream<Identifier> streamTemplates()
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a()Ljava/util/stream/Stream;
      intermediary method_44226 Lnet/minecraft/class_3485;method_44226()Ljava/util/stream/Stream;
      named streamTemplates Lnet/minecraft/structure/StructureTemplateManager;streamTemplates()Ljava/util/stream/Stream;
    • loadTemplate

      private Optional<StructureTemplate> loadTemplate(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official e Ldsi;e(Lacf;)Ljava/util/Optional;
      intermediary method_44245 Lnet/minecraft/class_3485;method_44245(Lnet/minecraft/class_2960;)Ljava/util/Optional;
      named loadTemplate Lnet/minecraft/structure/StructureTemplateManager;loadTemplate(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
    • setResourceManager

      public void setResourceManager(ResourceManager resourceManager)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Lake;)V
      intermediary method_29300 Lnet/minecraft/class_3485;method_29300(Lnet/minecraft/class_3300;)V
      named setResourceManager Lnet/minecraft/structure/StructureTemplateManager;setResourceManager(Lnet/minecraft/resource/ResourceManager;)V
    • loadTemplateFromResource

      private Optional<StructureTemplate> loadTemplateFromResource(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official f Ldsi;f(Lacf;)Ljava/util/Optional;
      intermediary method_15088 Lnet/minecraft/class_3485;method_15088(Lnet/minecraft/class_2960;)Ljava/util/Optional;
      named loadTemplateFromResource Lnet/minecraft/structure/StructureTemplateManager;loadTemplateFromResource(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
    • streamTemplatesFromResource

      private Stream<Identifier> streamTemplatesFromResource()
      Mappings:
      Namespace Name Mixin selector
      official b Ldsi;b()Ljava/util/stream/Stream;
      intermediary method_44239 Lnet/minecraft/class_3485;method_44239()Ljava/util/stream/Stream;
      named streamTemplatesFromResource Lnet/minecraft/structure/StructureTemplateManager;streamTemplatesFromResource()Ljava/util/stream/Stream;
    • loadTemplateFromGameTestFile

      private Optional<StructureTemplate> loadTemplateFromGameTestFile(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official g Ldsi;g(Lacf;)Ljava/util/Optional;
      intermediary method_44246 Lnet/minecraft/class_3485;method_44246(Lnet/minecraft/class_2960;)Ljava/util/Optional;
      named loadTemplateFromGameTestFile Lnet/minecraft/structure/StructureTemplateManager;loadTemplateFromGameTestFile(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
    • streamTemplatesFromGameTestFile

      private Stream<Identifier> streamTemplatesFromGameTestFile()
      Mappings:
      Namespace Name Mixin selector
      official c Ldsi;c()Ljava/util/stream/Stream;
      intermediary method_44241 Lnet/minecraft/class_3485;method_44241()Ljava/util/stream/Stream;
      named streamTemplatesFromGameTestFile Lnet/minecraft/structure/StructureTemplateManager;streamTemplatesFromGameTestFile()Ljava/util/stream/Stream;
    • loadTemplateFromFile

      private Optional<StructureTemplate> loadTemplateFromFile(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official h Ldsi;h(Lacf;)Ljava/util/Optional;
      intermediary method_15092 Lnet/minecraft/class_3485;method_15092(Lnet/minecraft/class_2960;)Ljava/util/Optional;
      named loadTemplateFromFile Lnet/minecraft/structure/StructureTemplateManager;loadTemplateFromFile(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
    • streamTemplatesFromFile

      private Stream<Identifier> streamTemplatesFromFile()
      Mappings:
      Namespace Name Mixin selector
      official d Ldsi;d()Ljava/util/stream/Stream;
      intermediary method_44243 Lnet/minecraft/class_3485;method_44243()Ljava/util/stream/Stream;
      named streamTemplatesFromFile Lnet/minecraft/structure/StructureTemplateManager;streamTemplatesFromFile()Ljava/util/stream/Stream;
    • streamTemplates

      private Stream<Identifier> streamTemplates(Path namespaceDirectory)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
      intermediary method_44235 Lnet/minecraft/class_3485;method_44235(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
      named streamTemplates Lnet/minecraft/structure/StructureTemplateManager;streamTemplates(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
    • streamTemplates

      private Stream<Identifier> streamTemplates(Path structuresDirectoryPath, String namespace, String extension)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;)Ljava/util/stream/Stream;
      intermediary method_44236 Lnet/minecraft/class_3485;method_44236(Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;)Ljava/util/stream/Stream;
      named streamTemplates Lnet/minecraft/structure/StructureTemplateManager;streamTemplates(Ljava/nio/file/Path;Ljava/lang/String;Ljava/lang/String;)Ljava/util/stream/Stream;
    • toRelativePath

      private String toRelativePath(Path root, Path path)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Ljava/nio/file/Path;Ljava/nio/file/Path;)Ljava/lang/String;
      intermediary method_44238 Lnet/minecraft/class_3485;method_44238(Ljava/nio/file/Path;Ljava/nio/file/Path;)Ljava/lang/String;
      named toRelativePath Lnet/minecraft/structure/StructureTemplateManager;toRelativePath(Ljava/nio/file/Path;Ljava/nio/file/Path;)Ljava/lang/String;
    • loadTemplateFromSnbt

      private Optional<StructureTemplate> loadTemplateFromSnbt(Identifier id, Path path)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Lacf;Ljava/nio/file/Path;)Ljava/util/Optional;
      intermediary method_44230 Lnet/minecraft/class_3485;method_44230(Lnet/minecraft/class_2960;Ljava/nio/file/Path;)Ljava/util/Optional;
      named loadTemplateFromSnbt Lnet/minecraft/structure/StructureTemplateManager;loadTemplateFromSnbt(Lnet/minecraft/util/Identifier;Ljava/nio/file/Path;)Ljava/util/Optional;
    • loadTemplate

      private Optional<StructureTemplate> loadTemplate(StructureTemplateManager.TemplateFileOpener opener, Consumer<Throwable> exceptionConsumer)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Ldsi$a;Ljava/util/function/Consumer;)Ljava/util/Optional;
      intermediary method_44231 Lnet/minecraft/class_3485;method_44231(Lnet/minecraft/class_3485$class_7513;Ljava/util/function/Consumer;)Ljava/util/Optional;
      named loadTemplate Lnet/minecraft/structure/StructureTemplateManager;loadTemplate(Lnet/minecraft/structure/StructureTemplateManager$TemplateFileOpener;Ljava/util/function/Consumer;)Ljava/util/Optional;
    • readTemplate

      private StructureTemplate readTemplate(InputStream templateIInputStream) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Ljava/io/InputStream;)Ldsh;
      intermediary method_15090 Lnet/minecraft/class_3485;method_15090(Ljava/io/InputStream;)Lnet/minecraft/class_3499;
      named readTemplate Lnet/minecraft/structure/StructureTemplateManager;readTemplate(Ljava/io/InputStream;)Lnet/minecraft/structure/StructureTemplate;
    • createTemplate

      public StructureTemplate createTemplate(NbtCompound nbt)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Lqp;)Ldsh;
      intermediary method_21891 Lnet/minecraft/class_3485;method_21891(Lnet/minecraft/class_2487;)Lnet/minecraft/class_3499;
      named createTemplate Lnet/minecraft/structure/StructureTemplateManager;createTemplate(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/structure/StructureTemplate;
    • saveTemplate

      public boolean saveTemplate(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official c Ldsi;c(Lacf;)Z
      intermediary method_15093 Lnet/minecraft/class_3485;method_15093(Lnet/minecraft/class_2960;)Z
      named saveTemplate Lnet/minecraft/structure/StructureTemplateManager;saveTemplate(Lnet/minecraft/util/Identifier;)Z
    • getTemplatePath

      public Path getTemplatePath(Identifier id, String extension)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Lacf;Ljava/lang/String;)Ljava/nio/file/Path;
      intermediary method_44228 Lnet/minecraft/class_3485;method_44228(Lnet/minecraft/class_2960;Ljava/lang/String;)Ljava/nio/file/Path;
      named getTemplatePath Lnet/minecraft/structure/StructureTemplateManager;getTemplatePath(Lnet/minecraft/util/Identifier;Ljava/lang/String;)Ljava/nio/file/Path;
    • getTemplatePath

      public static Path getTemplatePath(Path path, Identifier id, String extension)
      Mappings:
      Namespace Name Mixin selector
      official a Ldsi;a(Ljava/nio/file/Path;Lacf;Ljava/lang/String;)Ljava/nio/file/Path;
      intermediary method_15085 Lnet/minecraft/class_3485;method_15085(Ljava/nio/file/Path;Lnet/minecraft/class_2960;Ljava/lang/String;)Ljava/nio/file/Path;
      named getTemplatePath Lnet/minecraft/structure/StructureTemplateManager;getTemplatePath(Ljava/nio/file/Path;Lnet/minecraft/util/Identifier;Ljava/lang/String;)Ljava/nio/file/Path;
    • getAndCheckTemplatePath

      private static Path getAndCheckTemplatePath(Path path, Identifier id, String extension)
      Mappings:
      Namespace Name Mixin selector
      official b Ldsi;b(Ljava/nio/file/Path;Lacf;Ljava/lang/String;)Ljava/nio/file/Path;
      intermediary method_15086 Lnet/minecraft/class_3485;method_15086(Ljava/nio/file/Path;Lnet/minecraft/class_2960;Ljava/lang/String;)Ljava/nio/file/Path;
      named getAndCheckTemplatePath Lnet/minecraft/structure/StructureTemplateManager;getAndCheckTemplatePath(Ljava/nio/file/Path;Lnet/minecraft/util/Identifier;Ljava/lang/String;)Ljava/nio/file/Path;
    • unloadTemplate

      public void unloadTemplate(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      official d Ldsi;d(Lacf;)V
      intermediary method_15087 Lnet/minecraft/class_3485;method_15087(Lnet/minecraft/class_2960;)V
      named unloadTemplate Lnet/minecraft/structure/StructureTemplateManager;unloadTemplate(Lnet/minecraft/util/Identifier;)V