Record Class Sprayed.RefillContext
java.lang.Object
java.lang.Record
dev.jaxydog.astral.content.item.custom.Sprayed.RefillContext
- Record Components:
world- The current world.pos- The block position.charges- The refilled charges.
- Enclosing interface:
Sprayed
public static record Sprayed.RefillContext(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, int charges)
extends Record
Describes a spray item refilling context.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionRefillContext(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, int charges) Creates an instance of aRefillContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcharges()Returns the value of thechargesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.util.math.BlockPospos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.Worldworld()Returns the value of theworldrecord component.
-
Constructor Details
-
RefillContext
public RefillContext(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, int charges) Creates an instance of aRefillContextrecord class.
-
-
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 '=='. -
world
public net.minecraft.world.World world()Returns the value of theworldrecord component.- Returns:
- the value of the
worldrecord component
-
pos
public net.minecraft.util.math.BlockPos pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
charges
public int charges()Returns the value of thechargesrecord component.- Returns:
- the value of the
chargesrecord component
-