Skip to content

Commit 3ab728c

Browse files
committed
补充盔甲栏的充能权限配置
1 parent c05f264 commit 3ab728c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/main/java/com/circulation/circulation_networks/api/hub/ChargingPreference.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@ public class ChargingPreference {
1313
private boolean chargeBaubles;
1414
private boolean chargeMainHand;
1515
private boolean chargeOffHand;
16+
private boolean chargeArmorSlot;
1617

1718
public ChargingPreference(boolean chargeInventory, boolean chargeHotbar, boolean chargeBaubles,
18-
boolean chargeMainHand, boolean chargeOffHand) {
19+
boolean chargeMainHand, boolean chargeOffHand, boolean chargeArmorSlot) {
1920
this.chargeInventory = chargeInventory;
2021
this.chargeHotbar = chargeHotbar;
2122
this.chargeBaubles = chargeBaubles;
2223
this.chargeMainHand = chargeMainHand;
2324
this.chargeOffHand = chargeOffHand;
25+
this.chargeArmorSlot = chargeArmorSlot;
2426
}
2527

2628
public static ChargingPreference defaultAll() {
27-
return new ChargingPreference(true, true, true, true, true);
29+
return new ChargingPreference(true, true, true, true, true, true);
2830
}
2931

3032
public static ChargingPreference deserialize(NBTTagCompound nbt) {
@@ -33,7 +35,8 @@ public static ChargingPreference deserialize(NBTTagCompound nbt) {
3335
nbt.getBoolean("hotbar"),
3436
nbt.getBoolean("baubles"),
3537
nbt.getBoolean("mainHand"),
36-
nbt.getBoolean("offHand")
38+
nbt.getBoolean("offHand"),
39+
nbt.getBoolean("armorSlot")
3740
);
3841
}
3942

@@ -44,6 +47,7 @@ public NBTTagCompound serialize() {
4447
nbt.setBoolean("baubles", chargeBaubles);
4548
nbt.setBoolean("mainHand", chargeMainHand);
4649
nbt.setBoolean("offHand", chargeOffHand);
50+
nbt.setBoolean("armorSlot", chargeArmorSlot);
4751
return nbt;
4852
}
4953
}

0 commit comments

Comments
 (0)