From 46b1b82f13005c0d3c2f66832ffb0a477caa2131 Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Wed, 1 Apr 2015 16:06:03 +0300 Subject: [PATCH] Fixed mipmapping not being enabled by expanding 1x1 texture --- .../java/net/minecraftforge/client/model/ModelLoader.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraftforge/client/model/ModelLoader.java b/src/main/java/net/minecraftforge/client/model/ModelLoader.java index bdcad5454..b770e31a6 100644 --- a/src/main/java/net/minecraftforge/client/model/ModelLoader.java +++ b/src/main/java/net/minecraftforge/client/model/ModelLoader.java @@ -1,5 +1,7 @@ package net.minecraftforge.client.model; +import java.awt.Color; +import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.IOException; import java.util.ArrayList; @@ -476,8 +478,10 @@ public class ModelLoader extends ModelBakery @Override public boolean load(IResourceManager manager, ResourceLocation location) { - BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB); - image.setRGB(0, 0, 0xFFFFFFFF); + BufferedImage image = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB); + Graphics2D graphics = image.createGraphics(); + graphics.setBackground(Color.WHITE); + graphics.clearRect(0, 0, 16, 16); BufferedImage[] images = new BufferedImage[Minecraft.getMinecraft().gameSettings.mipmapLevels + 1]; images[0] = image; loadSprite(images, null);