Skip to content

Commit

Permalink
Calio: Actually fix #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
MerchantPug committed Mar 13, 2024
1 parent bd19572 commit 935b333
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public static boolean isServerContext(@Nullable RegistryAccess access) {
if (instance == null) return true; // Data Context
if (instance.getConnection() == null) return true; // Outside a world
if (ServerLifecycleHooks.getCurrentServer() == null) return false; // No server.
return access != null;
if (!ServerLifecycleHooks.getCurrentServer().isDedicatedServer()) return true; // Access on non-dedicated servers are the same as the client.
// Read https://github.com/EdwinMindcraft/calio/issues/4 for more information.
return access != null && access != instance.getConnection().registryAccess();
}
}

0 comments on commit 935b333

Please sign in to comment.