Record Class FluidPhysicsState
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.movement.replay.FluidPhysicsState
public record FluidPhysicsState(List<FluidPhysicsState.Tracker> trackers, Map<net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid>, FluidPhysicsState.Current> currents)
extends Record
Value records own the tracker list and accumulator map instead of retaining live mutable containers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionFluidPhysicsState(List<FluidPhysicsState.Tracker> trackers, Map<net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid>, FluidPhysicsState.Current> currents) Creates an instance of aFluidPhysicsStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionMap<net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid>, FluidPhysicsState.Current> currents()Returns the value of thecurrentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.trackers()Returns the value of thetrackersrecord component.
-
Constructor Details
-
FluidPhysicsState
public FluidPhysicsState(List<FluidPhysicsState.Tracker> trackers, Map<net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid>, FluidPhysicsState.Current> currents) Creates an instance of aFluidPhysicsStaterecord class.- Parameters:
trackers- the value for thetrackersrecord componentcurrents- the value for thecurrentsrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
trackers
Returns the value of thetrackersrecord component.- Returns:
- the value of the
trackersrecord component
-
currents
public Map<net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid>, FluidPhysicsState.Current> currents()Returns the value of thecurrentsrecord component.- Returns:
- the value of the
currentsrecord component
-