Class TemplateSource
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.loader.TemplateSource
- Direct Known Subclasses:
DirectoryTemplateSource, ResourceManagerTemplateSource
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTemplateSource(DataFixer fixerUpper, HolderGetter<Block> blockLookup) -
Method Summary
Modifier and TypeMethodDescriptionabstract Stream<Identifier> list()abstract Optional<StructureTemplate> load(Identifier id) protected Optional<StructureTemplate> load(IoSupplier<InputStream> opener, boolean asText, Consumer<Throwable> onError) private static CompoundTagreadStructure(InputStream input) private StructureTemplatereadStructure(CompoundTag tag) private static CompoundTagreadTextStructure(InputStream input)
-
Field Details
-
fixerUpper
-
blockLookup
-
-
Constructor Details
-
TemplateSource
-
-
Method Details
-
load
-
list
-
load
protected Optional<StructureTemplate> load(IoSupplier<InputStream> opener, boolean asText, Consumer<Throwable> onError) -
readStructure
- Throws:
IOException
-
readTextStructure
private static CompoundTag readTextStructure(InputStream input) throws IOException, CommandSyntaxException - Throws:
IOExceptionCommandSyntaxException
-
readStructure
-