mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-11 22:45:38 -04:00
Fix reconfiguration by deleting the code and forgetting about it.
This commit is contained in:
parent
47f22c2eab
commit
0419b7e744
3 changed files with 8 additions and 31 deletions
fabric-networking-api-v1/src
main/java/net/fabricmc/fabric/mixin/networking
testmod/java/net/fabricmc/fabric/test/networking/play
|
@ -16,8 +16,6 @@
|
|||
|
||||
package net.fabricmc.fabric.mixin.networking;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -26,18 +24,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
|
||||
import net.minecraft.class_10961;
|
||||
import net.minecraft.network.ClientConnection;
|
||||
import net.minecraft.network.listener.PacketListener;
|
||||
import net.minecraft.network.packet.c2s.common.CustomPayloadC2SPacket;
|
||||
import net.minecraft.network.state.NetworkState;
|
||||
import net.minecraft.server.network.ConnectedClientData;
|
||||
import net.minecraft.server.network.ServerCommonNetworkHandler;
|
||||
import net.minecraft.server.network.ServerConfigurationNetworkHandler;
|
||||
import net.minecraft.server.network.ServerPlayNetworkHandler;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
|
||||
import net.fabricmc.fabric.impl.networking.NetworkHandlerExtensions;
|
||||
import net.fabricmc.fabric.impl.networking.UntrackedNetworkHandler;
|
||||
import net.fabricmc.fabric.impl.networking.server.ServerNetworkingImpl;
|
||||
import net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon;
|
||||
|
||||
// We want to apply a bit earlier than other mods which may not use us in order to prevent refCount issues
|
||||
|
@ -67,18 +61,6 @@ abstract class ServerPlayNetworkHandlerMixin extends ServerCommonNetworkHandler
|
|||
}
|
||||
}
|
||||
|
||||
@WrapOperation(method = "onAcknowledgeReconfiguration", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/ClientConnection;transitionInbound(Lnet/minecraft/network/state/NetworkState;Lnet/minecraft/network/listener/PacketListener;)V"))
|
||||
private <T extends PacketListener> void onAcknowledgeReconfiguration(ClientConnection instance, NetworkState<T> state, T packetListener, Operation<Void> original) {
|
||||
original.call(instance, state, packetListener);
|
||||
|
||||
ServerConfigurationNetworkHandler networkHandler = (ServerConfigurationNetworkHandler) packetListener;
|
||||
ServerNetworkingImpl.getAddon(networkHandler).setReconfiguring();
|
||||
|
||||
if (addon.requestedReconfigure()) {
|
||||
networkHandler.sendConfigurations();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerPlayNetworkAddon getAddon() {
|
||||
return this.addon;
|
||||
|
|
|
@ -50,7 +50,6 @@ import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
|
|||
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
|
||||
import net.fabricmc.fabric.impl.networking.FabricRegistryByteBuf;
|
||||
import net.fabricmc.fabric.test.networking.NetworkingTestmods;
|
||||
import net.fabricmc.fabric.test.networking.common.NetworkingCommonTest;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
public final class NetworkingPlayPacketTest implements ModInitializer {
|
||||
|
@ -147,10 +146,6 @@ public final class NetworkingPlayPacketTest implements ModInitializer {
|
|||
Collection<Identifier> channels = fabricRegistryByteBuf.fabric_getSendableConfigurationChannels();
|
||||
Objects.requireNonNull(channels);
|
||||
|
||||
if (!channels.contains(NetworkingCommonTest.CommonPayload.ID.id())) {
|
||||
throw new IllegalStateException("Expected common payload channel to be sent");
|
||||
}
|
||||
|
||||
TextCodecs.REGISTRY_PACKET_CODEC.encode(buf, this.message);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
org.gradle.jvmargs=-Xmx2560M
|
||||
org.gradle.parallel=true
|
||||
|
||||
version=0.119.7
|
||||
version=0.119.8
|
||||
minecraft_version=25w14craftmine
|
||||
yarn_version=+build.2
|
||||
loader_version=0.16.12
|
||||
|
@ -23,11 +23,11 @@ fabric-command-api-v2-version=2.2.50
|
|||
fabric-commands-v0-version=0.2.88
|
||||
fabric-content-registries-v0-version=10.0.12
|
||||
fabric-crash-report-info-v1-version=0.3.13
|
||||
fabric-data-attachment-api-v1-version=1.6.7
|
||||
fabric-data-generation-api-v1-version=22.3.3
|
||||
fabric-data-attachment-api-v1-version=1.6.8
|
||||
fabric-data-generation-api-v1-version=22.3.4
|
||||
fabric-dimensions-v1-version=4.0.17
|
||||
fabric-entity-events-v1-version=2.0.26
|
||||
fabric-events-interaction-v0-version=4.0.14
|
||||
fabric-events-interaction-v0-version=4.0.15
|
||||
fabric-game-rule-api-v1-version=1.0.71
|
||||
fabric-gametest-api-v1-version=3.1.3
|
||||
fabric-item-api-v1-version=11.3.2
|
||||
|
@ -39,11 +39,11 @@ fabric-loot-api-v2-version=3.0.48
|
|||
fabric-loot-api-v3-version=1.0.36
|
||||
fabric-message-api-v1-version=6.0.34
|
||||
fabric-model-loading-api-v1-version=5.0.4
|
||||
fabric-networking-api-v1-version=4.4.1
|
||||
fabric-networking-api-v1-version=4.4.2
|
||||
fabric-object-builder-api-v1-version=21.0.1
|
||||
fabric-particles-v1-version=4.0.23
|
||||
fabric-recipe-api-v1-version=8.1.7
|
||||
fabric-registry-sync-v0-version=6.1.21
|
||||
fabric-recipe-api-v1-version=8.1.8
|
||||
fabric-registry-sync-v0-version=6.1.22
|
||||
fabric-renderer-api-v1-version=6.0.1
|
||||
fabric-renderer-indigo-version=3.0.1
|
||||
fabric-rendering-data-attachment-v1-version=0.3.65
|
||||
|
@ -52,7 +52,7 @@ fabric-rendering-v1-version=11.1.12
|
|||
fabric-resource-conditions-api-v1-version=5.0.22
|
||||
fabric-resource-loader-v0-version=3.1.7
|
||||
fabric-screen-api-v1-version=2.0.47
|
||||
fabric-screen-handler-api-v1-version=1.3.128
|
||||
fabric-screen-handler-api-v1-version=1.3.129
|
||||
fabric-sound-api-v1-version=1.0.39
|
||||
fabric-tag-api-v1-version=1.0.17
|
||||
fabric-transfer-api-v1-version=5.4.24
|
||||
|
|
Loading…
Add table
Reference in a new issue