Package at.petrak.hexcasting.common.loot
Record Class HexLootHandler.ScrollInjection
java.lang.Object
java.lang.Record
at.petrak.hexcasting.common.loot.HexLootHandler.ScrollInjection
- Enclosing class:
- HexLootHandler
public static record HexLootHandler.ScrollInjection(net.minecraft.resources.ResourceLocation injectee, int countRange)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionScrollInjection(net.minecraft.resources.ResourceLocation injectee, int countRange) Creates an instance of aScrollInjectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecountRangerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationinjectee()Returns the value of theinjecteerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScrollInjection
public ScrollInjection(net.minecraft.resources.ResourceLocation injectee, int countRange) Creates an instance of aScrollInjectionrecord class.- Parameters:
injectee- the value for theinjecteerecord componentcountRange- the value for thecountRangerecord component
-
-
Method Details
-
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 '=='. -
injectee
public net.minecraft.resources.ResourceLocation injectee()Returns the value of theinjecteerecord component.- Returns:
- the value of the
injecteerecord component
-
countRange
public int countRange()Returns the value of thecountRangerecord component.- Returns:
- the value of the
countRangerecord component
-