Skip to content

Commit

Permalink
fix: don't invalidate caps twice
Browse files Browse the repository at this point in the history
Signed-off-by: Octol1ttle <[email protected]>
  • Loading branch information
Octol1ttle committed Apr 3, 2024
1 parent 19e7ea2 commit 1bf1961
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,11 @@ public static void onPlayerClone(final PlayerEvent.Clone event) {
}

Player player = event.getPlayer();

event.getOriginal().reviveCaps(); // Mod devs should not have to do this
PlayerInfoCapability.get(player).readNBT(PlayerInfoCapability.get(event.getOriginal()).writeNBT(new CompoundTag()));
event.getOriginal().invalidateCaps();

event.getOriginal().invalidateCaps();

NonNullList<ItemStack> matchInv = PlayerInfoCapability.get(player).getMatchInventory();

if (!matchInv.isEmpty()) {
Expand Down

0 comments on commit 1bf1961

Please sign in to comment.