Package net.minecraft.world.item
Record Class ProjectileItem.DispenseConfig
java.lang.Object
java.lang.Record
net.minecraft.world.item.ProjectileItem.DispenseConfig
- Enclosing interface:
ProjectileItem
public static record ProjectileItem.DispenseConfig(ProjectileItem.PositionFunction positionFunction, float uncertainty, float power, OptionalInt overrideDispenseEvent)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ProjectileItem.DispenseConfigprivate final OptionalIntThe field for theoverrideDispenseEventrecord component.private final ProjectileItem.PositionFunctionThe field for thepositionFunctionrecord component.private final floatThe field for thepowerrecord component.private final floatThe field for theuncertaintyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDispenseConfig(ProjectileItem.PositionFunction positionFunction, float uncertainty, float power, OptionalInt overrideDispenseEvent) Creates an instance of aDispenseConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoverrideDispenseEventrecord component.Returns the value of thepositionFunctionrecord component.floatpower()Returns the value of thepowerrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of theuncertaintyrecord component.
-
Field Details
-
positionFunction
The field for thepositionFunctionrecord component. -
uncertainty
private final float uncertaintyThe field for theuncertaintyrecord component. -
power
private final float powerThe field for thepowerrecord component. -
overrideDispenseEvent
The field for theoverrideDispenseEventrecord component. -
DEFAULT
-
-
Constructor Details
-
DispenseConfig
public DispenseConfig(ProjectileItem.PositionFunction positionFunction, float uncertainty, float power, OptionalInt overrideDispenseEvent) Creates an instance of aDispenseConfigrecord class.- Parameters:
positionFunction- the value for thepositionFunctionrecord componentuncertainty- the value for theuncertaintyrecord componentpower- the value for thepowerrecord componentoverrideDispenseEvent- the value for theoverrideDispenseEventrecord component
-
-
Method Details
-
builder
-
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 '=='. -
positionFunction
Returns the value of thepositionFunctionrecord component.- Returns:
- the value of the
positionFunctionrecord component
-
uncertainty
public float uncertainty()Returns the value of theuncertaintyrecord component.- Returns:
- the value of the
uncertaintyrecord component
-
power
public float power()Returns the value of thepowerrecord component.- Returns:
- the value of the
powerrecord component
-
overrideDispenseEvent
Returns the value of theoverrideDispenseEventrecord component.- Returns:
- the value of the
overrideDispenseEventrecord component
-