mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fixed mipmapping not being enabled by expanding 1x1 texture
This commit is contained in:
1 parent
0f162ddc6a
commit
46b1b82f13
1 file changed
+6
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user