Record Class CastingRecipe
java.lang.Object
java.lang.Record
io.github.pylonmc.pylon.base.recipes.CastingRecipe
- Record Components:
input- the input inputFluid, of which CAST_AMOUNT mB is used per reciperesult- the output of the cast (respects amount)temperature- the minimum temperature the smeltery must be
- All Implemented Interfaces:
io.github.pylonmc.pylon.core.recipe.PylonRecipe,net.kyori.adventure.key.Keyed,org.bukkit.Keyed
public record CastingRecipe(@NotNull org.bukkit.NamespacedKey key, io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluid input, @NotNull org.bukkit.inventory.ItemStack result, double temperature)
extends Record
implements io.github.pylonmc.pylon.core.recipe.PylonRecipe
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.github.pylonmc.pylon.core.recipe.RecipeType<CastingRecipe> -
Constructor Summary
ConstructorsConstructorDescriptionCastingRecipe(@NotNull org.bukkit.NamespacedKey key, io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluid input, @NotNull org.bukkit.inventory.ItemStack result, double temperature) Creates an instance of aCastingReciperecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull xyz.xenondevs.invui.gui.Guidisplay()final booleanIndicates whether some other object is "equal to" this one.static @Nullable CastingRecipegetCastRecipeFor(@NotNull io.github.pylonmc.pylon.core.fluid.PylonFluid fluid) @NotNull List<io.github.pylonmc.pylon.core.recipe.RecipeInput> @NotNull org.bukkit.NamespacedKeygetKey()@NotNull List<io.github.pylonmc.pylon.core.recipe.FluidOrItem> final inthashCode()Returns a hash code value for this object.io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluidinput()Returns the value of theinputrecord component.@NotNull org.bukkit.NamespacedKeykey()Returns the value of thekeyrecord component.@NotNull org.bukkit.inventory.ItemStackresult()Returns the value of theresultrecord component.doubleReturns the value of thetemperaturerecord 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 io.github.pylonmc.pylon.core.recipe.PylonRecipe
isHidden, isInput, isInput, isOutput, isOutput
-
Field Details
-
RECIPE_TYPE
-
-
Constructor Details
-
CastingRecipe
public CastingRecipe(@NotNull @NotNull org.bukkit.NamespacedKey key, @NotNull io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluid input, @NotNull @NotNull org.bukkit.inventory.ItemStack result, double temperature) Creates an instance of aCastingReciperecord class.- Parameters:
key- the value for thekeyrecord componentinput- the value for theinputrecord componentresult- the value for theresultrecord componenttemperature- the value for thetemperaturerecord component
-
-
Method Details
-
getCastRecipeFor
@Nullable public static @Nullable CastingRecipe getCastRecipeFor(@NotNull @NotNull io.github.pylonmc.pylon.core.fluid.PylonFluid fluid) -
getKey
@NotNull public @NotNull org.bukkit.NamespacedKey getKey()- Specified by:
getKeyin interfaceorg.bukkit.Keyed
-
getInputs
- Specified by:
getInputsin interfaceio.github.pylonmc.pylon.core.recipe.PylonRecipe
-
getResults
- Specified by:
getResultsin interfaceio.github.pylonmc.pylon.core.recipe.PylonRecipe
-
display
@NotNull public @NotNull xyz.xenondevs.invui.gui.Gui display()- Specified by:
displayin interfaceio.github.pylonmc.pylon.core.recipe.PylonRecipe
-
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 '=='. -
key
@NotNull public @NotNull org.bukkit.NamespacedKey key()Returns the value of thekeyrecord component.- Specified by:
keyin interfacenet.kyori.adventure.key.Keyed- Specified by:
keyin interfaceorg.bukkit.Keyed- Returns:
- the value of the
keyrecord component
-
input
@NotNull public io.github.pylonmc.pylon.core.recipe.RecipeInput.Fluid input()Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
result
@NotNull public @NotNull org.bukkit.inventory.ItemStack result()Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
temperature
public double temperature()Returns the value of thetemperaturerecord component.- Returns:
- the value of the
temperaturerecord component
-