Skip to content

Commit

Permalink
fix: Fix last commit possibly resulting in Fabric data not saving cor…
Browse files Browse the repository at this point in the history
…rectly when migrated
  • Loading branch information
BlayTheNinth committed Jan 11, 2025
1 parent f9cc651 commit 75f47e1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ public CompoundTag getPersistentData(Entity entity) {
if (balmData.isEmpty()) {
// If we have no data, try to import from NeoForge in case the world was migrated
balmData = ((BalmEntity) entity).getNeoForgeBalmData();
if (!balmData.isEmpty()) {
((BalmEntity) entity).setFabricBalmData(balmData);
}
}
if (balmData.isEmpty()) {
// If we still have no data, try to import from Forge in case the world was migrated
balmData = ((BalmEntity) entity).getForgeBalmData();
if (!balmData.isEmpty()) {
((BalmEntity) entity).setFabricBalmData(balmData);
}
}
return balmData;
}
Expand Down

0 comments on commit 75f47e1

Please sign in to comment.