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>

public record PistonCrushingRecipe(String group, net.minecraft.resources.ResourceLocation block, net.minecraft.world.item.ItemStack result, int minCount, int maxCount) extends Record implements net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
     
    static class 
     
  • Field Summary

    Fields inherited from interface net.minecraft.world.item.crafting.Recipe

    CODEC, CONDITIONAL_CODEC, STREAM_CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    PistonCrushingRecipe(String group, net.minecraft.resources.ResourceLocation block, net.minecraft.world.item.ItemStack result, int minCount, int maxCount)
    Creates an instance of a PistonCrushingRecipe record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.item.ItemStack
    assemble(net.minecraft.world.item.crafting.RecipeInput input, net.minecraft.core.HolderLookup.Provider registries)
     
    net.minecraft.resources.ResourceLocation
    Returns the value of the block record component.
    boolean
    canCraftInDimensions(int width, int height)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.world.level.block.Block
     
     
    int
     
    int
     
    int
    Get a random drop amount based on the min and max count (inclusive).
    net.minecraft.world.item.ItemStack
    getResultItem(net.minecraft.core.HolderLookup.Provider provider)
     
    net.minecraft.world.item.crafting.RecipeSerializer<?>
     
    net.minecraft.world.item.ItemStack
     
    net.minecraft.world.item.crafting.RecipeType<?>
     
    Returns the value of the group record component.
    final int
    Returns a hash code value for this object.
    boolean
     
    boolean
    matches(net.minecraft.world.item.crafting.RecipeInput input, net.minecraft.world.level.Level level)
     
    boolean
    matches(net.minecraft.world.level.block.Block block)
     
    int
    Returns the value of the maxCount record component.
    int
    Returns the value of the minCount record component.
    net.minecraft.world.item.ItemStack
    Returns the value of the result record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods 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 a PistonCrushingRecipe record class.
      Parameters:
      group - the value for the group record component
      block - the value for the block record component
      result - the value for the result record component
      minCount - the value for the minCount record component
      maxCount - the value for the maxCount record component
  • Method Details

    • matches

      public boolean matches(net.minecraft.world.item.crafting.RecipeInput input, net.minecraft.world.level.Level level)
      Specified by:
      matches in interface net.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:
      assemble in interface net.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:
      getResultItem in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
    • canCraftInDimensions

      public boolean canCraftInDimensions(int width, int height)
      Specified by:
      canCraftInDimensions in interface net.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:
      getToastSymbol in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
    • getSerializer

      public net.minecraft.world.item.crafting.RecipeSerializer<?> getSerializer()
      Specified by:
      getSerializer in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
    • getType

      public net.minecraft.world.item.crafting.RecipeType<?> getType()
      Specified by:
      getType in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
    • getGroup

      public String getGroup()
      Specified by:
      getGroup in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
    • isSpecial

      public boolean isSpecial()
      Specified by:
      isSpecial in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • group

      public String group()
      Returns the value of the group record component.
      Returns:
      the value of the group record component
    • block

      public net.minecraft.resources.ResourceLocation block()
      Returns the value of the block record component.
      Returns:
      the value of the block record component
    • result

      public net.minecraft.world.item.ItemStack result()
      Returns the value of the result record component.
      Returns:
      the value of the result record component
    • minCount

      public int minCount()
      Returns the value of the minCount record component.
      Returns:
      the value of the minCount record component
    • maxCount

      public int maxCount()
      Returns the value of the maxCount record component.
      Returns:
      the value of the maxCount record component