3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 16:12:42 +01:00

Merge pull request #165 from StamBoom/savedthehorses

Fixed horses inventory/elytra exception
Dieser Commit ist enthalten in:
Myles 2016-03-07 18:52:11 +00:00
Commit a92a7d6e02

Datei anzeigen

@ -163,6 +163,19 @@ public class IncomingTransformer {
PacketUtil.readVarInt(input); PacketUtil.readVarInt(input);
return; return;
} }
if (packet == PacketType.PLAY_ENTITY_ACTION) {
int playerId = PacketUtil.readVarInt(input);
int action = PacketUtil.readVarInt(input);
int jump = PacketUtil.readVarInt(input);
if (action == 6 || action == 8) //Ignore stop jumping / start elytra flying
throw new CancelException();
if (action == 7) //Change open horse inventory to the 1.8 value
action = 6;
PacketUtil.writeVarInt(playerId, output);
PacketUtil.writeVarInt(action, output);
PacketUtil.writeVarInt(jump, output);
return;
}
if (packet == PacketType.PLAY_USE_ENTITY) { if (packet == PacketType.PLAY_USE_ENTITY) {
int target = PacketUtil.readVarInt(input); int target = PacketUtil.readVarInt(input);
PacketUtil.writeVarInt(target, output); PacketUtil.writeVarInt(target, output);