mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-14 12:11:27 +01:00
Fix player gravity
This commit is contained in:
parent
43aca45c05
commit
0f97930f79
@ -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;
|
||||
|
@ -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 -> {
|
||||
|
Loading…
Reference in New Issue
Block a user