From 25c65e80cde3a5a36322e55b010e7f94d5e4a9ef Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 2 Apr 2023 10:36:26 -0400 Subject: [PATCH] Fixed team write error --- core/src/mindustry/io/TypeIO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/io/TypeIO.java b/core/src/mindustry/io/TypeIO.java index 1074e31d89..a12c2f5f7d 100644 --- a/core/src/mindustry/io/TypeIO.java +++ b/core/src/mindustry/io/TypeIO.java @@ -647,8 +647,8 @@ public class TypeIO{ return new ItemStack(readItem(read), read.i()); } - public static void writeTeam(Writes write, Team reason){ - write.b(reason.id); + public static void writeTeam(Writes write, Team team){ + write.b(team == null ? 0 : team.id); } public static Team readTeam(Reads read){