mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 06:53:20 +00:00
Add missing patches for not lowering mipmap level for small textures (#8622)
This commit is contained in:
1 parent
4c09d8d774
commit
5410f9b532
3 files changed
+52
No files matched your search
@@ -30,6 +30,7 @@ import net.minecraft.network.Connection;
|
||||
import net.minecraft.network.chat.*;
|
||||
import net.minecraft.network.protocol.status.ServerStatus;
|
||||
import net.minecraft.server.WorldStem;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.effect.MobEffectInstance;
|
||||
import net.minecraft.world.entity.HumanoidArm;
|
||||
import net.minecraft.world.inventory.tooltip.TooltipComponent;
|
||||
@@ -1140,4 +1141,12 @@ public class ForgeHooksClient
|
||||
|
||||
Minecraft.getInstance().setScreen(screen);
|
||||
}
|
||||
|
||||
public static int getMaxMipmapLevel(int width, int height)
|
||||
{
|
||||
return Math.min(
|
||||
Mth.log2(Math.max(1, width)),
|
||||
Mth.log2(Math.max(1, height))
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user