From 8368a1d20a94ee8b84809373ca4faa67ce049e59 Mon Sep 17 00:00:00 2001 From: LexManos Date: Sat, 3 Jan 2026 11:41:49 -0800 Subject: [PATCH] Don't save capabilities if level is null as we don't have enough context --- .../minecraft/world/level/block/entity/BlockEntity.java.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/world/level/block/entity/BlockEntity.java.patch b/patches/minecraft/net/minecraft/world/level/block/entity/BlockEntity.java.patch index 44c7795464..23b5bde849 100644 --- a/patches/minecraft/net/minecraft/world/level/block/entity/BlockEntity.java.patch +++ b/patches/minecraft/net/minecraft/world/level/block/entity/BlockEntity.java.patch @@ -43,7 +43,7 @@ } protected void saveAdditional(ValueOutput p_407573_) { -+ if (getCapabilities() != null) p_407573_.storeNullable("ForgeCaps", CompoundTag.CODEC, serializeCaps(this.level.registryAccess())); ++ if (getCapabilities() != null && this.level != null) p_407573_.storeNullable("ForgeCaps", CompoundTag.CODEC, serializeCaps(this.level.registryAccess())); } public final CompoundTag saveWithFullMetadata(HolderLookup.Provider p_331193_) {