Skip to content

Commit

Permalink
Fix compatability with servux
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Sep 17, 2024
1 parent 27968e5 commit 67407a2
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies {

modCompileOnly(libs.carpet)
modCompileOnly(libs.vmp)
modCompileOnly(libs.servux)
modCompileOnly(libs.syncmatica)
modCompileOnly(libs.voicechat)
implementation(libs.voicechat.api)
Expand Down
2 changes: 2 additions & 0 deletions libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ carpet = "1.4.147"
voicechat = "fabric-1.21.1-2.5.20"
voicechat-api = "2.5.0"
vmp = "0.2.0+beta.7.162+1.21"
servux = "1.21-0.3.8-sakura.1"
syncmatica = "1.21-sakura.6"
replay-studio = "1e96fda605"

Expand All @@ -26,6 +27,7 @@ carpet = { module = "com.github.gnembon:fabric-carpet" , version.ref
voicechat = { module = "maven.modrinth:simple-voice-chat" , version.ref = "voicechat" }
voicechat-api = { module = "de.maxhenkel.voicechat:voicechat-api" , version.ref = "voicechat-api" }
vmp = { module = "maven.modrinth:vmp-fabric" , version.ref = "vmp" }
servux = { module = "com.github.sakura-ryoko:servux" , version.ref = "servux" }
syncmatica = { module = "com.github.sakura-ryoko:syncmatica" , version.ref = "syncmatica" }
replay-studio = { module = "com.github.ReplayMod:ReplayStudio" , version.ref = "replay-studio" }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package me.senseiwells.replay.mixin.compat.servux;

import fi.dy.masa.servux.network.packet.ServuxEntitiesPacket;
import fi.dy.masa.servux.network.packet.ServuxLitematicaPacket;
import fi.dy.masa.servux.network.packet.ServuxStructuresPacket;
import fi.dy.masa.servux.network.packet.ServuxTweaksPacket;
import me.senseiwells.replay.api.network.RecordablePayload;
import net.minecraft.network.FriendlyByteBuf;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.asm.mixin.Mixin;

@Mixin(
value = {
ServuxEntitiesPacket.class,
ServuxLitematicaPacket.class,
ServuxStructuresPacket.class,
ServuxTweaksPacket.class
},
remap = false
)
@SuppressWarnings("AddedMixinMembersNamePattern")
public class ServuxPacketMixin implements RecordablePayload {
@Override
public boolean shouldRecord() {
return false;
}

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

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.jetbrains.annotations.NotNull;
import org.spongepowered.asm.mixin.Mixin;

@Mixin(SyncmaticaPacket.Payload.class)
@Mixin(value = SyncmaticaPacket.Payload.class, remap = false)
@SuppressWarnings("AddedMixinMembersNamePattern")
public class SyncmaticaPacketPayloadMixin implements RecordablePayload {
@Override
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/serverreplay.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"compat.carpet.ChunkMapMixin",
"compat.carpet.EntityPlayerMPFakeMixin",
"compat.carpet.NetHandlerPlayServerFakeMixin",
"compat.servux.ServuxPacketMixin",
"compat.syncmatica.SyncmaticaPacketPayloadMixin",
"compat.vmp.NearbyEntityTrackingMixin",
"compat.vmp.TrackedEntityMixin",
Expand Down

0 comments on commit 67407a2

Please sign in to comment.