mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-12 00:07:29 +00:00
Revert fluid animation fix for Quartz Tank to mitigate FPS issue (#157)
This commit is contained in:
1 parent
4de0ee4b1a
commit
1f55def09f
2 files changed
+6
-16
No files matched your search
@@ -3,11 +3,8 @@ package com.glodblock.github.client.render.tank;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -78,7 +75,7 @@ public class FluidTankRenderer {
|
||||
return null;
|
||||
}
|
||||
Map<Fluid, int[]> cache = flowing ? flowingRenderCache : stillRenderCache;
|
||||
int[] diplayLists = getCachedData(fluid, cache);
|
||||
int[] diplayLists = cache.get(fluid);
|
||||
if (diplayLists != null) {
|
||||
return diplayLists;
|
||||
}
|
||||
@@ -122,11 +119,4 @@ public class FluidTankRenderer {
|
||||
return diplayLists;
|
||||
}
|
||||
|
||||
private static int[] getCachedData(@Nonnull Fluid fluid, Map<Fluid, int[]> cache) {
|
||||
IIcon icon = fluid.getIcon();
|
||||
if (icon instanceof TextureAtlasSprite sprite && sprite.hasAnimationMetadata()) {
|
||||
return null;
|
||||
}
|
||||
return cache.get(fluid);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user