Skip to content

Commit

Permalink
Only reset translucency cache if state cant occlude
Browse files Browse the repository at this point in the history
  • Loading branch information
1foxy2 committed Feb 9, 2025
1 parent 8b6b595 commit 1caf377
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public static void resetAllCache() {
// Reset all model translucency cache
Map<BlockState, BakedModel> allModels = ((BlockModelShaperAccessor) blockRenderManager.getBlockModelShaper()).getModels();
allModels.forEach((state, model) -> {
((BakedOpacity) model).moreculling$resetTranslucencyCache(state);
if (!state.canOcclude()) {
((BakedOpacity) model).moreculling$resetTranslucencyCache(state);
}
});
//TODO: Reset quad cache
MoreCulling.LOGGER.info(allModels.size() + " cache(s) where cleared!");
Expand Down

0 comments on commit 1caf377

Please sign in to comment.