Record Class PhysicalInput
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.movement.replay.PhysicalInput
public record PhysicalInput(net.minecraft.world.entity.player.Input keys, float strafe, float forward)
extends Record
Raw input polling is recorded separately from posture, item-use scaling, and automatic jumping.
-
Constructor Summary
ConstructorsConstructorDescriptionPhysicalInput(net.minecraft.world.entity.player.Input keys, float strafe, float forward) Creates an instance of aPhysicalInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PhysicalInputcapture(net.minecraft.client.player.ClientInput input) final booleanIndicates whether some other object is "equal to" this one.floatforward()Returns the value of theforwardrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.entity.player.Inputkeys()Returns the value of thekeysrecord component.voidrestore(net.minecraft.client.player.ClientInput input) floatstrafe()Returns the value of thestraferecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PhysicalInput
public PhysicalInput(net.minecraft.world.entity.player.Input keys, float strafe, float forward) Creates an instance of aPhysicalInputrecord class.- Parameters:
keys- the value for thekeysrecord componentstrafe- the value for thestraferecord componentforward- the value for theforwardrecord component
-
-
Method Details
-
capture
-
restore
public void restore(net.minecraft.client.player.ClientInput input) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
keys
public net.minecraft.world.entity.player.Input keys()Returns the value of thekeysrecord component.- Returns:
- the value of the
keysrecord component
-
strafe
public float strafe()Returns the value of thestraferecord component.- Returns:
- the value of the
straferecord component
-
forward
public float forward()Returns the value of theforwardrecord component.- Returns:
- the value of the
forwardrecord component
-