From 091cb159d299d7fb4d3e6958bfe9138c96e126dd Mon Sep 17 00:00:00 2001 From: Timo Ley Date: Thu, 11 Jul 2024 10:08:42 +0200 Subject: [PATCH] fix: crash with CustomModspawner --- build.gradle | 2 +- src/main/java/icbm/zhapin/daodan/EMissile.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 406cca1..2835ff5 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ sourceSets { api {} } -version = "1.0.8" +version = "1.0.9" group = "universalelectricity" archivesBaseName = "icbm" diff --git a/src/main/java/icbm/zhapin/daodan/EMissile.java b/src/main/java/icbm/zhapin/daodan/EMissile.java index b09d9c7..a77d14b 100644 --- a/src/main/java/icbm/zhapin/daodan/EMissile.java +++ b/src/main/java/icbm/zhapin/daodan/EMissile.java @@ -665,7 +665,9 @@ public class EMissile extends Entity @Override protected void writeEntityToNBT(final NBTTagCompound nbt) { - nbt.setTag("kaiShi", this.origin.writeToNBT(new NBTTagCompound())); + if (this.origin != null) { + nbt.setTag("kaiShi", this.origin.writeToNBT(new NBTTagCompound())); + } if (this.target != null) { nbt.setTag("muBiao", this.target.writeToNBT(new NBTTagCompound()));