From 92d1823baccdf7352f16f32d9d3f369f3aa50974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Fri, 1 Dec 2023 18:27:59 +0100 Subject: [PATCH] Default values for blaze and illusioner --- .../friendsandfoes/mixin/BlazeEntityMixin.java | 4 ++-- .../friendsandfoes/mixin/IllusionerEntityMixin.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/com/faboslav/friendsandfoes/mixin/BlazeEntityMixin.java b/common/src/main/java/com/faboslav/friendsandfoes/mixin/BlazeEntityMixin.java index 4687d5702..67112120c 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/mixin/BlazeEntityMixin.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/mixin/BlazeEntityMixin.java @@ -22,7 +22,7 @@ public abstract class BlazeEntityMixin extends BlazeLivingEntityMixin implements { private static final String WILDFIRE_UUID_NBT_NAME = "WildfireUuid"; - private Optional friendsandfoes_wildfireUuid; + private Optional friendsandfoes_wildfireUuid = Optional.empty(); protected BlazeEntityMixin(EntityType entityType, World world) { super(entityType, world); @@ -57,7 +57,7 @@ public void friendsandfoes_onDeath(DamageSource damageSource, CallbackInfo ci) { @Nullable public UUID friendsandfoes_getWildfireUuid() { - return (UUID) ((Optional) this.friendsandfoes_wildfireUuid).orElse(null); + return this.friendsandfoes_wildfireUuid.orElse(null); } public void friendsandfoes_setWildfireUuid(@Nullable UUID uuid) { diff --git a/common/src/main/java/com/faboslav/friendsandfoes/mixin/IllusionerEntityMixin.java b/common/src/main/java/com/faboslav/friendsandfoes/mixin/IllusionerEntityMixin.java index fd56d3699..1c6fb6abc 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/mixin/IllusionerEntityMixin.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/mixin/IllusionerEntityMixin.java @@ -50,11 +50,11 @@ public abstract class IllusionerEntityMixin extends IllusionerSpellcastingIllage private static final String TICKS_UNTIL_DESPAWN_NBT_NAME = "TicksUntilDespawn"; private static final String TICKS_UNTIL_CAN_CREATE_ILLUSIONS_NBT_NAME = "TicksUntilCanCreateIllusions"; - private IllusionerEntity friendsandfoes_illusioner; - private boolean friendsandfoes_isIllusion; - private boolean friendsandfoes_wasAttacked; - private int friendsandfoes_ticksUntilDespawn; - private int friendsandfoes_ticksUntilCanCreateIllusion; + private IllusionerEntity friendsandfoes_illusioner = null; + private boolean friendsandfoes_isIllusion = false; + private boolean friendsandfoes_wasAttacked = false; + private int friendsandfoes_ticksUntilDespawn = 0; + private int friendsandfoes_ticksUntilCanCreateIllusion = 0; protected IllusionerEntityMixin( EntityType entityType,