mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 20:52:34 +00:00
Remove uses of java.awt (#5591)
`java.awt` will statically load itself when `java.awt.Color`, `java.awt.Dimension`, etc are loaded. This conflicts with lwjgl3 and must be avoided (except for in mojang's server gui).
This commit is contained in:
1 parent
5e7279b0a2
commit
5fa732d223
11 files changed
+83
-39
No files matched your search
@@ -21,7 +21,6 @@ package net.minecraftforge.client;
|
||||
|
||||
import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -676,7 +675,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
GlStateManager.translatef((float)(width / 2), (float)(height - 68), 0.0F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
int color = (animateOverlayMessageColor ? Color.HSBtoRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
|
||||
int color = (animateOverlayMessageColor ? MathHelper.hsvToRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
|
||||
fontrenderer.drawStringWithShadow(overlayMessage, -fontrenderer.getStringWidth(overlayMessage) / 2, -4, color | (opacity << 24));
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
@@ -25,7 +25,6 @@ import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
@@ -34,7 +33,7 @@ import java.io.File;
|
||||
* This event is {@link Cancelable}
|
||||
*
|
||||
* {@link #screenshotFile} contains the file the screenshot will be/was saved to
|
||||
* {@link #image} contains the {@link BufferedImage} that will be saved
|
||||
* {@link #image} contains the {@link NativeImage} that will be saved
|
||||
* {@link #resultMessage} contains the {@link ITextComponent} to be returned. If {@code null}, the default vanilla message will be used instead
|
||||
*/
|
||||
@Cancelable
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
|
||||
package net.minecraftforge.client.model;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
Reference in new issue
Block a user