@@ -245,14 +245,14 @@ public void tickEnd(ClientTickEvent.Post event) {
245245 //Note: We check that the game mode is not null as if it is that means the world is unloading, and we don't actually want to be rendering
246246 // as our data may be out of date or invalid. For example configs could unload while it is still unloading
247247 if (minecraft .player != null && minecraft .player .level () != null && minecraft .gameMode != null && MekanismRenderer .isRunningNormally ()) {
248- Player player = minecraft .player ;
249248 Level world = minecraft .player .level ();
250249 float partialTicks = minecraft .getTimer ().getGameTimeDeltaPartialTick (false );
251250 //Traverse active jetpacks and do animations
252251 for (UUID uuid : Mekanism .playerState .getActiveJetpacks ()) {
253252 Player p = world .getPlayerByUUID (uuid );
254253 if (p != null ) {
255254 Pos3D playerPos = new Pos3D (p ).translate (0 , p .getEyeHeight (), 0 );
255+ //TODO - 1.21: Figure out why this is incorrect for other clients when they are hovering
256256 Vec3 playerMotion = p .getDeltaMovement ();
257257 float random = (world .random .nextFloat () - 0.5F ) * 0.1F ;
258258 //This positioning code is somewhat cursed, but it seems to be mostly working and entity pose code seems cursed in general
@@ -272,7 +272,7 @@ public void tickEnd(ClientTickEvent.Post event) {
272272 }
273273 xRot = -xRot ;
274274 Pos3D eyeAdjustments ;
275- if (p .isFallFlying () && (p != player || !minecraft .options .getCameraType ().isFirstPerson ())) {
275+ if (p .isFallFlying () && (p != minecraft . player || !minecraft .options .getCameraType ().isFirstPerson ())) {
276276 eyeAdjustments = new Pos3D (0 , p .getEyeHeight (Pose .STANDING ), 0 ).xRot (xRot ).yRot (p .yBodyRot );
277277 } else if (p .isVisuallySwimming ()) {
278278 eyeAdjustments = new Pos3D (0 , p .getEyeHeight (), 0 ).xRot (xRot ).yRot (p .yBodyRot ).translate (0 , 0.5 , 0 );
@@ -304,9 +304,9 @@ public void tickEnd(ClientTickEvent.Post event) {
304304 //Traverse players and do animations for idle flamethrowers
305305 for (Player p : world .players ()) {
306306 if (!p .swinging ) {
307- if (player .isUsingItem ()) {
308- InteractionHand usedHand = player .getUsedItemHand ();
309- if (!(player .getItemInHand (usedHand ).getItem () instanceof ItemFlamethrower )) {
307+ if (p .isUsingItem ()) {
308+ InteractionHand usedHand = p .getUsedItemHand ();
309+ if (!(p .getItemInHand (usedHand ).getItem () instanceof ItemFlamethrower )) {
310310 //If we the used item isn't a flamethrower, grab the other hand's item for checks
311311 // if it was an active flamethrower we just skip adding the idle particles
312312 tryAddIdleFlamethrowerParticles (minecraft , p , usedHand == InteractionHand .MAIN_HAND ? InteractionHand .OFF_HAND : InteractionHand .MAIN_HAND );
0 commit comments