diff --git a/src/main/java/io/github/foundationgames/phonos/block/entity/RadioRecorderBlockEntity.java b/src/main/java/io/github/foundationgames/phonos/block/entity/RadioRecorderBlockEntity.java index ce5db57..a442aba 100644 --- a/src/main/java/io/github/foundationgames/phonos/block/entity/RadioRecorderBlockEntity.java +++ b/src/main/java/io/github/foundationgames/phonos/block/entity/RadioRecorderBlockEntity.java @@ -63,7 +63,7 @@ public void finishRecording() { } public static void tick(World world, BlockPos pos, BlockState state, RadioRecorderBlockEntity self) { - boolean powered = world.getBlockState(pos).get(Properties.POWERED); + boolean powered = state.get(Properties.POWERED); if (powered != self.powered) { self.powered = powered; diff --git a/src/main/java/io/github/foundationgames/phonos/client/ClientReceiverStorage.java b/src/main/java/io/github/foundationgames/phonos/client/ClientReceiverStorage.java index e0f8956..4de0e02 100644 --- a/src/main/java/io/github/foundationgames/phonos/client/ClientReceiverStorage.java +++ b/src/main/java/io/github/foundationgames/phonos/client/ClientReceiverStorage.java @@ -70,6 +70,8 @@ public static void garbageCollectEntities() { if (entity.isRemoved()) removed.add(entity); } for (var entity : removed) { + if (entity == null) continue; + entityStorage.get(channel).remove(entity); } }