refactor: remove unintended diffs

This commit is contained in:
Boy 2024-08-03 15:03:37 +02:00
parent 1b70097f0e
commit 1dd0854b16

View File

@ -11,37 +11,9 @@ public net.minecraft.world.level.block.entity.vault.VaultServerData setItemsToEj
public net.minecraft.world.level.block.entity.vault.VaultServerData hasRewardedPlayer(Lnet/minecraft/world/entity/player/Player;)V
diff --git a/src/main/java/net/minecraft/world/level/block/entity/vault/VaultServerData.java b/src/main/java/net/minecraft/world/level/block/entity/vault/VaultServerData.java
index 85527fa85fa2d172ec7f142ce042c87bd2533029..25303576bb7332ad3850823c8ccff1136c394e1a 100644
index 85527fa85fa2d172ec7f142ce042c87bd2533029..4dd001d1ec9e178f348753fc08991455020a6b38 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/vault/VaultServerData.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/vault/VaultServerData.java
@@ -19,12 +19,12 @@ public class VaultServerData {
static final String TAG_NAME = "server_data";
static Codec<VaultServerData> CODEC = RecordCodecBuilder.create(
instance -> instance.group(
- UUIDUtil.CODEC_LINKED_SET.lenientOptionalFieldOf("rewarded_players", Set.of()).forGetter(data -> data.rewardedPlayers),
- Codec.LONG.lenientOptionalFieldOf("state_updating_resumes_at", Long.valueOf(0L)).forGetter(data -> data.stateUpdatingResumesAt),
- ItemStack.CODEC.listOf().lenientOptionalFieldOf("items_to_eject", List.of()).forGetter(data -> data.itemsToEject),
- Codec.INT.lenientOptionalFieldOf("total_ejections_needed", Integer.valueOf(0)).forGetter(data -> data.totalEjectionsNeeded)
- )
- .apply(instance, VaultServerData::new)
+ UUIDUtil.CODEC_LINKED_SET.lenientOptionalFieldOf("rewarded_players", Set.of()).forGetter(data -> data.rewardedPlayers),
+ Codec.LONG.lenientOptionalFieldOf("state_updating_resumes_at", Long.valueOf(0L)).forGetter(data -> data.stateUpdatingResumesAt),
+ ItemStack.CODEC.listOf().lenientOptionalFieldOf("items_to_eject", List.of()).forGetter(data -> data.itemsToEject),
+ Codec.INT.lenientOptionalFieldOf("total_ejections_needed", Integer.valueOf(0)).forGetter(data -> data.totalEjectionsNeeded)
+ )
+ .apply(instance, VaultServerData::new)
);
private static final int MAX_REWARD_PLAYERS = 128;
private final Set<UUID> rewardedPlayers = new ObjectLinkedOpenHashSet<>();
@@ -52,7 +52,7 @@ public class VaultServerData {
return this.lastInsertFailTimestamp;
}
- public Set<UUID> getRewardedPlayers() {
+ Set<UUID> getRewardedPlayers() {
return this.rewardedPlayers;
}
@@ -60,10 +60,19 @@ public class VaultServerData {
return this.rewardedPlayers.contains(player.getUUID());
}
@ -77,24 +49,6 @@ index 85527fa85fa2d172ec7f142ce042c87bd2533029..25303576bb7332ad3850823c8ccff113
long stateUpdatingResumesAt() {
return this.stateUpdatingResumesAt;
}
@@ -92,7 +107,7 @@ public class VaultServerData {
this.markChanged();
}
- public void setItemsToEject(List<ItemStack> itemsToEject) {
+ void setItemsToEject(List<ItemStack> itemsToEject) {
this.itemsToEject.clear();
this.itemsToEject.addAll(itemsToEject);
this.totalEjectionsNeeded = this.itemsToEject.size();
@@ -120,7 +135,7 @@ public class VaultServerData {
this.rewardedPlayers.addAll(data.rewardedPlayers);
}
- public void markChanged() {
+ private void markChanged() {
this.isDirty = true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftVault.java b/src/main/java/org/bukkit/craftbukkit/block/CraftVault.java
index bfee498287c8358cbc8c9c2b7289d861cb90f0ad..b44d05f3803fb24d37c2450f2f2313483a1ba278 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftVault.java