Fix player gravity

This commit is contained in:
Felix Cravic 2020-12-06 16:52:04 +01:00
parent 43aca45c05
commit 0f97930f79
2 changed files with 3 additions and 1 deletions

View File

@ -481,7 +481,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer, P
// Gravity
{
// Cache the number of "gravity tick"
if (!isOnGround()) {
if (!onGround) {
gravityTickCount++;
} else {
gravityTickCount = 0;

View File

@ -143,6 +143,7 @@ public class NettyPlayerConnection extends PlayerConnection {
}
}
@NotNull
public ChannelFuture write(@NotNull Object message) {
if (MinecraftServer.shouldProcessNettyErrors()) {
return channel.write(message).addListener(future -> {
@ -155,6 +156,7 @@ public class NettyPlayerConnection extends PlayerConnection {
}
}
@NotNull
public ChannelFuture writeAndFlush(@NotNull Object message) {
if (MinecraftServer.shouldProcessNettyErrors()) {
return channel.writeAndFlush(message).addListener(future -> {