Skip to content

Commit

Permalink
Backport to 1.20.4, resolves #51
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Aug 23, 2024
1 parent 3c3b1aa commit bcbd8f6
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 61 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
val shade: Configuration by configurations.creating

repositories {
mavenLocal()
maven("https://maven.parchmentmc.org/")
maven("https://masa.dy.fi/maven")
maven("https://jitpack.io")
Expand Down Expand Up @@ -58,7 +59,7 @@ dependencies {
implementation("de.maxhenkel.voicechat:voicechat-api:${voicechatApiVersion}")

modCompileOnly("maven.modrinth:vmp-fabric:${vmpVersion}")
modCompileOnly("com.github.sakura-ryoko:syncmatica:${syncmaticaVersion}")
modCompileOnly("com.github.sakura:syncmatica:${syncmaticaVersion}")

// I've had some issues with ReplayStudio and slf4j (in dev env)
// Simplest workaround that I've found is just to unzip the
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ carpetVersion=1.4.128
voicechatVersion=1.20.4-2.5.1
voicechatApiVersion=2.4.0
vmpVersion=0.2.0+beta.7.139+1.20.4
syncmaticaVersion=1.20.4-0.3.11
syncmaticaVersion=0.3.11

modVersion=1.1.2

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
package me.senseiwells.replay.mixin.compat.syncmatica;

import ch.endte.syncmatica.network.SyncmaticaPacket;
import ch.endte.syncmatica.network.SyncmaticaPayload;
import me.senseiwells.replay.api.network.RecordablePayload;
import net.minecraft.network.FriendlyByteBuf;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.asm.mixin.Mixin;

@Mixin(SyncmaticaPacket.Payload.class)
@Mixin(SyncmaticaPayload.class)
@SuppressWarnings("AddedMixinMembersNamePattern")
public class SyncmaticaPacketPayloadMixin implements RecordablePayload {
@Override
public boolean shouldRecord() {
return false;
}

@Override
public void record(@NotNull FriendlyByteBuf buf) {

}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package me.senseiwells.replay.mixin.rejoin;

import net.minecraft.network.Connection;
import net.minecraft.network.PacketListener;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(Connection.class)
public interface ConnectionAccessor {
@Accessor("packetListener")
void setPacketListener(PacketListener listener);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package me.senseiwells.replay.api.network

import net.minecraft.network.FriendlyByteBuf
import net.minecraft.network.protocol.common.custom.CustomPacketPayload

/**
Expand All @@ -15,11 +14,4 @@ interface RecordablePayload {
* @return Whether the payload should be recorded.
*/
fun shouldRecord(): Boolean

/**
* Writes the custom payload data manually.
*
* @param buf The byte buf to write to.
*/
fun record(buf: FriendlyByteBuf)
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import me.senseiwells.replay.ServerReplay
import me.senseiwells.replay.api.network.RecordablePayload
import me.senseiwells.replay.chunk.ChunkRecorder
import me.senseiwells.replay.config.ReplayConfig
import me.senseiwells.replay.mixin.network.IdDispatchCodecAccessor
import me.senseiwells.replay.player.PlayerRecorder
import me.senseiwells.replay.util.*
import net.minecraft.ChatFormatting
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/serverreplay.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"compat.syncmatica.SyncmaticaPacketPayloadMixin",
"compat.vmp.NearbyEntityTrackingMixin",
"compat.vmp.TrackedEntityMixin",
"network.IdDispatchCodecAccessor",
"player.ServerCommonPacketListenerImplMixin",
"player.ServerConfigurationPacketListenerImplMixin",
"player.ServerEntityMixin",
"player.ServerLoginPacketListenerImplMixin",
"player.TrackedEntityMixin",
"rejoin.ChunkMapAccessor",
"rejoin.ConnectionAccessor",
"rejoin.ServerCommonPacketListenerImplMixin",
"rejoin.ServerConfigurationPacketListenerImplAccessor",
"rejoin.ServerConfigurationPacketListenerImplMixin",
Expand Down

0 comments on commit bcbd8f6

Please sign in to comment.