Add missing constructor for CCloseWindowPacket

This commit is contained in:
IzzelAliz 2020-05-17 12:30:15 +08:00
parent 6ef0add1c7
commit f58f636b36
3 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,20 @@
package io.izzel.arclight.mixin.core.network.play.client;
import net.minecraft.network.play.client.CCloseWindowPacket;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@Mixin(CCloseWindowPacket.class)
public class CCloseWindowPacketMixin {
@Shadow private int windowId;
public void arclight$constructor() {
throw new RuntimeException();
}
public void arclight$constructor(int id) {
arclight$constructor();
this.windowId = id;
}
}

View File

@ -109,6 +109,7 @@ public class ArclightMixinPlugin implements IMixinConfigPlugin {
.add("net.minecraft.inventory.container.LecternContainer") .add("net.minecraft.inventory.container.LecternContainer")
.add("net.minecraft.world.TrackedEntity") .add("net.minecraft.world.TrackedEntity")
.add("net.minecraft.util.math.shapes.IndirectMerger") .add("net.minecraft.util.math.shapes.IndirectMerger")
.add("net.minecraft.network.play.client.CCloseWindowPacket")
.build(); .build();
@Override @Override

View File

@ -310,6 +310,7 @@
"network.datasync.EntityDataManagerMixin", "network.datasync.EntityDataManagerMixin",
"network.login.ServerLoginNetHandler1Mixin", "network.login.ServerLoginNetHandler1Mixin",
"network.play.ServerPlayNetHandlerMixin", "network.play.ServerPlayNetHandlerMixin",
"network.play.client.CCloseWindowPacketMixin",
"network.play.server.SChatPacketMixin", "network.play.server.SChatPacketMixin",
"network.rcon.RConConsoleSourceMixin", "network.rcon.RConConsoleSourceMixin",
"potion.EffectMixin", "potion.EffectMixin",