mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-14 19:25:23 -05:00
parent
09816d0313
commit
96274c18fc
3 changed files with 5 additions and 4 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- run: ./gradlew check build publishToMavenLocal publishMods --stacktrace --warning-mode=fail -Porg.gradle.parallel.threads=4
|
||||
- run: ./gradlew check build publishToMavenLocal --stacktrace --warning-mode=fail -Porg.gradle.parallel.threads=4
|
||||
- uses: Juuxel/publish-checkstyle-report@v1
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
|
|
|
@ -95,7 +95,7 @@ abstract class ClientConnectionMixin implements ChannelInfoHolder {
|
|||
}
|
||||
}
|
||||
|
||||
@Inject(method = "sendInternal", at = @At(value = "INVOKE", target = "Lio/netty/channel/ChannelFuture;addListener(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture;", remap = false), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
@Inject(method = "sendInternal", at = @At(value = "INVOKE", target = "Lio/netty/channel/ChannelFuture;addListener(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture;", remap = false), locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true)
|
||||
private void sendInternal(Packet<?> packet, @Nullable PacketCallbacks callbacks, boolean flush, CallbackInfo ci, ChannelFuture channelFuture) {
|
||||
if (callbacks instanceof GenericFutureListenerHolder holder) {
|
||||
channelFuture.addListener(holder.getDelegate());
|
||||
|
|
|
@ -47,8 +47,9 @@ public final class NetworkingPlayPacketTest implements ModInitializer {
|
|||
public static final Identifier TEST_CHANNEL = NetworkingTestmods.id("test_channel");
|
||||
|
||||
public static void sendToTestChannel(ServerPlayerEntity player, String stuff) {
|
||||
ServerPlayNetworking.send(player, new OverlayPacket(Text.literal(stuff)));
|
||||
NetworkingTestmods.LOGGER.info("Sent custom payload packet in {}", TEST_CHANNEL);
|
||||
ServerPlayNetworking.getSender(player).sendPacket(new OverlayPacket(Text.literal(stuff)), future -> {
|
||||
NetworkingTestmods.LOGGER.info("Sent custom payload packet in {}", TEST_CHANNEL);
|
||||
});
|
||||
}
|
||||
|
||||
public static void registerCommand(CommandDispatcher<ServerCommandSource> dispatcher) {
|
||||
|
|
Loading…
Reference in a new issue