Update ReplayStudio
- MC 1.17 - Updated ViaVersion - Quick Mode supports multiple worlds now (and no longer needs a manual Respawn)
This commit is contained in:
@@ -17,8 +17,6 @@ import io.netty.channel.ChannelHandler;
|
||||
import io.netty.channel.ChannelHandlerAdapter;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.play.PlayerRespawnS2CPacket;
|
||||
import net.minecraft.network.NetworkState;
|
||||
import net.minecraft.network.NetworkSide;
|
||||
import net.minecraft.network.Packet;
|
||||
@@ -26,35 +24,12 @@ import net.minecraft.network.PacketByteBuf;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
//#if MC>=11602
|
||||
import net.minecraft.util.registry.DynamicRegistryManager;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11600
|
||||
import net.minecraft.world.World;
|
||||
//#else
|
||||
//$$ import net.minecraft.world.level.LevelGeneratorType;
|
||||
//#endif
|
||||
//#if MC>=11400
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
//#else
|
||||
//$$ import net.minecraft.world.EnumDifficulty;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11200
|
||||
import com.replaymod.core.utils.WrappedTimer;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11002
|
||||
import net.minecraft.world.GameMode;
|
||||
//#else
|
||||
//$$ import net.minecraft.world.WorldSettings.GameType;
|
||||
//#endif
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.getMinecraft;
|
||||
import static com.replaymod.core.versions.MCVer.getPacketTypeRegistry;
|
||||
import static com.replaymod.replay.ReplayModReplay.LOGGER;
|
||||
@@ -193,42 +168,6 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
|
||||
public void restart() {
|
||||
replay.reset();
|
||||
ctx.fireChannelRead(new PlayerRespawnS2CPacket(
|
||||
//#if MC>=11600
|
||||
//#if MC>=11602
|
||||
DimensionType.addRegistryDefaults(new DynamicRegistryManager.Impl()).get(Registry.DIMENSION_TYPE_KEY).get(DimensionType.OVERWORLD_REGISTRY_KEY),
|
||||
//#else
|
||||
//$$ DimensionType.OVERWORLD_REGISTRY_KEY,
|
||||
//#endif
|
||||
World.OVERWORLD,
|
||||
0,
|
||||
GameMode.SPECTATOR,
|
||||
GameMode.SPECTATOR,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
//#else
|
||||
//#if MC>=11400
|
||||
//$$ DimensionType.OVERWORLD,
|
||||
//#else
|
||||
//$$ 0,
|
||||
//#endif
|
||||
//#if MC>=11500
|
||||
//$$ 0,
|
||||
//#endif
|
||||
//#if MC<11400
|
||||
//$$ EnumDifficulty.NORMAL,
|
||||
//#endif
|
||||
//$$ LevelGeneratorType.DEFAULT,
|
||||
//$$ GameMode.SPECTATOR
|
||||
//#endif
|
||||
));
|
||||
ctx.fireChannelRead(new PlayerPositionLookS2CPacket(
|
||||
0, 0, 0, 0, 0, Collections.emptySet(), 0
|
||||
//#if MC>=11700
|
||||
//$$ , true
|
||||
//#endif
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user