Record Class StarForgeRecipe
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.item.crafting.StarForgeRecipe
- All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
public record StarForgeRecipe(String group, net.minecraft.world.item.crafting.Ingredient ingot, int ingotCount, net.minecraft.world.item.crafting.Ingredient secondaryMaterial, int secondaryMaterialCount, int smeltTime, net.minecraft.world.item.ItemStack result)
extends Record
implements net.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceStarForgeRecipe.Factory<T extends StarForgeRecipe>static classStarForgeRecipe.Serializer<T extends StarForgeRecipe> -
Field Summary
Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionStarForgeRecipe(String group, net.minecraft.world.item.crafting.Ingredient ingot, int ingotCount, net.minecraft.world.item.crafting.Ingredient secondaryMaterial, int secondaryMaterialCount, int smeltTime, net.minecraft.world.item.ItemStack result) Creates an instance of aStarForgeReciperecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackassemble(net.minecraft.world.Container container, net.minecraft.core.RegistryAccess registryAccess) booleancanCraftInDimensions(int width, int height) final booleanIndicates whether some other object is "equal to" this one.getGroup()net.minecraft.world.item.ItemStackgetIngot()net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient>net.minecraft.world.item.ItemStackgetResultItem(net.minecraft.core.RegistryAccess registryAccess) net.minecraft.world.item.ItemStacknet.minecraft.world.item.crafting.RecipeSerializer<?>net.minecraft.world.item.ItemStacknet.minecraft.world.item.crafting.RecipeType<?>getType()group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.Ingredientingot()Returns the value of theingotrecord component.intReturns the value of theingotCountrecord component.booleanbooleanmatches(net.minecraft.world.Container container) booleanmatches(net.minecraft.world.Container container, net.minecraft.world.level.Level level) net.minecraft.world.item.ItemStackresult()Returns the value of theresultrecord component.net.minecraft.world.item.crafting.IngredientReturns the value of thesecondaryMaterialrecord component.intReturns the value of thesecondaryMaterialCountrecord component.intReturns the value of thesmeltTimerecord 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 net.minecraft.world.item.crafting.Recipe
getRemainingItems, isIncomplete, showNotification
-
Constructor Details
-
StarForgeRecipe
public StarForgeRecipe(String group, net.minecraft.world.item.crafting.Ingredient ingot, int ingotCount, net.minecraft.world.item.crafting.Ingredient secondaryMaterial, int secondaryMaterialCount, int smeltTime, net.minecraft.world.item.ItemStack result) Creates an instance of aStarForgeReciperecord class.- Parameters:
group- the value for thegrouprecord componentingot- the value for theingotrecord componentingotCount- the value for theingotCountrecord componentsecondaryMaterial- the value for thesecondaryMaterialrecord componentsecondaryMaterialCount- the value for thesecondaryMaterialCountrecord componentsmeltTime- the value for thesmeltTimerecord componentresult- the value for theresultrecord component
-
-
Method Details
-
matches
public boolean matches(net.minecraft.world.Container container, net.minecraft.world.level.Level level) - Specified by:
matchesin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
matches
public boolean matches(net.minecraft.world.Container container) -
assemble
public net.minecraft.world.item.ItemStack assemble(net.minecraft.world.Container container, net.minecraft.core.RegistryAccess registryAccess) - Specified by:
assemblein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getResultItem
public net.minecraft.world.item.ItemStack getResultItem(net.minecraft.core.RegistryAccess registryAccess) - Specified by:
getResultItemin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
canCraftInDimensions
public boolean canCraftInDimensions(int width, int height) - Specified by:
canCraftInDimensionsin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getToastSymbol
public net.minecraft.world.item.ItemStack getToastSymbol()- Specified by:
getToastSymbolin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getSerializer
public net.minecraft.world.item.crafting.RecipeSerializer<?> getSerializer()- Specified by:
getSerializerin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getType
public net.minecraft.world.item.crafting.RecipeType<?> getType()- Specified by:
getTypein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getGroup
- Specified by:
getGroupin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getIngredients
public net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> getIngredients()- Specified by:
getIngredientsin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getIngot
public net.minecraft.world.item.ItemStack getIngot() -
getSecondaryMaterial
public net.minecraft.world.item.ItemStack getSecondaryMaterial() -
result
public net.minecraft.world.item.ItemStack result()Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
isSpecial
public boolean isSpecial()- Specified by:
isSpecialin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
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 '=='. -
group
Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
ingot
public net.minecraft.world.item.crafting.Ingredient ingot()Returns the value of theingotrecord component.- Returns:
- the value of the
ingotrecord component
-
ingotCount
public int ingotCount()Returns the value of theingotCountrecord component.- Returns:
- the value of the
ingotCountrecord component
-
secondaryMaterial
public net.minecraft.world.item.crafting.Ingredient secondaryMaterial()Returns the value of thesecondaryMaterialrecord component.- Returns:
- the value of the
secondaryMaterialrecord component
-
secondaryMaterialCount
public int secondaryMaterialCount()Returns the value of thesecondaryMaterialCountrecord component.- Returns:
- the value of the
secondaryMaterialCountrecord component
-
smeltTime
public int smeltTime()Returns the value of thesmeltTimerecord component.- Returns:
- the value of the
smeltTimerecord component
-