Update to 1.16-pre1

This commit is contained in:
Jonas Herzig
2020-06-15 09:44:37 +02:00
parent 14b84c5e1b
commit 2ffde14c60
7 changed files with 29 additions and 12 deletions

View File

@@ -434,7 +434,12 @@ public class MCVer {
//#endif
setServerResourcePack(File file) {
//#if MC>=11400
return getMinecraft().getResourcePackDownloader().loadServerPack(file);
return getMinecraft().getResourcePackDownloader().loadServerPack(
file
//#if MC>=11600
//$$ , net.minecraft.class_5352.field_25350
//#endif
);
//#else
//$$ ResourcePackRepository repo = getMinecraft().getResourcePackRepository();
//#if MC>=10800

View File

@@ -65,7 +65,7 @@ public class ConnectionEventHandler {
if (local) {
//#if MC>=10800
//#if MC>=11600
//$$ if (mc.getServer().getWorld(World.field_25179).isDebugWorld()) {
//$$ if (mc.getServer().getWorld(World.OVERWORLD).isDebugWorld()) {
//#else
//#if MC>=11400
if (mc.getServer().getWorld(DimensionType.OVERWORLD).getGeneratorType() == LevelGeneratorType.DEBUG_ALL_BLOCK_STATES) {
@@ -91,7 +91,7 @@ public class ConnectionEventHandler {
String worldName;
if (local) {
//#if MC>=11600
//$$ worldName = mc.getServer().method_27728().getLevelName();
//$$ worldName = mc.getServer().getSaveProperties().getLevelName();
//#else
worldName = mc.getServer().getLevelName();
//#endif

View File

@@ -30,7 +30,13 @@ public abstract class MixinDownloadingPackFinder implements ResourcePackRecorder
//#if MC>=10800
@Inject(method = "loadServerPack", at = @At("HEAD"))
private void recordDownloadedPack(File file, CallbackInfoReturnable ci) {
private void recordDownloadedPack(
File file,
//#if MC>=11600
//$$ net.minecraft.class_5352 arg,
//#endif
CallbackInfoReturnable ci
) {
if (requestCallback != null) {
requestCallback.consume(file);
requestCallback = null;

View File

@@ -31,7 +31,6 @@ import net.minecraft.network.packet.s2c.play.ChatMessageS2CPacket;
import net.minecraft.network.packet.s2c.play.CustomPayloadS2CPacket;
import net.minecraft.network.packet.s2c.play.DisconnectS2CPacket;
import net.minecraft.network.packet.s2c.play.EntitiesDestroyS2CPacket;
import net.minecraft.network.packet.s2c.play.EntitySpawnGlobalS2CPacket;
import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;
import net.minecraft.network.packet.s2c.play.ExperienceBarUpdateS2CPacket;
import net.minecraft.network.packet.s2c.play.ExperienceOrbSpawnS2CPacket;
@@ -65,6 +64,11 @@ import de.johni0702.minecraft.gui.versions.callbacks.PreTickCallback;
//$$ import net.minecraftforge.event.TickEvent;
//#endif
//#if MC>=11600
//#else
import net.minecraft.network.packet.s2c.play.EntitySpawnGlobalS2CPacket;
//#endif
//#if MC>=11400
import net.minecraft.network.packet.s2c.play.PlayerActionResponseS2CPacket;
import net.minecraft.network.packet.s2c.play.OpenContainerS2CPacket;
@@ -417,7 +421,9 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
if (p instanceof PlayerSpawnS2CPacket
|| p instanceof EntitySpawnS2CPacket
|| p instanceof MobSpawnS2CPacket
//#if MC<11600
|| p instanceof EntitySpawnGlobalS2CPacket
//#endif
|| p instanceof PaintingSpawnS2CPacket
|| p instanceof ExperienceOrbSpawnS2CPacket
|| p instanceof EntitiesDestroyS2CPacket) {

View File

@@ -196,7 +196,7 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
ctx.fireChannelRead(new PlayerRespawnS2CPacket(
//#if MC>=11600
//$$ DimensionType.OVERWORLD_REGISTRY_KEY,
//$$ World.field_25179,
//$$ World.OVERWORLD,
//$$ 0,
//$$ GameMode.SPECTATOR,
//$$ false,