Record Class IPocketCraftingContext.Client.Impl

java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.item.crafting.pocket.IPocketCraftingContext.Client.Impl
All Implemented Interfaces:
IPocketCraftingContext, IPocketCraftingContext.Client
Enclosing interface:
IPocketCraftingContext.Client

public static record IPocketCraftingContext.Client.Impl(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.client.player.LocalPlayer player, net.minecraft.world.inventory.AbstractContainerMenu menu, net.minecraft.world.item.ItemStack toolStack) extends Record implements IPocketCraftingContext.Client
  • Nested Class Summary

    Nested classes/interfaces inherited from interface petrolpark.mc.library.core.world.item.crafting.pocket.IPocketCraftingContext

    IPocketCraftingContext.Client

    Nested classes/interfaces inherited from interface petrolpark.mc.library.core.world.item.crafting.pocket.IPocketCraftingContext.Client

    IPocketCraftingContext.Client.Impl
  • Constructor Summary

    Constructors
    Constructor
    Description
    Impl(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.client.player.LocalPlayer player, net.minecraft.world.inventory.AbstractContainerMenu menu, net.minecraft.world.item.ItemStack toolStack)
    Creates an instance of a Impl record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    net.minecraft.client.multiplayer.ClientLevel
    Returns the value of the level record component.
    net.minecraft.world.inventory.AbstractContainerMenu
    Returns the value of the menu record component.
    net.minecraft.client.player.LocalPlayer
    Returns the value of the player record component.
    net.minecraft.world.item.ItemStack
    Returns the value of the toolStack record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface petrolpark.mc.library.core.world.item.crafting.pocket.IPocketCraftingContext

    recipeManager, registries
  • Constructor Details

    • Impl

      public Impl(net.minecraft.client.multiplayer.ClientLevel level, net.minecraft.client.player.LocalPlayer player, net.minecraft.world.inventory.AbstractContainerMenu menu, net.minecraft.world.item.ItemStack toolStack)
      Creates an instance of a Impl record class.
      Parameters:
      level - the value for the level record component
      player - the value for the player record component
      menu - the value for the menu record component
      toolStack - the value for the toolStack record component
  • Method Details

    • 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.
    • level

      public net.minecraft.client.multiplayer.ClientLevel level()
      Returns the value of the level record component.
      Specified by:
      level in interface IPocketCraftingContext
      Specified by:
      level in interface IPocketCraftingContext.Client
      Returns:
      the value of the level record component
    • player

      public net.minecraft.client.player.LocalPlayer player()
      Returns the value of the player record component.
      Specified by:
      player in interface IPocketCraftingContext
      Specified by:
      player in interface IPocketCraftingContext.Client
      Returns:
      the value of the player record component
    • toolStack

      public net.minecraft.world.item.ItemStack toolStack()
      Returns the value of the toolStack record component.
      Specified by:
      toolStack in interface IPocketCraftingContext
      Returns:
      the value of the toolStack record component