Fix compilation of 1.14.4

This commit is contained in:
Jonas Herzig
2020-03-30 01:03:46 +02:00
parent 82bbf7b495
commit 5c13995e59
5 changed files with 8 additions and 25 deletions

View File

@@ -73,17 +73,10 @@ public abstract class UriScheme {
switch (SystemUtil.getOperatingSystem()) { switch (SystemUtil.getOperatingSystem()) {
case LINUX: case LINUX:
return new LinuxUriScheme(); return new LinuxUriScheme();
//#if MC>=11500 case WINDOWS:
//$$ case WINDOWS:
//$$ return new WindowsUriScheme();
//$$ case OSX:
//$$ return new OSXUriScheme();
//#else
case field_1133:
return new WindowsUriScheme(); return new WindowsUriScheme();
case field_1137: case OSX:
return new OSXUriScheme(); return new OSXUriScheme();
//#endif
case SOLARIS: case SOLARIS:
case UNKNOWN: case UNKNOWN:
default: default:

View File

@@ -96,7 +96,7 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
private long timePassedWhilePaused; private long timePassedWhilePaused;
private volatile boolean serverWasPaused; private volatile boolean serverWasPaused;
//#if MC>=11300 //#if MC>=11300
private NetworkState connectionState = NetworkState.field_11688; private NetworkState connectionState = NetworkState.LOGIN;
//#else //#else
//$$ private EnumConnectionState connectionState = EnumConnectionState.PLAY; //$$ private EnumConnectionState connectionState = EnumConnectionState.PLAY;
//#endif //#endif
@@ -193,7 +193,7 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
//#if MC>=11300 //#if MC>=11300
if (packet instanceof LoginSuccessS2CPacket) { if (packet instanceof LoginSuccessS2CPacket) {
connectionState = NetworkState.field_11690; connectionState = NetworkState.PLAY;
} }
//#endif //#endif
} catch(Exception e) { } catch(Exception e) {

View File

@@ -174,12 +174,7 @@ public class RenderSettings {
private static String findFFmpeg() { private static String findFFmpeg() {
switch (SystemUtil.getOperatingSystem()) { switch (SystemUtil.getOperatingSystem()) {
// TODO not sure why remap fails to remap this (even when manually added to mappings) case WINDOWS:
//#if MC>=11500
//$$ case WINDOWS:
//#else
case field_1133:
//#endif
// Allow windows users to unpack the ffmpeg archive into a sub-folder of their .minecraft folder // Allow windows users to unpack the ffmpeg archive into a sub-folder of their .minecraft folder
File inDotMinecraft = new File(MCVer.getMinecraft().runDirectory, "ffmpeg/bin/ffmpeg.exe"); File inDotMinecraft = new File(MCVer.getMinecraft().runDirectory, "ffmpeg/bin/ffmpeg.exe");
if (inDotMinecraft.exists()) { if (inDotMinecraft.exists()) {
@@ -187,12 +182,7 @@ public class RenderSettings {
return inDotMinecraft.getAbsolutePath(); return inDotMinecraft.getAbsolutePath();
} }
break; break;
// TODO not sure why remap fails to remap this (even when manually added to mappings) case OSX:
//#if MC>=11500
//$$ case OSX:
//#else
case field_1137:
//#endif
// The PATH doesn't seem to be set as expected on OSX, therefore we check some common locations ourselves // The PATH doesn't seem to be set as expected on OSX, therefore we check some common locations ourselves
for (String path : new String[]{"/usr/local/bin/ffmpeg", "/usr/bin/ffmpeg"}) { for (String path : new String[]{"/usr/local/bin/ffmpeg", "/usr/bin/ffmpeg"}) {
File file = new File(path); File file = new File(path);

View File

@@ -465,7 +465,7 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
int i = pb.readVarInt(); int i = pb.readVarInt();
NetworkState state = loginPhase ? NetworkState.field_11688 : NetworkState.field_11690; NetworkState state = loginPhase ? NetworkState.LOGIN : NetworkState.PLAY;
//#if MC>=10800 //#if MC>=10800
Packet p = state.getPacketHandler(NetworkSide.CLIENTBOUND, i); Packet p = state.getPacketHandler(NetworkSide.CLIENTBOUND, i);
//#else //#else

View File

@@ -98,7 +98,7 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
//#else //#else
Packet<?> mcPacket; Packet<?> mcPacket;
try { try {
mcPacket = NetworkState.field_11690.getPacketHandler(NetworkSide.CLIENTBOUND, packetId); mcPacket = NetworkState.PLAY.getPacketHandler(NetworkSide.CLIENTBOUND, packetId);
} catch (IllegalAccessException | InstantiationException e) { } catch (IllegalAccessException | InstantiationException e) {
throw new IOException(e); throw new IOException(e);
} }