diff options
author | makamys <makamys@outlook.com> | 2021-05-07 10:22:11 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2021-05-07 14:14:58 +0200 |
commit | 17056d8f4a8e3679d7d77a67c65016eee497b8f4 (patch) | |
tree | 41f7960b135da14f849c97f4cd3a7b9699fcc277 /src/main/java/makamys/lodmod/renderer/MeshQuad.java | |
parent | c233ea31da07957d8872d3859d6e75b99937becd (diff) | |
download | Neodymium-17056d8f4a8e3679d7d77a67c65016eee497b8f4.tar.gz Neodymium-17056d8f4a8e3679d7d77a67c65016eee497b8f4.tar.bz2 Neodymium-17056d8f4a8e3679d7d77a67c65016eee497b8f4.zip |
Refactor MyRenderer to use a singleton instead of being static
This should help with memory leaks and clean up the code a bit
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer/MeshQuad.java')
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/MeshQuad.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/MeshQuad.java b/src/main/java/makamys/lodmod/renderer/MeshQuad.java index a48815d..dfd5f0d 100644 --- a/src/main/java/makamys/lodmod/renderer/MeshQuad.java +++ b/src/main/java/makamys/lodmod/renderer/MeshQuad.java @@ -7,6 +7,7 @@ import java.util.Locale; import java.util.Map; import makamys.lodmod.renderer.MeshQuad.QuadPlaneComparator; +import makamys.lodmod.util.SpriteUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; @@ -80,8 +81,8 @@ public class MeshQuad { TextureAtlasSprite sprite = null; Map<String, TextureAtlasSprite> uploadedSprites = ((TextureMap)Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).mapUploadedSprites; - spriteIndex = MyRenderer.getSpriteIndexForUV(avgU, avgV); - sprite = MyRenderer.getSprite(spriteIndex); + spriteIndex = SpriteUtil.getSpriteIndexForUV(avgU, avgV); + sprite = SpriteUtil.getSprite(spriteIndex); if(sprite == null) { System.out.println("Error: couldn't find sprite"); |