mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 20:52:34 +00:00
Minecraft 1.21.5
Co-authored-by: Ven <[email protected]> Co-authored-by: Jonathing <[email protected]>
This commit is contained in:
548 files changed
+5432
-7867
No files matched your search
@@ -91,8 +91,6 @@ public class EnergyStorage implements IEnergyStorage, INBTSerializable<Tag> {
|
||||
|
||||
@Override
|
||||
public void deserializeNBT(HolderLookup.Provider registryAccess, Tag nbt) {
|
||||
if (!(nbt instanceof IntTag intNbt))
|
||||
throw new IllegalArgumentException("Can not deserialize to an instance that isn't the default implementation");
|
||||
this.energy = intNbt.getAsInt();
|
||||
this.energy = nbt.asInt().orElseThrow(() -> new IllegalArgumentException("Can not deserialize to an instance that isn't the default implementation"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user