PaperMC / mache

Compilable patches for the decompiled Minecraft server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gradle using wrong encoding

Leguan16 opened this issue · comments

When I try to build the version it prints a weird error message:

> Task :versions:v1_20_6:compileJava
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\ChatFormatting.java:40: error: unclosed character literal
    public static final char PREFIX_CODE = '§';
                                           ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\ChatFormatting.java:40: error: illegal character: '\u00a7'
    public static final char PREFIX_CODE = '§';
                                             ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\ChatFormatting.java:40: error: unclosed character literal
    public static final char PREFIX_CODE = '§';
                                              ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\server\level\ChunkMap.java:298: error: unclosed character literal
            string = string + '§' + fullStatus.ordinal() + fullStatus;
                              ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\server\level\ChunkMap.java:298: error: illegal character: '\u00a7'
            string = string + '§' + fullStatus.ordinal() + fullStatus;
                                ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\server\level\ChunkMap.java:298: error: unclosed character literal
            string = string + '§' + fullStatus.ordinal() + fullStatus;
                                 ^
G:\projects\mache\versions\1.20.6\src\main\java\net\minecraft\server\level\ChunkMap.java:298: error: not a statement
            string = string + '§' + fullStatus.ordinal() + fullStatus;
                                                          ^
7 errors

FAILURE: Build failed with an exception.

This is due to incorrect encoding settings.

Setting this property in gradle.properties fixes the issue.

org.gradle.jvmargs='-Dfile.encoding=UTF-8'