Record Class AmmunitionTableRecipe.MaterialGroup
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.item.crafting.AmmunitionTableRecipe.MaterialGroup
- Enclosing class:
AmmunitionTableRecipe
public static record AmmunitionTableRecipe.MaterialGroup(net.minecraft.world.item.crafting.Ingredient stack, float density, float baseMultiplier)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMaterialGroup(net.minecraft.tags.TagKey<net.minecraft.world.item.Item> tagKey, float density, float baseMultiplier) MaterialGroup(net.minecraft.world.item.crafting.Ingredient stack, float density, float baseMultiplier) Represents a group of materials within a recipe for the Ammunition Table. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thebaseMultiplierrecord component.floatdensity()Returns the value of thedensityrecord component.final booleanIndicates whether some other object is "equal to" this one.floatfloatnet.minecraft.world.item.crafting.Ingredientfinal inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.Ingredientstack()Returns the value of thestackrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MaterialGroup
public MaterialGroup(net.minecraft.world.item.crafting.Ingredient stack, float density, float baseMultiplier) Represents a group of materials within a recipe for the Ammunition Table.- Parameters:
stack- anIngredientdensity- the density of the materialbaseMultiplier- the base multiplier for the material (how much this item is worth)For example, an ingot may be 1x, while its nugget is 1/9th of that, or 0.11x.
-
MaterialGroup
public MaterialGroup(net.minecraft.tags.TagKey<net.minecraft.world.item.Item> tagKey, float density, float baseMultiplier)
-
-
Method Details
-
getIngredient
public net.minecraft.world.item.crafting.Ingredient getIngredient() -
getDensity
public float getDensity() -
getBaseMultiplier
public float getBaseMultiplier() -
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 '=='. -
stack
public net.minecraft.world.item.crafting.Ingredient stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-
density
public float density()Returns the value of thedensityrecord component.- Returns:
- the value of the
densityrecord component
-
baseMultiplier
public float baseMultiplier()Returns the value of thebaseMultiplierrecord component.- Returns:
- the value of the
baseMultiplierrecord component
-