SteamWar/SpigotCore
Archiviert
13
0

fix no gravity
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Dieser Commit ist enthalten in:
zOnlyKroks 2023-01-17 12:36:30 +01:00
Ursprung 901fe54754
Commit c9b15b6aa6

Datei anzeigen

@ -85,6 +85,8 @@ public class REntity {
this.itemSlots = entityType == EntityType.PLAYER ? new HashMap<>() : null; this.itemSlots = entityType == EntityType.PLAYER ? new HashMap<>() : null;
this.noGravity = false;
server.addEntity(this); server.addEntity(this);
} }
@ -190,7 +192,8 @@ public class REntity {
public void setNoGravity(boolean noGravity) { public void setNoGravity(boolean noGravity) {
this.noGravity = noGravity; this.noGravity = noGravity;
server.updateEntity(this,getDataWatcherPacket(noGravityDataWatcher,getEntityStatus())); if(Core.getVersion() > 8)
server.updateEntity(this,getDataWatcherPacket(noGravityDataWatcher,noGravity));
} }
private static int spawnPacketOffset() { private static int spawnPacketOffset() {
@ -240,7 +243,7 @@ public class REntity {
} }
if(noGravity) if(noGravity)
packetSink.accept(getDataWatcherPacket(noGravityDataWatcher,getEntityStatus())); packetSink.accept(getDataWatcherPacket(noGravityDataWatcher,this.noGravity));
} }
void tick() { void tick() {