Remove dependency on the java.desktop module

The Favicon.create(BufferedImage) method has been removed. In its place we have Favicon.create(Path) (carried over from the 1.x.x series) and Favicon.create(byte[]) (brand new).
This commit is contained in:
Andrew Steinborn
2020-12-14 14:30:39 -05:00
parent f61b187b3d
commit ef7f4871b8
7 changed files with 75 additions and 28 deletions

View File

@@ -11,10 +11,6 @@ public class Velocity {
private static final Logger logger = LogManager.getLogger(Velocity.class);
static {
// We use BufferedImage for favicons, and on macOS this puts the Java application in the dock.
// How inconvenient. Force AWT to work with its head chopped off.
System.setProperty("java.awt.headless", "true");
// By default, Netty allocates 16MiB arenas for the PooledByteBufAllocator. This is too much
// memory for Minecraft, which imposes a maximum packet size of 2MiB! We'll use 4MiB as a more
// sane default.