Fix quantum suit not sending abilities updates.
Closes https://github.com/TechReborn/TechReborn/issues/3150
This commit is contained in:
parent
8ae6f3e7e5
commit
ba99161222
1 changed files with 4 additions and 0 deletions
|
@ -101,6 +101,8 @@ public class QuantumSuitItem extends TREnergyArmourItem implements ArmorBlockEnt
|
||||||
if (enableFlight) {
|
if (enableFlight) {
|
||||||
if (getStoredEnergy(stack) > flyCost) {
|
if (getStoredEnergy(stack) > flyCost) {
|
||||||
playerEntity.getAbilities().allowFlying = true;
|
playerEntity.getAbilities().allowFlying = true;
|
||||||
|
playerEntity.sendAbilitiesUpdate();
|
||||||
|
|
||||||
if (playerEntity.getAbilities().flying) {
|
if (playerEntity.getAbilities().flying) {
|
||||||
tryUseEnergy(stack, flyCost);
|
tryUseEnergy(stack, flyCost);
|
||||||
}
|
}
|
||||||
|
@ -108,6 +110,7 @@ public class QuantumSuitItem extends TREnergyArmourItem implements ArmorBlockEnt
|
||||||
} else {
|
} else {
|
||||||
playerEntity.getAbilities().allowFlying = false;
|
playerEntity.getAbilities().allowFlying = false;
|
||||||
playerEntity.getAbilities().flying = false;
|
playerEntity.getAbilities().flying = false;
|
||||||
|
playerEntity.sendAbilitiesUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (playerEntity.isOnFire() && tryUseEnergy(stack, fireExtinguishCost)) {
|
if (playerEntity.isOnFire() && tryUseEnergy(stack, fireExtinguishCost)) {
|
||||||
|
@ -134,6 +137,7 @@ public class QuantumSuitItem extends TREnergyArmourItem implements ArmorBlockEnt
|
||||||
if (!playerEntity.isCreative() && !playerEntity.isSpectator()) {
|
if (!playerEntity.isCreative() && !playerEntity.isSpectator()) {
|
||||||
playerEntity.getAbilities().allowFlying = false;
|
playerEntity.getAbilities().allowFlying = false;
|
||||||
playerEntity.getAbilities().flying = false;
|
playerEntity.getAbilities().flying = false;
|
||||||
|
playerEntity.sendAbilitiesUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue