Class FabricDataOutput
java.lang.Object
net.minecraft.data.DataOutput
net.fabricmc.fabric.api.datagen.v1.FabricDataOutput
Extends
DataOutput
to keep track of the ModContainer
that it originated from.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.data.DataOutput
DataOutput.OutputType, DataOutput.PathResolver
-
Constructor Summary
ConstructorDescriptionFabricDataOutput
(net.fabricmc.loader.api.ModContainer modContainer, Path path, boolean strictValidation) -
Method Summary
Modifier and TypeMethodDescriptionnet.fabricmc.loader.api.ModContainer
Returns theModContainer
for the mod that this data generator has been created for.getModId()
Returns the mod ID for the mod that this data generator has been created for.boolean
When enabled data providers can do strict validation to ensure that all entries have data generated for them.Methods inherited from class net.minecraft.data.DataOutput
getPath, getResolver, getResolver, getTagResolver, resolvePath
-
Constructor Details
-
FabricDataOutput
@Internal public FabricDataOutput(net.fabricmc.loader.api.ModContainer modContainer, Path path, boolean strictValidation)
-
-
Method Details
-
getModContainer
public net.fabricmc.loader.api.ModContainer getModContainer()Returns theModContainer
for the mod that this data generator has been created for.- Returns:
- a
ModContainer
instance
-
getModId
Returns the mod ID for the mod that this data generator has been created for.- Returns:
- a mod ID
-
isStrictValidationEnabled
public boolean isStrictValidationEnabled()When enabled data providers can do strict validation to ensure that all entries have data generated for them.- Returns:
- if strict validation should be enabled
-