Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
Throw items when you try to put things in your second hand in creative.
Dieser Commit ist enthalten in:
Ursprung
722f28f086
Commit
597ddc7f82
@ -329,8 +329,18 @@ public class IncomingTransformer {
|
||||
}
|
||||
if (packet == PacketType.PLAY_CREATIVE_INVENTORY_ACTION) {
|
||||
short slot = input.readShort();
|
||||
System.out.println(slot);
|
||||
if (slot == 45) {
|
||||
ByteBuf buf = info.getChannel().alloc().buffer();
|
||||
PacketUtil.writeVarInt(PacketType.PLAY_SET_SLOT.getNewPacketID(), buf);
|
||||
buf.writeByte(0);
|
||||
buf.writeShort(slot);
|
||||
buf.writeShort(-1); // empty
|
||||
info.sendRawPacket(buf);
|
||||
// Continue the packet simulating throw
|
||||
slot = -999;
|
||||
}
|
||||
output.writeShort(slot);
|
||||
|
||||
ItemSlotRewriter.rewrite1_9To1_8(input, output);
|
||||
}
|
||||
output.writeBytes(input);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren