Don't consider null NetworkDispatchers. This should fix a bunch of fakeplayer issues.
Nothing to see here. No modding being done.
This commit is contained in:
parent
3f86cd32a7
commit
8a69b17bd6
1 changed files with 4 additions and 3 deletions
|
@ -129,7 +129,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
|
|||
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().playerEntityList)
|
||||
{
|
||||
NetworkDispatcher dispatcher = player.playerNetServerHandler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
|
||||
builder.add(dispatcher);
|
||||
if (dispatcher != null) builder.add(dispatcher);
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
|
@ -160,7 +160,8 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
|
|||
if (dimension == player.dimension)
|
||||
{
|
||||
NetworkDispatcher dispatcher = player.playerNetServerHandler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
|
||||
builder.add(dispatcher);
|
||||
// Null dispatchers may exist for fake players - skip them
|
||||
if (dispatcher != null) builder.add(dispatcher);
|
||||
}
|
||||
}
|
||||
return builder.build();
|
||||
|
@ -200,7 +201,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
|
|||
if (d4 * d4 + d5 * d5 + d6 * d6 < tp.range * tp.range)
|
||||
{
|
||||
NetworkDispatcher dispatcher = player.playerNetServerHandler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
|
||||
builder.add(dispatcher);
|
||||
if (dispatcher != null) builder.add(dispatcher);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue