Record Class IPocketCraftingContext.Impl
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.item.crafting.pocket.IPocketCraftingContext.Impl
- All Implemented Interfaces:
IPocketCraftingContext
- Enclosing interface:
IPocketCraftingContext
public static record IPocketCraftingContext.Impl(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.inventory.AbstractContainerMenu menu, net.minecraft.world.item.ItemStack toolStack)
extends Record
implements IPocketCraftingContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface petrolpark.mc.library.core.world.item.crafting.pocket.IPocketCraftingContext
IPocketCraftingContext.Client, IPocketCraftingContext.Impl -
Constructor Summary
ConstructorsConstructorDescriptionImpl(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.inventory.AbstractContainerMenu menu, net.minecraft.world.item.ItemStack toolStack) Creates an instance of aImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.Levellevel()Returns the value of thelevelrecord component.net.minecraft.world.inventory.AbstractContainerMenumenu()Returns the value of themenurecord component.net.minecraft.world.entity.player.Playerplayer()Returns the value of theplayerrecord component.net.minecraft.world.item.ItemStackReturns the value of thetoolStackrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface petrolpark.mc.library.core.world.item.crafting.pocket.IPocketCraftingContext
recipeManager, registries
-
Constructor Details
-
Impl
public Impl(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.inventory.AbstractContainerMenu menu, net.minecraft.world.item.ItemStack toolStack) Creates an instance of aImplrecord class.- Parameters:
level- the value for thelevelrecord componentplayer- the value for theplayerrecord componentmenu- the value for themenurecord componenttoolStack- the value for thetoolStackrecord component
-
-
Method Details
-
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). -
level
public net.minecraft.world.level.Level level()Returns the value of thelevelrecord component.- Specified by:
levelin interfaceIPocketCraftingContext- Returns:
- the value of the
levelrecord component
-
player
public net.minecraft.world.entity.player.Player player()Returns the value of theplayerrecord component.- Specified by:
playerin interfaceIPocketCraftingContext- Returns:
- the value of the
playerrecord component
-
toolStack
public net.minecraft.world.item.ItemStack toolStack()Returns the value of thetoolStackrecord component.- Specified by:
toolStackin interfaceIPocketCraftingContext- Returns:
- the value of the
toolStackrecord component
-