Fix a small bug with the home command where your rotation was set wrong
Fixes an issue where changing dimensions via /home would reset the flight ability
This commit is contained in:
parent
883d41ecc9
commit
c5e8f1cc54
5 changed files with 35 additions and 49 deletions
|
@ -0,0 +1,22 @@
|
|||
package dev.zontreck.otemod.configs;
|
||||
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
|
||||
public class PlayerFlyCache
|
||||
{
|
||||
public boolean FlyEnabled;
|
||||
public boolean Flying;
|
||||
public static PlayerFlyCache cachePlayer(ServerPlayer play){
|
||||
PlayerFlyCache cache = new PlayerFlyCache();
|
||||
cache.FlyEnabled = play.getAbilities().mayfly;
|
||||
cache.Flying = play.getAbilities().flying;
|
||||
|
||||
play.onUpdateAbilities();
|
||||
|
||||
return cache;
|
||||
}
|
||||
|
||||
public void Assert(ServerPlayer play){
|
||||
|
||||
}
|
||||
}
|
Reference in a new issue