#2477: Fix entity rewrites not applying

This commit is contained in:
md_5 2018-07-23 11:12:20 +10:00
parent c9f22868b3
commit 176b75b97e
3 changed files with 7 additions and 4 deletions

View File

@ -101,7 +101,7 @@ public class DownstreamBridge extends PacketHandler
@Override
public void handle(PacketWrapper packet) throws Exception
{
con.getEntityRewrite().rewriteClientbound( packet.buf, con.getServerEntityId(), con.getClientEntityId() );
con.getEntityRewrite().rewriteClientbound( packet.buf, con.getServerEntityId(), con.getClientEntityId(), con.getPendingConnection().getVersion() );
con.sendPacket( packet );
}

View File

@ -109,7 +109,7 @@ public class UpstreamBridge extends PacketHandler
{
if ( con.getServer() != null )
{
con.getEntityRewrite().rewriteServerbound( packet.buf, con.getClientEntityId(), con.getServerEntityId() );
con.getEntityRewrite().rewriteServerbound( packet.buf, con.getClientEntityId(), con.getServerEntityId(), con.getPendingConnection().getVersion() );
con.getServer().getCh().write( packet );
}
}

View File

@ -145,7 +145,7 @@ public abstract class EntityMap
DefinedPacket.readString( packet );
}
break;
case 14: // particle
case 15: // particle
int particleId = DefinedPacket.readVarInt( packet );
switch ( particleId )
{
@ -162,7 +162,10 @@ public abstract class EntityMap
}
break;
default:
if ( type >= 6 )
{
type--;
}
break;
}
}