Java 类net.minecraft.network.packet.Packet71Weather 实例源码

项目:BetterNutritionMod    文件:NetClientHandler.java   
/**
 * Handles weather packet
 */
public void handleWeather(Packet71Weather par1Packet71Weather)
{
    double d0 = (double)par1Packet71Weather.posX / 32.0D;
    double d1 = (double)par1Packet71Weather.posY / 32.0D;
    double d2 = (double)par1Packet71Weather.posZ / 32.0D;
    EntityLightningBolt entitylightningbolt = null;

    if (par1Packet71Weather.isLightningBolt == 1)
    {
        entitylightningbolt = new EntityLightningBolt(this.worldClient, d0, d1, d2);
    }

    if (entitylightningbolt != null)
    {
        entitylightningbolt.serverPosX = par1Packet71Weather.posX;
        entitylightningbolt.serverPosY = par1Packet71Weather.posY;
        entitylightningbolt.serverPosZ = par1Packet71Weather.posZ;
        entitylightningbolt.rotationYaw = 0.0F;
        entitylightningbolt.rotationPitch = 0.0F;
        entitylightningbolt.entityId = par1Packet71Weather.entityID;
        this.worldClient.addWeatherEffect(entitylightningbolt);
    }
}
项目:RuneCraftery    文件:WorldServer.java   
public boolean func_72942_c(Entity p_72942_1_) {
   if(super.func_72942_c(p_72942_1_)) {
      this.field_73061_a.func_71203_ab().func_72393_a(p_72942_1_.field_70165_t, p_72942_1_.field_70163_u, p_72942_1_.field_70161_v, 512.0D, this.field_73011_w.field_76574_g, new Packet71Weather(p_72942_1_));
      return true;
   } else {
      return false;
   }
}
项目:RuneCraftery    文件:WorldServer.java   
/**
 * adds a lightning bolt to the list of lightning bolts in this world.
 */
public boolean addWeatherEffect(Entity par1Entity)
{
    if (super.addWeatherEffect(par1Entity))
    {
        this.mcServer.getConfigurationManager().sendToAllNear(par1Entity.posX, par1Entity.posY, par1Entity.posZ, 512.0D, this.provider.dimensionId, new Packet71Weather(par1Entity));
        return true;
    }
    else
    {
        return false;
    }
}
项目:BetterNutritionMod    文件:WorldServer.java   
/**
 * adds a lightning bolt to the list of lightning bolts in this world.
 */
public boolean addWeatherEffect(Entity par1Entity)
{
    if (super.addWeatherEffect(par1Entity))
    {
        this.mcServer.getConfigurationManager().sendToAllNear(par1Entity.posX, par1Entity.posY, par1Entity.posZ, 512.0D, this.provider.dimensionId, new Packet71Weather(par1Entity));
        return true;
    }
    else
    {
        return false;
    }
}
项目:forge_world_downloader    文件:WDLNetClientHandler.java   
@Override
public void handleWeather(Packet71Weather par1Packet71Weather)
{
    nch.handleWeather(par1Packet71Weather);

}
项目:RuneCraftery    文件:NetHandler.java   
public void func_72508_a(Packet71Weather p_72508_1_) {
   this.func_72509_a(p_72508_1_);
}