File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/main/kotlin/taboolib/module/ui/virtual Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ dependencies {
88 compileOnly(project(" :platform:platform-bukkit-impl" ))
99 compileOnly(project(" :platform:platform-bukkit" ))
1010 // 服务端
11+ compileOnly(" ink.ptms.core:v12104:12104-minimize:mapped" )
1112 compileOnly(" ink.ptms.core:v11904:11904-minimize:mapped" )
1213 compileOnly(" ink.ptms.core:v11600:11600-minimize" )
1314 compileOnly(" ink.ptms.core:v11200:11200-minimize" )
Original file line number Diff line number Diff line change @@ -217,7 +217,11 @@ class InventoryHandlerImpl : InventoryHandler() {
217217 }
218218
219219 override fun sendCarriedChange (itemStack : ItemStack ) {
220- sendSlotChange(- 1 , itemStack)
220+ if (MinecraftVersion .versionId >= 12104 ) {
221+ viewer.sendPacket(NMSPacketPlayOutSetCarriedSlot (Craft19ItemStack .asNMSCopy(itemStack)))
222+ } else {
223+ sendSlotChange(- 1 , itemStack)
224+ }
221225 }
222226
223227 fun sendDataChange (slot : Int , state : Int ) {
@@ -437,6 +441,8 @@ private typealias NMSPacketPlayOutOpenWindow = net.minecraft.network.protocol.ga
437441private typealias NMSPacketPlayOutWindowItems = net.minecraft.network.protocol.game.PacketPlayOutWindowItems
438442
439443private typealias NMSPacketPlayOutSetSlot = net.minecraft.network.protocol.game.PacketPlayOutSetSlot
444+ //
445+ private typealias NMSPacketPlayOutSetCarriedSlot = net.minecraft.network.protocol.game.ClientboundSetCursorItemPacket
440446
441447private typealias NMSPacketPlayOutWindowData = net.minecraft.network.protocol.game.PacketPlayOutWindowData
442448
You can’t perform that action at this time.
0 commit comments