Record Class ItemsPocketCraftingResult
java.lang.Object
java.lang.Record
petrolpark.mc.library.core.world.item.crafting.pocket.ItemsPocketCraftingResult
- All Implemented Interfaces:
PocketCrafting.Result
public record ItemsPocketCraftingResult(List<ItemsPocketCraftingResult.Output> outputs, boolean successful)
extends Record
implements PocketCrafting.Result
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface petrolpark.mc.library.core.world.item.crafting.pocket.PocketCrafting.Result
FAIL -
Constructor Summary
ConstructorsConstructorDescriptionItemsPocketCraftingResult(List<ItemsPocketCraftingResult.Output> outputs, boolean successful) Creates an instance of aItemsPocketCraftingResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ItemsPocketCraftingResultfinal inthashCode()Returns a hash code value for this object.outputs()Returns the value of theoutputsrecord component.static ItemsPocketCraftingResultstatic ItemsPocketCraftingResultsuccess(net.minecraft.world.item.ItemStack stack) booleanReturns the value of thesuccessfulrecord 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.PocketCrafting.Result
addToTooltip
-
Constructor Details
-
ItemsPocketCraftingResult
public ItemsPocketCraftingResult(List<ItemsPocketCraftingResult.Output> outputs, boolean successful) Creates an instance of aItemsPocketCraftingResultrecord class.- Parameters:
outputs- the value for theoutputsrecord componentsuccessful- the value for thesuccessfulrecord component
-
-
Method Details
-
success
-
success
-
fail
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
outputs
Returns the value of theoutputsrecord component.- Specified by:
outputsin interfacePocketCrafting.Result- Returns:
- the value of the
outputsrecord component
-
successful
public boolean successful()Returns the value of thesuccessfulrecord component.- Specified by:
successfulin interfacePocketCrafting.Result- Returns:
- the value of the
successfulrecord component
-