From 1441e6236a669a2686da56d2a3e0af8fa3b963f8 Mon Sep 17 00:00:00 2001 From: Lasnik <61758940+lasnikprogram@users.noreply.github.com> Date: Tue, 9 Feb 2021 00:24:35 +0100 Subject: [PATCH] Fixed Player moving faster diagonal First of all. I love this project and I think I am going to do some PRs in the future. Now to my PR. I am not really sure if this is intentional but I think it doesn`t make sense to let the player move faster diagonal. So I did this quick fix. Could you please message me on Discord? My username is Lasnik#0294. I have some questions :D --- src/com/jdh/microcraft/entity/EntityPlayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/jdh/microcraft/entity/EntityPlayer.java b/src/com/jdh/microcraft/entity/EntityPlayer.java index cbfa6be..7009abc 100644 --- a/src/com/jdh/microcraft/entity/EntityPlayer.java +++ b/src/com/jdh/microcraft/entity/EntityPlayer.java @@ -239,8 +239,8 @@ public void tick() { dx++; } - if (!this.swimming || Global.ticks % 2 == 0) { - this.move(dx, dy); + if ((!this.swimming || Global.ticks % 2 == 0) && (dx == 0 || dy == 0)) { + this.move(dx, dy); } // override entity direction, the player should be able to change their