Record Class BibliocraftWoodType
java.lang.Object
java.lang.Record
at.minecraftschurli.mods.bibliocraft.api.woodtype.BibliocraftWoodType
- Record Components:
id- The id of the wood type.woodType- The corresponding vanillaWoodType.properties- A supplier for the wood type'sBlockBehaviour.Properties.texture- The location of the wood type's plank texture. Used in datagen.family- A supplier for the correspondingBlockFamily. Used in datagen.
public record BibliocraftWoodType(net.minecraft.resources.Identifier id, net.minecraft.world.level.block.state.properties.WoodType woodType, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, net.minecraft.resources.Identifier texture, Supplier<net.minecraft.data.BlockFamily> family)
extends Record
Holds all information Bibliocraft needs about a wood type.
-
Constructor Summary
ConstructorsConstructorDescriptionBibliocraftWoodType(net.minecraft.resources.Identifier id, net.minecraft.world.level.block.state.properties.WoodType woodType, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, net.minecraft.resources.Identifier texture, Supplier<net.minecraft.data.BlockFamily> family) Creates an instance of aBibliocraftWoodTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Supplier<net.minecraft.data.BlockFamily> family()Returns the value of thefamilyrecord component.getPath()final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifierid()Returns the value of theidrecord component.Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> Returns the value of thepropertiesrecord component.net.minecraft.resources.Identifiertexture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.level.block.state.properties.WoodTypewoodType()Returns the value of thewoodTyperecord component.
-
Constructor Details
-
BibliocraftWoodType
public BibliocraftWoodType(net.minecraft.resources.Identifier id, net.minecraft.world.level.block.state.properties.WoodType woodType, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, net.minecraft.resources.Identifier texture, Supplier<net.minecraft.data.BlockFamily> family) Creates an instance of aBibliocraftWoodTyperecord class.- Parameters:
id- the value for theidrecord componentwoodType- the value for thewoodTyperecord componentproperties- the value for thepropertiesrecord componenttexture- the value for thetexturerecord componentfamily- the value for thefamilyrecord component
-
-
Method Details
-
getNamespace
- Returns:
- The namespace of the id of this wood type.
-
getPath
- Returns:
- The path of the id of this wood type.
-
getRegistrationPrefix
- Returns:
- The wood type prefix used for registration. Keeps the mod id for cases when two mods add identically named wood types.
-
toString
-
hashCode
-
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). -
id
-
woodType
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
texture
-
family
-