Fix Accidental Bug which causes Autoban
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
c5020eaef1
Commit
59884f9834
@ -16,19 +16,22 @@
|
||||
package de.steamwar.modsender.mixin;
|
||||
|
||||
import de.steamwar.modsender.ModSender;
|
||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.network.packet.s2c.play.GameJoinS2CPacket;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ClientPlayNetworkHandler.class)
|
||||
public class MixinClientPlayNetworkHandler {
|
||||
@Mixin(ClientWorld.class)
|
||||
public class ClientWorldMixin {
|
||||
|
||||
@Inject(at = @At("TAIL"), method = "onGameJoin")
|
||||
private void connect(GameJoinS2CPacket packet, CallbackInfo ci) {
|
||||
ModSender.sendInformationPacket();
|
||||
@Inject(at = @At("HEAD"), method = "addPlayer")
|
||||
private void onAddPlayer(int id, AbstractClientPlayerEntity player, CallbackInfo ci) {
|
||||
if(player == MinecraftClient.getInstance().player) {
|
||||
ModSender.sendInformationPacket();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
"MixinClientPlayNetworkHandler"
|
||||
"ClientWorldMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren