Revert "Refactor and rename to Thresholds"
This reverts commit cd9d548806
.
This commit is contained in:
parent
cd9d548806
commit
858f359d4b
578 changed files with 215113 additions and 214942 deletions
|
@ -0,0 +1,27 @@
|
|||
package dev.zontreck.otemod.configs;
|
||||
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.player.Abilities;
|
||||
|
||||
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){
|
||||
Abilities playerAbilities = play.getAbilities();
|
||||
playerAbilities.flying=Flying;
|
||||
playerAbilities.mayfly=FlyEnabled;
|
||||
|
||||
play.onUpdateAbilities();
|
||||
}
|
||||
}
|
Reference in a new issue