diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-07-09 01:02:36 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-08-19 17:34:05 +0800 |
| commit | 1e1dd2571b4f3f1e523bb008fa29976feeb33853 (patch) | |
| tree | 52e909068bcf05176a586b7a2be27e5f34daffde /runtime/src | |
| parent | f0f5bcd5dc507fbd94e456eeb13ba7e675d42b93 (diff) | |
| download | RoughlyEnoughItems-1e1dd2571b4f3f1e523bb008fa29976feeb33853.tar.gz RoughlyEnoughItems-1e1dd2571b4f3f1e523bb008fa29976feeb33853.tar.bz2 RoughlyEnoughItems-1e1dd2571b4f3f1e523bb008fa29976feeb33853.zip | |
Prevent error spam when the client joins server without recipe sync packets
Diffstat (limited to 'runtime/src')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/ClientHelperImpl.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/ClientHelperImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/ClientHelperImpl.java index 0e3b6e080..09be7e0ba 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/ClientHelperImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/ClientHelperImpl.java @@ -233,6 +233,11 @@ public class ClientHelperImpl implements ClientHelper { @ApiStatus.Internal public LongSet _getInventoryItemsTypes() { + try { + VanillaEntryTypes.ITEM.getDefinition(); + } catch (NullPointerException e) { + return new LongOpenHashSet(); + } return Minecraft.getInstance().player.inventory.compartments.stream() .flatMap(Collection::stream) .map(EntryStacks::of) |
