Fix network api throwing on client/server query disconnects

This commit is contained in:
Player 2021-05-10 14:36:18 +02:00
parent f08a69e19f
commit 74330c9e99
3 changed files with 5 additions and 3 deletions

View file

@ -19,7 +19,7 @@ plugins {
def ENV = System.getenv()
class Globals {
static def baseVersion = "0.34.2"
static def baseVersion = "0.34.3"
static def mcVersion = "21w18a"
static def yarnVersion = "+build.3"
static def loaderVersion = "0.10.5+build.213"

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-networking-api-v1"
version = getSubprojectVersion(project, "1.0.8")
version = getSubprojectVersion(project, "1.0.9")
moduleDependencies(project, [
'fabric-api-base'

View file

@ -85,8 +85,10 @@ abstract class ClientConnectionMixin implements ChannelInfoHolder {
@Inject(method = "channelInactive", at = @At("HEAD"))
private void handleDisconnect(ChannelHandlerContext channelHandlerContext, CallbackInfo ci) throws Exception {
if (packetListener instanceof NetworkHandlerExtensions) { // not the case for client/server query
((NetworkHandlerExtensions) packetListener).getAddon().handleDisconnect();
}
}
@Override
public Collection<Identifier> getPendingChannelsNames() {