Fix #686 - rewriting of bows and fishing hooks
This commit is contained in:
parent
7205e69ce6
commit
3becbe4d38
@ -2,6 +2,7 @@ package net.md_5.bungee;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import net.md_5.bungee.protocol.DefinedPacket;
|
import net.md_5.bungee.protocol.DefinedPacket;
|
||||||
|
import net.md_5.bungee.protocol.PacketWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to rewrite integers within packets.
|
* Class to rewrite integers within packets.
|
||||||
@ -66,6 +67,22 @@ public class EntityMap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( packetId == 0x0E )
|
||||||
|
{
|
||||||
|
DefinedPacket.readVarInt( packet );
|
||||||
|
byte type = packet.readByte();
|
||||||
|
if ( type == 60 || type == 90 )
|
||||||
|
{
|
||||||
|
packet.skipBytes( 14 );
|
||||||
|
int pos = packet.readerIndex();
|
||||||
|
int shooterId = packet.getInt( pos );
|
||||||
|
if ( shooterId == oldId )
|
||||||
|
{
|
||||||
|
packet.setInt( pos, newId );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
packet.readerIndex( readerIndex );
|
packet.readerIndex( readerIndex );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user