Java 类cpw.mods.fml.common.network.internal.FMLMessage.EntityAdjustMessage 实例源码

项目:TRHS_Club_Mod_2016    文件:EntitySpawnHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, EntityMessage msg) throws Exception
{
    if (msg.getClass().equals(FMLMessage.EntitySpawnMessage.class))
    {
        spawnEntity((FMLMessage.EntitySpawnMessage)msg);
    }
    else if (msg.getClass().equals(FMLMessage.EntityAdjustMessage.class))
    {
        adjustEntity((FMLMessage.EntityAdjustMessage)msg);
    }
}
项目:TRHS_Club_Mod_2016    文件:EntitySpawnHandler.java   
private void adjustEntity(EntityAdjustMessage msg)
{
    Entity ent = FMLClientHandler.instance().getWorldClient().func_73045_a(msg.entityId);
    if (ent != null)
    {
        ent.field_70118_ct = msg.serverX;
        ent.field_70117_cu = msg.serverY;
        ent.field_70116_cv = msg.serverZ;
    }
    else
    {
        FMLLog.fine("Attempted to adjust the position of entity %d which is not present on the client", msg.entityId);
    }

}
项目:CauldronGit    文件:EntitySpawnHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, EntityMessage msg) throws Exception
{
    if (msg.getClass().equals(FMLMessage.EntitySpawnMessage.class))
    {
        spawnEntity((FMLMessage.EntitySpawnMessage)msg);
    }
    else if (msg.getClass().equals(FMLMessage.EntityAdjustMessage.class))
    {
        adjustEntity((FMLMessage.EntityAdjustMessage)msg);
    }
}
项目:CauldronGit    文件:EntitySpawnHandler.java   
private void adjustEntity(EntityAdjustMessage msg)
{
    Entity ent = FMLClientHandler.instance().getWorldClient().getEntityByID(msg.entityId);
    if (ent != null)
    {
        ent.serverPosX = msg.serverX;
        ent.serverPosY = msg.serverY;
        ent.serverPosZ = msg.serverZ;
    }
    else
    {
        FMLLog.fine("Attempted to adjust the position of entity %d which is not present on the client", msg.entityId);
    }

}
项目:Cauldron    文件:EntitySpawnHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, EntityMessage msg) throws Exception
{
    if (msg.getClass().equals(FMLMessage.EntitySpawnMessage.class))
    {
        spawnEntity((FMLMessage.EntitySpawnMessage)msg);
    }
    else if (msg.getClass().equals(FMLMessage.EntityAdjustMessage.class))
    {
        adjustEntity((FMLMessage.EntityAdjustMessage)msg);
    }
}
项目:Cauldron    文件:EntitySpawnHandler.java   
private void adjustEntity(EntityAdjustMessage msg)
{
    Entity ent = FMLClientHandler.instance().getWorldClient().getEntityByID(msg.entityId);
    if (ent != null)
    {
        ent.serverPosX = msg.serverX;
        ent.serverPosY = msg.serverY;
        ent.serverPosZ = msg.serverZ;
    }
    else
    {
        FMLLog.fine("Attempted to adjust the position of entity %d which is not present on the client", msg.entityId);
    }

}
项目:Cauldron    文件:EntitySpawnHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, EntityMessage msg) throws Exception
{
    if (msg.getClass().equals(FMLMessage.EntitySpawnMessage.class))
    {
        spawnEntity((FMLMessage.EntitySpawnMessage)msg);
    }
    else if (msg.getClass().equals(FMLMessage.EntityAdjustMessage.class))
    {
        adjustEntity((FMLMessage.EntityAdjustMessage)msg);
    }
}
项目:Cauldron    文件:EntitySpawnHandler.java   
private void adjustEntity(EntityAdjustMessage msg)
{
    Entity ent = FMLClientHandler.instance().getWorldClient().getEntityByID(msg.entityId);
    if (ent != null)
    {
        ent.serverPosX = msg.serverX;
        ent.serverPosY = msg.serverY;
        ent.serverPosZ = msg.serverZ;
    }
    else
    {
        FMLLog.fine("Attempted to adjust the position of entity %d which is not present on the client", msg.entityId);
    }

}
项目:Cauldron    文件:EntitySpawnHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, EntityMessage msg) throws Exception
{
    if (msg.getClass().equals(FMLMessage.EntitySpawnMessage.class))
    {
        spawnEntity((FMLMessage.EntitySpawnMessage)msg);
    }
    else if (msg.getClass().equals(FMLMessage.EntityAdjustMessage.class))
    {
        adjustEntity((FMLMessage.EntityAdjustMessage)msg);
    }
}
项目:Cauldron    文件:EntitySpawnHandler.java   
private void adjustEntity(EntityAdjustMessage msg)
{
    Entity ent = FMLClientHandler.instance().getWorldClient().getEntityByID(msg.entityId);
    if (ent != null)
    {
        ent.serverPosX = msg.serverX;
        ent.serverPosY = msg.serverY;
        ent.serverPosZ = msg.serverZ;
    }
    else
    {
        FMLLog.fine("Attempted to adjust the position of entity %d which is not present on the client", msg.entityId);
    }

}