From 4b965305f45a75056d6b7ce80ceae7a1b7aeaee4 Mon Sep 17 00:00:00 2001 From: Skye Date: Mon, 19 Aug 2024 06:54:48 +0000 Subject: [PATCH] Don't try to getStoredPlayer on client --- .../circles/impetuses/BlockEntityRedstoneImpetus.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java index c46b7aeedf..b776d156ce 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java @@ -40,9 +40,11 @@ public BlockEntityRedstoneImpetus(BlockPos pWorldPosition, BlockState pBlockStat protected @Nullable GameProfile getPlayerName() { - Player player = getStoredPlayer(); - if (player != null) { - return player.getGameProfile(); + if (this.level instanceof ServerLevel) { + Player player = getStoredPlayer(); + if (player != null) { + return player.getGameProfile(); + } } return this.storedPlayerProfile;