Record Class BibliocraftWoodType
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.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.ResourceLocation id, net.minecraft.world.level.block.state.properties.WoodType woodType, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, net.minecraft.resources.ResourceLocation texture, Supplier<net.minecraft.data.BlockFamily> family)
extends Record
Holds all information Bibliocraft needs about a wood type.
-
Constructor Summary
ConstructorsConstructorDescriptionBibliocraftWoodType(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.block.state.properties.WoodType woodType, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, net.minecraft.resources.ResourceLocation 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.ResourceLocationid()Returns the value of theidrecord component.Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> Returns the value of thepropertiesrecord component.net.minecraft.resources.ResourceLocationtexture()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.ResourceLocation id, net.minecraft.world.level.block.state.properties.WoodType woodType, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, net.minecraft.resources.ResourceLocation 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
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). -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
woodType
public net.minecraft.world.level.block.state.properties.WoodType woodType()Returns the value of thewoodTyperecord component.- Returns:
- the value of the
woodTyperecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
texture
public net.minecraft.resources.ResourceLocation texture()Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
family
Returns the value of thefamilyrecord component.- Returns:
- the value of the
familyrecord component
-