diff --git a/src/main/java/turniplabs/halplibe/mixin/mixins/RenderEngineMixin.java b/src/main/java/turniplabs/halplibe/mixin/mixins/RenderEngineMixin.java index 44b3421..1a4f047 100644 --- a/src/main/java/turniplabs/halplibe/mixin/mixins/RenderEngineMixin.java +++ b/src/main/java/turniplabs/halplibe/mixin/mixins/RenderEngineMixin.java @@ -6,7 +6,6 @@ import net.minecraft.client.render.dynamictexture.DynamicTexture; import net.minecraft.core.Global; import net.minecraft.core.util.helper.Buffer; -import net.minecraft.core.util.helper.Textures; import org.lwjgl.opengl.GL11; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; @@ -14,31 +13,22 @@ import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import turniplabs.halplibe.helper.TextureHelper; -import java.awt.*; import java.awt.image.BufferedImage; -import java.awt.image.WritableRaster; import java.nio.ByteBuffer; import java.util.List; -import java.util.Map; @Mixin(value = RenderEngine.class, remap = false) public abstract class RenderEngineMixin { @Shadow private List dynamicTextures; - - @Shadow public abstract int getTexture(String name); - @Shadow protected abstract void generateMipmaps(ByteBuffer buffer, BufferedImage image, int levels, boolean smooth); @Shadow @Final public Minecraft minecraft; @Shadow private boolean clampTexture; @Shadow private boolean blurTexture; - @Shadow private Map textureMap; @Unique private final RenderEngine thisAsRenderEngine = (RenderEngine)(Object)this; @Inject(method = "initDynamicTextures", at = @At("TAIL")) @@ -63,7 +53,7 @@ private void adjustAtlasSize(BufferedImage img, int id, boolean mipmap, Callback // } // } // } - if (mipmap){ + if (mipmap){ // TODO Replace with a way to directly detect if a texture is Terrain.png or Items.png BufferedImage resizedAtlas = new BufferedImage((img.getWidth()/32) * Global.TEXTURE_ATLAS_WIDTH_TILES, (img.getHeight()/32) * Global.TEXTURE_ATLAS_WIDTH_TILES, img.getType()); if (img.getWidth() == resizedAtlas.getWidth() && img.getHeight() == resizedAtlas.getHeight()){ return; // Don't scale and transfer image if they're the same size