Record Class CustomBlockDefinition

java.lang.Object
java.lang.Record
fr.ghostrider584.axiom.block.CustomBlockDefinition

public record CustomBlockDefinition(net.kyori.adventure.key.Key id, String translationKey, List<CustomBlockDefinition.Property> properties, List<Integer> states, net.minestom.server.item.ItemStack pickItem, Set<CustomBlockDefinition.Placement> placement, Map<Integer,Integer> rotateY, Map<Integer,Integer> flipX, Map<Integer,Integer> flipY, Map<Integer,Integer> flipZ) extends Record
Tool-neutral values, exact 26.2 carriers and explicit transforms for Axiom's v2 block catalogue.
  • Constructor Details

    • CustomBlockDefinition

      public CustomBlockDefinition(net.kyori.adventure.key.Key id, String translationKey, List<CustomBlockDefinition.Property> properties, List<Integer> states, net.minestom.server.item.ItemStack pickItem, Set<CustomBlockDefinition.Placement> placement, Map<Integer,Integer> rotateY, Map<Integer,Integer> flipX, Map<Integer,Integer> flipY, Map<Integer,Integer> flipZ)
      Creates an instance of a CustomBlockDefinition record class.
      Parameters:
      id - the value for the id record component
      translationKey - the value for the translationKey record component
      properties - the value for the properties record component
      states - the value for the states record component
      pickItem - the value for the pickItem record component
      placement - the value for the placement record component
      rotateY - the value for the rotateY record component
      flipX - the value for the flipX record component
      flipY - the value for the flipY record component
      flipZ - the value for the flipZ record component
  • Method Details

    • write

      public void write(net.minestom.server.network.NetworkBuffer buffer)
    • 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.kyori.adventure.key.Key id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • translationKey

      public String translationKey()
      Returns the value of the translationKey record component.
      Returns:
      the value of the translationKey record component
    • properties

      public List<CustomBlockDefinition.Property> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • states

      public List<Integer> states()
      Returns the value of the states record component.
      Returns:
      the value of the states record component
    • pickItem

      public net.minestom.server.item.ItemStack pickItem()
      Returns the value of the pickItem record component.
      Returns:
      the value of the pickItem record component
    • placement

      public Set<CustomBlockDefinition.Placement> placement()
      Returns the value of the placement record component.
      Returns:
      the value of the placement record component
    • rotateY

      public Map<Integer,Integer> rotateY()
      Returns the value of the rotateY record component.
      Returns:
      the value of the rotateY record component
    • flipX

      public Map<Integer,Integer> flipX()
      Returns the value of the flipX record component.
      Returns:
      the value of the flipX record component
    • flipY

      public Map<Integer,Integer> flipY()
      Returns the value of the flipY record component.
      Returns:
      the value of the flipY record component
    • flipZ

      public Map<Integer,Integer> flipZ()
      Returns the value of the flipZ record component.
      Returns:
      the value of the flipZ record component