Record Class HorseMillProperties
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.common.kinetics.horseMill.HorseMillProperties
public record HorseMillProperties(net.minecraft.world.phys.Vec3 positionOffset, EntityNumberProvider maxSpeed, EntityNumberProvider stressCapacity, Optional<net.minecraft.resources.ResourceLocation> harnessModelLocation)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<HorseMillProperties> -
Constructor Summary
ConstructorsConstructorDescriptionHorseMillProperties(net.minecraft.world.phys.Vec3 positionOffset, EntityNumberProvider maxSpeed, EntityNumberProvider stressCapacity, Optional<net.minecraft.resources.ResourceLocation> harnessModelLocation) Creates an instance of aHorseMillPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static final Optional<HorseMillProperties> get(net.minecraft.world.entity.Entity entity) Optional<net.minecraft.resources.ResourceLocation> Returns the value of theharnessModelLocationrecord component.final inthashCode()Returns a hash code value for this object.maxSpeed()Returns the value of themaxSpeedrecord component.net.minecraft.world.phys.Vec3Returns the value of thepositionOffsetrecord component.Returns the value of thestressCapacityrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
HorseMillProperties
public HorseMillProperties(net.minecraft.world.phys.Vec3 positionOffset, EntityNumberProvider maxSpeed, EntityNumberProvider stressCapacity, Optional<net.minecraft.resources.ResourceLocation> harnessModelLocation) Creates an instance of aHorseMillPropertiesrecord class.- Parameters:
positionOffset- the value for thepositionOffsetrecord componentmaxSpeed- the value for themaxSpeedrecord componentstressCapacity- the value for thestressCapacityrecord componentharnessModelLocation- the value for theharnessModelLocationrecord component
-
-
Method Details
-
get
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
positionOffset
public net.minecraft.world.phys.Vec3 positionOffset()Returns the value of thepositionOffsetrecord component.- Returns:
- the value of the
positionOffsetrecord component
-
maxSpeed
Returns the value of themaxSpeedrecord component.- Returns:
- the value of the
maxSpeedrecord component
-
stressCapacity
Returns the value of thestressCapacityrecord component.- Returns:
- the value of the
stressCapacityrecord component
-
harnessModelLocation
Returns the value of theharnessModelLocationrecord component.- Returns:
- the value of the
harnessModelLocationrecord component
-