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 vanilla WoodType.
properties - A supplier for the wood type's BlockBehaviour.Properties.
texture - The location of the wood type's plank texture. Used in datagen.
family - A supplier for the corresponding BlockFamily. 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

    Constructors
    Constructor
    Description
    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 a BibliocraftWoodType record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Supplier<net.minecraft.data.BlockFamily>
    Returns the value of the family record component.
     
     
     
    final int
    Returns a hash code value for this object.
    net.minecraft.resources.ResourceLocation
    id()
    Returns the value of the id record component.
    Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties>
    Returns the value of the properties record component.
    net.minecraft.resources.ResourceLocation
    Returns the value of the texture record component.
    final String
    Returns a string representation of this record class.
    net.minecraft.world.level.block.state.properties.WoodType
    Returns the value of the woodType record component.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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 a BibliocraftWoodType record class.
      Parameters:
      id - the value for the id record component
      woodType - the value for the woodType record component
      properties - the value for the properties record component
      texture - the value for the texture record component
      family - the value for the family record component
  • Method Details

    • getNamespace

      public String getNamespace()
      Returns:
      The namespace of the id of this wood type.
    • getPath

      public String getPath()
      Returns:
      The path of the id of this wood type.
    • getRegistrationPrefix

      public String getRegistrationPrefix()
      Returns:
      The wood type prefix used for registration. Keeps the mod id for cases when two mods add identically named wood types.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public net.minecraft.resources.ResourceLocation id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • woodType

      public net.minecraft.world.level.block.state.properties.WoodType woodType()
      Returns the value of the woodType record component.
      Returns:
      the value of the woodType record component
    • properties

      public Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • texture

      public net.minecraft.resources.ResourceLocation texture()
      Returns the value of the texture record component.
      Returns:
      the value of the texture record component
    • family

      public Supplier<net.minecraft.data.BlockFamily> family()
      Returns the value of the family record component.
      Returns:
      the value of the family record component