Record Class PistonCrushingRecipe
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.item.crafting.PistonCrushingRecipe
- All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Field Summary
Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionPistonCrushingRecipe(String group, net.minecraft.resources.ResourceLocation block, net.minecraft.world.item.ItemStack result, int minCount, int maxCount) Creates an instance of aPistonCrushingReciperecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackassemble(net.minecraft.world.item.crafting.RecipeInput input, net.minecraft.core.HolderLookup.Provider registries) net.minecraft.resources.ResourceLocationblock()Returns the value of theblockrecord component.booleancanCraftInDimensions(int width, int height) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.level.block.BlockgetBlock()getGroup()intintintGet a random drop amount based on the min and max count (inclusive).net.minecraft.world.item.ItemStackgetResultItem(net.minecraft.core.HolderLookup.Provider provider) net.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.booleanbooleanmatches(net.minecraft.world.item.crafting.RecipeInput input, net.minecraft.world.level.Level level) booleanmatches(net.minecraft.world.level.block.Block block) intmaxCount()Returns the value of themaxCountrecord component.intminCount()Returns the value of theminCountrecord component.net.minecraft.world.item.ItemStackresult()Returns the value of theresultrecord 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
getIngredients, getRemainingItems, isIncomplete, showNotification
-
Constructor Details
-
PistonCrushingRecipe
public PistonCrushingRecipe(String group, net.minecraft.resources.ResourceLocation block, net.minecraft.world.item.ItemStack result, int minCount, int maxCount) Creates an instance of aPistonCrushingReciperecord class.- Parameters:
group- the value for thegrouprecord componentblock- the value for theblockrecord componentresult- the value for theresultrecord componentminCount- the value for theminCountrecord componentmaxCount- the value for themaxCountrecord component
-
-
Method Details
-
matches
public boolean matches(net.minecraft.world.item.crafting.RecipeInput input, net.minecraft.world.level.Level level) - Specified by:
matchesin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
assemble
public net.minecraft.world.item.ItemStack assemble(net.minecraft.world.item.crafting.RecipeInput input, net.minecraft.core.HolderLookup.Provider registries) - Specified by:
assemblein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
matches
public boolean matches(net.minecraft.world.level.block.Block block) -
getResultItem
public net.minecraft.world.item.ItemStack getResultItem(net.minecraft.core.HolderLookup.Provider provider) - Specified by:
getResultItemin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
canCraftInDimensions
public boolean canCraftInDimensions(int width, int height) - Specified by:
canCraftInDimensionsin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
getBlock
public net.minecraft.world.level.block.Block getBlock() -
getRandomDropAmount
public int getRandomDropAmount()Get a random drop amount based on the min and max count (inclusive). -
getMinCount
public int getMinCount() -
getMaxCount
public int getMaxCount() -
getToastSymbol
public net.minecraft.world.item.ItemStack getToastSymbol()- Specified by:
getToastSymbolin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
getSerializer
public net.minecraft.world.item.crafting.RecipeSerializer<?> getSerializer()- Specified by:
getSerializerin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
getType
public net.minecraft.world.item.crafting.RecipeType<?> getType()- Specified by:
getTypein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
getGroup
- Specified by:
getGroupin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
isSpecial
public boolean isSpecial()- Specified by:
isSpecialin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
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
-
block
public net.minecraft.resources.ResourceLocation block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
result
public net.minecraft.world.item.ItemStack result()Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
minCount
public int minCount()Returns the value of theminCountrecord component.- Returns:
- the value of the
minCountrecord component
-
maxCount
public int maxCount()Returns the value of themaxCountrecord component.- Returns:
- the value of the
maxCountrecord component
-