Skip to content

Commit

Permalink
Make sure citizen model info is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
someaddons committed Aug 31, 2024
1 parent ad47daf commit d6b109e
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import com.minecolonies.core.entity.pathfinding.pathresults.PathResult;
import com.minecolonies.core.entity.pathfinding.proxy.EntityCitizenWalkToProxy;
import com.minecolonies.core.event.EventHandler;
import com.minecolonies.core.event.TextureReloadListener;
import com.minecolonies.core.network.messages.client.ItemParticleEffectMessage;
import com.minecolonies.core.network.messages.client.VanillaParticleMessage;
import com.minecolonies.core.network.messages.client.colony.ColonyViewCitizenViewMessage;
Expand Down Expand Up @@ -2000,6 +2001,14 @@ public void onSyncedDataUpdated(EntityDataAccessor<?> dataAccessor)
{
citizenColonyHandler.onSyncDataUpdate(dataAccessor);
}

if (level().isClientSide && dataAccessor == DATA_STYLE)
{
if (!TextureReloadListener.TEXTURE_PACKS.contains(getEntityData().get(DATA_STYLE)))
{
getEntityData().set(DATA_STYLE, TextureReloadListener.TEXTURE_PACKS.get(0));
}
}
}

@Override
Expand Down

0 comments on commit d6b109e

Please sign in to comment.