Package net.minecraft.data
Class AdvancementProvider
java.lang.Object
net.minecraft.data.AdvancementProvider
- All Implemented Interfaces:
IDataProvider
- Direct Known Subclasses:
DataGeneratorTest.Advancements
-
Field Summary
Modifier and TypeFieldDescriptionprotected ExistingFileHelper
private final DataGenerator
private static final com.google.gson.Gson
private static final org.apache.logging.log4j.Logger
private final List<Consumer<Consumer<Advancement>>>
Fields inherited from interface net.minecraft.data.IDataProvider
SHA1
-
Constructor Summary
ConstructorDescriptionAdvancementProvider
(DataGenerator p_i48869_1_) Deprecated.AdvancementProvider
(DataGenerator generatorIn, ExistingFileHelper fileHelperIn) -
Method Summary
Modifier and TypeMethodDescriptionprivate static Path
createPath
(Path p_218428_0_, Advancement p_218428_1_) getName()
protected void
registerAdvancements
(Consumer<Advancement> consumer, ExistingFileHelper fileHelper) Override this method for registering and generating customAdvancement
s.void
run
(DirectoryCache p_200398_1_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
GSON
private static final com.google.gson.Gson GSON -
generator
-
tabs
-
fileHelper
-
-
Constructor Details
-
AdvancementProvider
Deprecated. -
AdvancementProvider
-
-
Method Details
-
run
- Specified by:
run
in interfaceIDataProvider
- Throws:
IOException
-
registerAdvancements
Override this method for registering and generating customAdvancement
s.Just use
Advancement.Builder
to build your Advancements, you don't need an extra consumer like the vanilla classes.- Parameters:
consumer
- used for the register function fromAdvancement.Builder
fileHelper
- used for the register function fromAdvancement.Builder
-
createPath
-
getName
- Specified by:
getName
in interfaceIDataProvider
-