1.13 is dead (followup to 8bc0b0a)
This commit is contained in:
@@ -21,7 +21,7 @@ import net.fabricmc.fabric.api.network.ClientSidePacketRegistry;
|
||||
//$$ import net.minecraftforge.fml.network.NetworkRegistry;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//#else
|
||||
//$$ import io.netty.channel.ChannelDuplexHandler;
|
||||
//$$ import io.netty.channel.ChannelHandler;
|
||||
@@ -30,7 +30,7 @@ import net.fabricmc.fabric.api.network.ClientSidePacketRegistry;
|
||||
public class ReplayModRecording implements Module {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private static final AttributeKey<Void> ATTR_CHECKED = AttributeKey.newInstance("ReplayModRecording_checked");
|
||||
//#endif
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ReplayModRecording implements Module {
|
||||
//#if FABRIC>=1
|
||||
ClientSidePacketRegistry.INSTANCE.register(Restrictions.PLUGIN_CHANNEL, (packetContext, packetByteBuf) -> {});
|
||||
//#else
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ NetworkRegistry.newEventChannel(Restrictions.PLUGIN_CHANNEL, () -> "0", any -> true, any -> true);
|
||||
//#else
|
||||
//$$ NetworkRegistry.INSTANCE.newChannel(Restrictions.PLUGIN_CHANNEL, new RestrictionsChannelHandler());
|
||||
@@ -78,7 +78,7 @@ public class ReplayModRecording implements Module {
|
||||
//#endif
|
||||
}
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ @ChannelHandler.Sharable
|
||||
//$$ private static class RestrictionsChannelHandler extends ChannelDuplexHandler {}
|
||||
//#endif
|
||||
@@ -86,7 +86,7 @@ public class ReplayModRecording implements Module {
|
||||
public void initiateRecording(ClientConnection networkManager) {
|
||||
Channel channel = ((NetworkManagerAccessor) networkManager).getChannel();
|
||||
if (channel.pipeline().get("ReplayModReplay_replaySender") != null) return;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (channel.hasAttr(ATTR_CHECKED)) return;
|
||||
channel.attr(ATTR_CHECKED).set(null);
|
||||
//#endif
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.network.ClientConnection;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
//#endif
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ConnectionEventHandler {
|
||||
boolean local = networkManager.isLocal();
|
||||
if (local) {
|
||||
//#if MC>=10800
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (mc.getServer().getWorld(DimensionType.OVERWORLD).getGeneratorType() == LevelGeneratorType.DEBUG_ALL_BLOCK_STATES) {
|
||||
//#else
|
||||
//$$ if (mc.getIntegratedServer().getEntityWorld().getWorldType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.recording.handler;
|
||||
//$$
|
||||
//$$ import io.netty.channel.ChannelHandlerContext;
|
||||
|
||||
@@ -93,7 +93,7 @@ public class RecordingEventHandler extends EventRegistrations {
|
||||
}
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
public void onPacket(Packet<?> packet) {
|
||||
packetListener.save(packet);
|
||||
}
|
||||
@@ -375,7 +375,7 @@ public class RecordingEventHandler extends EventRegistrations {
|
||||
//$$ try {
|
||||
//#if MC>=11100
|
||||
//#if MC>=11200
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ ItemStack stack = event.getStack();
|
||||
//$$ packetListener.save(new SCollectItemPacket(
|
||||
//$$ event.getOriginalEntity().getEntityId(),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
package com.replaymod.recording.mixin;
|
||||
|
||||
import com.replaymod.replay.InputReplayTimer;
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import com.replaymod.recording.handler.RecordingEventHandler.RecordingEventSender;
|
||||
import net.minecraft.network.Packet;
|
||||
@@ -29,7 +29,7 @@ public abstract class MixinNetHandlerLoginClient {
|
||||
//$$ private NetworkManager field_147393_d;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
@Inject(method = "onQueryRequest", at=@At("HEAD"))
|
||||
private void earlyInitiateRecording(LoginQueryRequestS2CPacket packet, CallbackInfo ci) {
|
||||
initiateRecording(packet);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ package com.replaymod.recording.mixin;
|
||||
//$$
|
||||
//$$ import com.replaymod.recording.handler.FMLHandshakeFilter;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.replaymod.recording.mixin;
|
||||
|
||||
//#if MC>=10904 && MC<11300
|
||||
//#if MC>=10904 && MC<11400
|
||||
//$$ import com.replaymod.recording.handler.RecordingEventHandler;
|
||||
//$$ import net.minecraft.client.Minecraft;
|
||||
//$$ import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
|
||||
@@ -24,7 +24,7 @@ import net.minecraft.world.dimension.DimensionType;
|
||||
import java.util.function.BiFunction;
|
||||
//#else
|
||||
//$$ import net.minecraft.world.storage.ISaveHandler;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraft.world.dimension.Dimension;
|
||||
//$$ import net.minecraft.world.storage.WorldSavedDataStorage;
|
||||
//#else
|
||||
@@ -44,18 +44,18 @@ public abstract class MixinWorldClient extends World implements RecordingEventHa
|
||||
}
|
||||
//#else
|
||||
//$$ protected MixinWorldClient(ISaveHandler saveHandlerIn,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ WorldSavedDataStorage mapStorage,
|
||||
//#endif
|
||||
//$$ WorldInfo info,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ Dimension providerIn,
|
||||
//#else
|
||||
//$$ WorldProvider providerIn,
|
||||
//#endif
|
||||
//$$ Profiler profilerIn, boolean client) {
|
||||
//$$ super(saveHandlerIn,
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
//$$ mapStorage,
|
||||
//#endif
|
||||
//$$ info, providerIn, profilerIn, client);
|
||||
|
||||
@@ -38,7 +38,7 @@ import net.minecraft.util.crash.CrashReport;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
import net.minecraft.client.network.packet.LoginSuccessS2CPacket;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
|
||||
@@ -95,7 +95,7 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
||||
private long lastSentPacket;
|
||||
private long timePassedWhilePaused;
|
||||
private volatile boolean serverWasPaused;
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
private NetworkState connectionState = NetworkState.LOGIN;
|
||||
//#else
|
||||
//$$ private EnumConnectionState connectionState = EnumConnectionState.PLAY;
|
||||
@@ -191,7 +191,7 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
||||
}
|
||||
});
|
||||
|
||||
//#if MC>=11300
|
||||
//#if MC>=11400
|
||||
if (packet instanceof LoginSuccessS2CPacket) {
|
||||
connectionState = NetworkState.PLAY;
|
||||
}
|
||||
@@ -286,7 +286,7 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
//#if MC<11300
|
||||
//#if MC<11400
|
||||
//$$ if (packet instanceof FMLProxyPacket) {
|
||||
//$$ // This packet requires special handling
|
||||
//#if MC>=10800
|
||||
|
||||
Reference in New Issue
Block a user