Skip to content

Commit

Permalink
spoof as connected to wynncraft
Browse files Browse the repository at this point in the history
  • Loading branch information
guimc233 committed Nov 23, 2024
1 parent 2902d23 commit 8ae5af7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/java/baka/wynnproxy/mixins/MixinConnectionManager.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package baka.wynnproxy.mixins;

import baka.wynnproxy.ProxyClient;
import com.wynntils.core.mod.ConnectionManager;
import com.wynntils.mc.event.ConnectionEvent;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(value = ConnectionManager.class, remap = false)
public class MixinConnectionManager {
@Shadow private boolean isConnected;

@Inject(method = "onConnected", at = @At("RETURN"))
public void onConnected(ConnectionEvent.ConnectedEvent e, CallbackInfo ci) {
this.isConnected = true;
}
}
1 change: 1 addition & 0 deletions src/main/resources/proxy.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"package": "baka.wynnproxy.mixins",
"compatibilityLevel": "JAVA_21",
"mixins": [
"MixinConnectionManager",
"MixinMinecraftClient",
"MixinUrlManager"
],
Expand Down

0 comments on commit 8ae5af7

Please sign in to comment.