fix more compile errors

This commit is contained in:
Jake Potrebic
2023-06-08 12:00:58 -07:00
parent 5c83f1aca3
commit ebe89a7928
10 changed files with 30 additions and 17 deletions

View File

@@ -56,7 +56,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ final ItemStack copy = copyItemStack ? itemStack.copy() : itemStack;
+ if (level.paperConfig().anticheat.obfuscation.items.hideDurability) {
+ if (this.level().paperConfig().anticheat.obfuscation.items.hideDurability) {
+ // Only show damage values for elytra's, since they show a different texture when broken.
+ if (!copy.is(Items.ELYTRA) || copy.getDamageValue() < copy.getMaxDamage() - 1) {
+ copy.setDamageValue(0);
@@ -64,7 +64,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ final CompoundTag tag = copy.getTag();
+ if (level.paperConfig().anticheat.obfuscation.items.hideItemmeta) {
+ if (this.level().paperConfig().anticheat.obfuscation.items.hideItemmeta) {
+ // Some resource packs show different textures when there is more than one item. Since this shouldn't provide a big advantage,
+ // we'll tell the client if there's one or (more than) two items.
+ copy.setCount(copy.getCount() > 1 ? 2 : 1);
@@ -99,7 +99,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ }
+
+ if (level.paperConfig().anticheat.obfuscation.items.hideItemmetaWithVisualEffects && tag != null) {
+ if (this.level().paperConfig().anticheat.obfuscation.items.hideItemmetaWithVisualEffects && tag != null) {
+ // Lodestone compasses
+ tag.remove("LodestonePos");
+ if (tag.contains("LodestoneDimension")) {