fix color tints not clearing with other colors

This commit is contained in:
James Seibel
2026-05-15 18:29:53 -05:00
parent b0c7919dda
commit 2e4477b533
4 changed files with 31 additions and 5 deletions
@@ -345,9 +345,9 @@ public abstract class AbstractDhTintGetter implements BlockAndTintGetter
//===========//
// set color //
//===========//
//=================//
// static handlers //
//=================//
//region
/**
@@ -360,6 +360,8 @@ public abstract class AbstractDhTintGetter implements BlockAndTintGetter
COLOR_BY_BLOCK_BIOME_PAIR.put(pair, colorInt);
}
public static void clear() { COLOR_BY_BLOCK_BIOME_PAIR.clear(); }
//endregion
@@ -828,6 +828,23 @@ public class ClientBlockStateColorCache
//=========//
// cleanup //
//=========//
//region
public static void clearCachedTints()
{
#if MC_VER <= MC_1_12_2
#else
AbstractDhTintGetter.clear();
#endif
}
//endregion
//================//
// helper classes //
//================//
@@ -289,7 +289,14 @@ public class ClientLevelWrapper implements IClientLevelWrapper
}
@Override
public void clearBlockColorCache() { this.blockColorCacheByBlockState.clear(); }
public void clearBlockColorCache()
{
this.blockColorCacheByBlockState.clear();
// this technically only needs to be called once globally, but it's easier
// to handle here statically
ClientBlockStateColorCache.clearCachedTints();
}
private IDimensionTypeWrapper dimensionTypeWrapper = null;
@Override