mirror of
https://github.com/MinecraftForge/MinecraftForge
synced 2026-08-22 04:26:10 -04:00
Don't save capabilities if level is null as we don't have enough context
This commit is contained in:
parent
8b8d3fdef7
commit
8368a1d20a
1 changed files with 1 additions and 1 deletions
|
|
@ -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_) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue