Movement and input related mappings (#492)

- Reasoning for updateVelocity/travel naming: https://github.com/FabricMC/yarn/pull/485#issuecomment-465793034
- PlayerLookC2SPacket -> PlayerInputC2SPacket
  + There's no look information in this packet, only info related to the movement keys the player is pressing
  + PlayerLookC2SPacket.yaw -> PlayerInputC2SPacket.sideways
  + PlayerLookC2SPacket.pitch -> PlayerInputC2SPacket.forward
- Mapped Input.movementSideways/Input.movementForward fields and adding 'pressing' prefix to the boolean Input.forward/back/right/left fields
This commit is contained in:
Ryan Liptak 2019-02-21 10:02:24 -08:00 committed by Adrian Siekierka
parent 4d7f586b2e
commit c869757d91
6 changed files with 38 additions and 19 deletions

View File

@ -1,8 +1,11 @@
CLASS dfr net/minecraft/client/input/Input
FIELD c forward Z
FIELD d back Z
FIELD e left Z
FIELD f right Z
FIELD a movementSideways F
FIELD b movementForward F
FIELD c pressingForward Z
FIELD d pressingBack Z
FIELD e pressingLeft Z
FIELD f pressingRight Z
FIELD g jumping Z
FIELD h sneaking Z
METHOD a tick ()V
METHOD b getMovementInput ()Lcnj;

View File

@ -96,6 +96,11 @@ CLASS ahl net/minecraft/entity/Entity
ARG 3 tickDelta
METHOD a setRotation (FF)V
ARG 1 yaw
METHOD a updateVelocity (FFFF)V
ARG 1 movementInputSideways
ARG 2 movementInputUp
ARG 3 movementInputForward
ARG 4 movementSpeed
METHOD a damage (Lagv;F)Z
ARG 1 source
ARG 2 amount

View File

@ -16,8 +16,12 @@ CLASS ahu net/minecraft/entity/LivingEntity
FIELD bF lastAttackedTime I
FIELD bG attacking Lahu;
FIELD bH lastAttackTime I
FIELD bI movementSpeed F
FIELD bK absorptionAmount F
FIELD b LOGGER_LIVING Lorg/apache/logging/log4j/Logger;
FIELD bg movementInputSideways F
FIELD bh movementInputUp F
FIELD bi movementInputForward F
FIELD bs activeItemStack Laxw;
FIELD bw STUCK_ARROWS Lpx;
FIELD by attributeContainer Lain;
@ -33,6 +37,10 @@ CLASS ahu net/minecraft/entity/LivingEntity
METHOD C attack (Lahl;)Z
METHOD D pushAway (Lahl;)V
METHOD E canSee (Lahl;)Z
METHOD a travel (FFF)V
ARG 1 movementInputSideways
ARG 2 movementInputUp
ARG 3 movementInputForward
METHOD a swingHand (Lagg;)V
METHOD a setStackInHand (Lagg;Laxw;)V
ARG 1 hand
@ -67,6 +75,7 @@ CLASS ahu net/minecraft/entity/LivingEntity
METHOD cN getSoundPitch ()F
METHOD cP getJumpVelocity ()F
METHOD cQ jump ()V
METHOD cT getMovementSpeed ()F
METHOD cV doPushLogic ()V
METHOD cW isUsingRiptide ()Z
METHOD cY getAbsorptionAmount ()F
@ -106,6 +115,8 @@ CLASS ahu net/minecraft/entity/LivingEntity
METHOD m damageShield (F)V
METHOD m setDespawnCounter (I)V
METHOD n initAi ()V
METHOD n setMovementSpeed (F)V
ARG 1 movementSpeed
METHOD n getFallSound (I)Lxy;
METHOD o setStuckArrows (I)V
METHOD p setAbsorptionAmount (F)V

View File

@ -45,7 +45,7 @@ CLASS nj net/minecraft/network/listener/ServerPlayPacketListener
ARG 1 packet
METHOD a onClientCommand (Log;)V
ARG 1 packet
METHOD a onPlayerLook (Loh;)V
METHOD a onPlayerInput (Loh;)V
ARG 1 packet
METHOD a onRecipeBookData (Loi;)V
ARG 1 packet

View File

@ -0,0 +1,14 @@
CLASS oh net/minecraft/server/network/packet/PlayerInputC2SPacket
FIELD a sideways F
FIELD b forward F
FIELD c jumping Z
FIELD d sneaking Z
METHOD <init> (FFZZ)V
ARG 1 sideways
ARG 2 forward
ARG 3 jumping
ARG 4 sneaking
METHOD b getSideways ()F
METHOD c getForward ()F
METHOD d isJumping ()Z
METHOD e isSneaking ()Z

View File

@ -1,14 +0,0 @@
CLASS oh net/minecraft/server/network/packet/PlayerLookC2SPacket
FIELD a yaw F
FIELD b pitch F
FIELD c jumping Z
FIELD d sneaking Z
METHOD <init> (FFZZ)V
ARG 1 yaw
ARG 2 pitch
ARG 3 jumping
ARG 4 sneaking
METHOD b getYaw ()F
METHOD c getPitch ()F
METHOD d isJumping ()Z
METHOD e isSneaking ()Z