Skip to content

Commit

Permalink
fix levitation
Browse files Browse the repository at this point in the history
  • Loading branch information
Foorcee committed Jan 11, 2020
1 parent 60647e0 commit 79bf9c6
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -276,6 +276,7 @@ public void handle(PacketWrapper packetWrapper) throws Exception {
int id = packetWrapper.get(Type.BYTE, 0);
if (id > 23) packetWrapper.cancel();
if (id == 25) {
if(packetWrapper.get(Type.VAR_INT, 0) != packetWrapper.user().get(EntityTracker.class).getPlayerId()) return;
Levitation levitation = packetWrapper.user().get(Levitation.class);
levitation.setActive(false);
}
Expand Down Expand Up @@ -529,6 +530,7 @@ public void handle(PacketWrapper packetWrapper) throws Exception {
int id = packetWrapper.get(Type.BYTE, 0);
if (id > 23) packetWrapper.cancel();
if (id == 25) {
if(packetWrapper.get(Type.VAR_INT, 0) != packetWrapper.user().get(EntityTracker.class).getPlayerId()) return;
Levitation levitation = packetWrapper.user().get(Levitation.class);
levitation.setActive(true);
levitation.setAmplifier(packetWrapper.get(Type.BYTE, 1));
Expand Down

0 comments on commit 79bf9c6

Please sign in to comment.