mirror of
https://github.com/FabricMC/fabric.git
synced 2025-03-27 23:29:58 -04:00
Fix accidental breaking change made to PacketSender in rc3 port.
This commit is contained in:
parent
40efc82b2b
commit
308233144b
2 changed files with 20 additions and 7 deletions
fabric-networking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/v1
gradle.properties
|
@ -28,6 +28,8 @@ import net.minecraft.network.Packet;
|
|||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import net.fabricmc.fabric.impl.networking.GenericFutureListenerHolder;
|
||||
|
||||
/**
|
||||
* Represents something that supports sending packets to channels.
|
||||
* @see PacketByteBufs
|
||||
|
@ -85,6 +87,17 @@ public interface PacketSender {
|
|||
* @param callback an optional callback to execute after the packet is sent, may be {@code null}
|
||||
*/
|
||||
// the generic future listener can accept ChannelFutureListener
|
||||
default void sendPacket(Identifier channel, PacketByteBuf buf, @Nullable GenericFutureListener<? extends Future<? super Void>> callback) {
|
||||
sendPacket(channel, buf, GenericFutureListenerHolder.create(callback));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a packet to a channel.
|
||||
*
|
||||
* @param channel the id of the channel
|
||||
* @param buf the content of the packet
|
||||
* @param callback an optional callback to execute after the packet is sent, may be {@code null}
|
||||
*/
|
||||
default void sendPacket(Identifier channel, PacketByteBuf buf, @Nullable class_7648 callback) {
|
||||
Objects.requireNonNull(channel, "Channel cannot be null");
|
||||
Objects.requireNonNull(buf, "Payload cannot be null");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
org.gradle.jvmargs=-Xmx2560M
|
||||
org.gradle.parallel=true
|
||||
|
||||
version=0.58.3
|
||||
version=0.58.4
|
||||
minecraft_version=1.19.1-rc3
|
||||
yarn_version=+build.1
|
||||
loader_version=0.14.8
|
||||
|
@ -16,10 +16,10 @@ fabric-blockrenderlayer-v1-version=1.1.18
|
|||
fabric-command-api-v1-version=1.2.9
|
||||
fabric-command-api-v2-version=2.1.5
|
||||
fabric-commands-v0-version=0.2.26
|
||||
fabric-containers-v0-version=0.1.30
|
||||
fabric-containers-v0-version=0.1.31
|
||||
fabric-content-registries-v0-version=3.2.1
|
||||
fabric-crash-report-info-v1-version=0.2.3
|
||||
fabric-data-generation-api-v1-version=5.1.4
|
||||
fabric-data-generation-api-v1-version=5.1.5
|
||||
fabric-dimensions-v1-version=2.1.28
|
||||
fabric-entity-events-v1-version=1.4.16
|
||||
fabric-events-interaction-v0-version=0.4.26
|
||||
|
@ -36,11 +36,11 @@ fabric-loot-tables-v1-version=1.1.4
|
|||
fabric-message-api-v1-version=5.0.0
|
||||
fabric-mining-level-api-v1-version=2.1.11
|
||||
fabric-models-v0-version=0.3.15
|
||||
fabric-networking-api-v1-version=1.2.0
|
||||
fabric-networking-v0-version=0.3.17
|
||||
fabric-networking-api-v1-version=1.2.1
|
||||
fabric-networking-v0-version=0.3.18
|
||||
fabric-object-builder-api-v1-version=4.0.8
|
||||
fabric-particles-v1-version=1.0.8
|
||||
fabric-registry-sync-v0-version=0.9.20
|
||||
fabric-registry-sync-v0-version=0.9.21
|
||||
fabric-renderer-api-v1-version=1.0.8
|
||||
fabric-renderer-indigo-version=0.6.10
|
||||
fabric-renderer-registries-v1-version=3.2.18
|
||||
|
@ -51,7 +51,7 @@ fabric-rendering-v1-version=1.10.14
|
|||
fabric-resource-conditions-api-v1-version=2.0.9
|
||||
fabric-resource-loader-v0-version=0.5.6
|
||||
fabric-screen-api-v1-version=1.0.24
|
||||
fabric-screen-handler-api-v1-version=1.2.9
|
||||
fabric-screen-handler-api-v1-version=1.2.10
|
||||
fabric-textures-v0-version=1.0.18
|
||||
fabric-transfer-api-v1-version=2.0.9
|
||||
fabric-transitive-access-wideners-v1-version=1.1.1
|
||||
|
|
Loading…
Add table
Reference in a new issue