Package info.u_team.u_team_core.data
Record Class GenerationData
java.lang.Object
java.lang.Record
info.u_team.u_team_core.data.GenerationData
-
Constructor Summary
ConstructorsConstructorDescriptionGenerationData
(String modid, net.minecraft.data.DataGenerator generator, net.minecraftforge.common.data.ExistingFileHelper existingFileHelper) Creates an instance of aGenerationData
record class.GenerationData
(String modid, net.minecraftforge.data.event.GatherDataEvent event) -
Method Summary
Modifier and TypeMethodDescription<B extends CommonBlockTagsProvider,
I extends CommonItemTagsProvider>
voidaddProvider
(boolean shouldRun, Function<GenerationData, B> blockTagsFunction, BiFunction<GenerationData, B, I> itemTagsFunction) <T extends net.minecraft.data.DataProvider>
TaddProvider
(boolean shouldRun, Function<GenerationData, T> function) final boolean
Indicates whether some other object is "equal to" this one.net.minecraftforge.common.data.ExistingFileHelper
Returns the value of theexistingFileHelper
record component.net.minecraft.data.DataGenerator
Returns the value of thegenerator
record component.final int
hashCode()
Returns a hash code value for this object.modid()
Returns the value of themodid
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
GenerationData
-
GenerationData
public GenerationData(String modid, net.minecraft.data.DataGenerator generator, net.minecraftforge.common.data.ExistingFileHelper existingFileHelper) Creates an instance of aGenerationData
record class.- Parameters:
modid
- the value for themodid
record componentgenerator
- the value for thegenerator
record componentexistingFileHelper
- the value for theexistingFileHelper
record component
-
-
Method Details
-
addProvider
public <B extends CommonBlockTagsProvider,I extends CommonItemTagsProvider> void addProvider(boolean shouldRun, Function<GenerationData, B> blockTagsFunction, BiFunction<GenerationData, B, I> itemTagsFunction) -
addProvider
public <T extends net.minecraft.data.DataProvider> T addProvider(boolean shouldRun, Function<GenerationData, T> function) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
modid
Returns the value of themodid
record component.- Returns:
- the value of the
modid
record component
-
generator
public net.minecraft.data.DataGenerator generator()Returns the value of thegenerator
record component.- Returns:
- the value of the
generator
record component
-
existingFileHelper
public net.minecraftforge.common.data.ExistingFileHelper existingFileHelper()Returns the value of theexistingFileHelper
record component.- Returns:
- the value of the
existingFileHelper
record component
-