diff --git a/.github/versions.json b/.github/versions.json index 324fd5c58..331119cf6 100644 --- a/.github/versions.json +++ b/.github/versions.json @@ -1,8 +1,8 @@ { - "1.19.2": "1.8.6", - "1.19.1": "1.8.6", - "1.19": "1.8.6", - "1.18.2": "1.4.7", + "1.19.2": "1.8.7", + "1.19.1": "1.8.7", + "1.19": "1.8.7", + "1.18.2": "1.4.8", "1.18.1": "1.2.5", "1.18": "1.2.5" } \ No newline at end of file diff --git a/common/src/main/java/com/faboslav/friendsandfoes/entity/MaulerEntity.java b/common/src/main/java/com/faboslav/friendsandfoes/entity/MaulerEntity.java index 6fa94d429..e18e38144 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/entity/MaulerEntity.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/entity/MaulerEntity.java @@ -117,6 +117,7 @@ public MaulerEntity(EntityType entityType, World world) BURROWING_DOWN_ANIMATION_PROGRESS = DataTracker.registerData(MaulerEntity.class, TrackedDataHandlerRegistry.FLOAT); } + @Override protected void initDataTracker() { super.initDataTracker(); this.dataTracker.startTracking(TYPE, Type.DESERT.name()); @@ -128,6 +129,7 @@ protected void initDataTracker() { this.dataTracker.startTracking(BURROWING_DOWN_ANIMATION_PROGRESS, 0.0F); } + @Override public void writeCustomDataToNbt(NbtCompound nbt) { super.writeCustomDataToNbt(nbt); this.writeAngerToNbt(nbt); @@ -137,7 +139,7 @@ public void writeCustomDataToNbt(NbtCompound nbt) { nbt.putInt(TICKS_UNTIL_NEXT_BURROWING_DOWN_NBT_NAME, this.getTicksUntilNextBurrowingDown()); nbt.putFloat(BURROWING_DOWN_ANIMATION_PROGRESS_NBT_NAME, this.getBurrowingDownAnimationProgress()); - if (this.isBurrowedDown() && this.burrowDownGoal.getBurrowedDownTicks() > 0) { + if (this.burrowDownGoal != null && this.isBurrowedDown() && this.burrowDownGoal.getBurrowedDownTicks() > 0) { nbt.putInt(BURROWED_DOWN_TICKS_NBT_NAME, this.burrowDownGoal.getBurrowedDownTicks()); } } @@ -152,7 +154,7 @@ public void readCustomDataFromNbt(NbtCompound nbt) { this.setTicksUntilNextBurrowingDown(nbt.getInt(TICKS_UNTIL_NEXT_BURROWING_DOWN_NBT_NAME)); this.setBurrowingDownAnimationProgress(nbt.getFloat(BURROWING_DOWN_ANIMATION_PROGRESS_NBT_NAME)); - if (this.isBurrowedDown() && nbt.contains(BURROWED_DOWN_TICKS_NBT_NAME)) { + if (this.burrowDownGoal != null && this.isBurrowedDown() && nbt.contains(BURROWED_DOWN_TICKS_NBT_NAME)) { this.burrowDownGoal.setBurrowedDownTicks(nbt.getInt(BURROWED_DOWN_TICKS_NBT_NAME)); this.setInvulnerable(true); this.setInvisible(true); diff --git a/gradle.properties b/gradle.properties index adb1e21dc..b0889956c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.configureondemand=false # Mod mod_name=Friends&Foes mod_id=friendsandfoes -mod_version=1.8.6 +mod_version=1.8.7 mod_author=Faboslav mod_description=Adds outvoted and forgotten mobs from the mob votes in a believable vanilla plus style. maven_group=com.faboslav.friendsandfoes