Java 类net.minecraft.network.play.server.S2CPacketSpawnGlobalEntity 实例源码

项目:Cauldron    文件:WorldServer.java   
public boolean addWeatherEffect(Entity p_72942_1_)
{
    // Cauldron start - vanilla compatibility
    if (p_72942_1_ instanceof net.minecraft.entity.effect.EntityLightningBolt) 
    {
        // CraftBukkit start
        LightningStrikeEvent lightning = new LightningStrikeEvent(this.getWorld(), (org.bukkit.entity.LightningStrike) p_72942_1_.getBukkitEntity());
        this.getServer().getPluginManager().callEvent(lightning);

        if (lightning.isCancelled())
        {
            return false;
        }
        // CraftBukkit end
    }
    // Cauldron end
    if (super.addWeatherEffect(p_72942_1_))
    {
        this.mcServer.getConfigurationManager().sendToAllNear(p_72942_1_.posX, p_72942_1_.posY, p_72942_1_.posZ, 512.0D, this.provider.dimensionId, new S2CPacketSpawnGlobalEntity(p_72942_1_));
        return true;
    }
    else
    {
        return false;
    }
}
项目:DecompiledMinecraft    文件:WorldServer.java   
/**
 * adds a lightning bolt to the list of lightning bolts in this world.
 */
public boolean addWeatherEffect(Entity entityIn)
{
    if (super.addWeatherEffect(entityIn))
    {
        this.mcServer.getConfigurationManager().sendToAllNear(entityIn.posX, entityIn.posY, entityIn.posZ, 512.0D, this.provider.getDimensionId(), new S2CPacketSpawnGlobalEntity(entityIn));
        return true;
    }
    else
    {
        return false;
    }
}
项目:DecompiledMinecraft    文件:WorldServer.java   
/**
 * adds a lightning bolt to the list of lightning bolts in this world.
 */
public boolean addWeatherEffect(Entity entityIn)
{
    if (super.addWeatherEffect(entityIn))
    {
        this.mcServer.getConfigurationManager().sendToAllNear(entityIn.posX, entityIn.posY, entityIn.posZ, 512.0D, this.provider.getDimensionId(), new S2CPacketSpawnGlobalEntity(entityIn));
        return true;
    }
    else
    {
        return false;
    }
}
项目:BaseClient    文件:WorldServer.java   
/**
 * adds a lightning bolt to the list of lightning bolts in this world.
 */
public boolean addWeatherEffect(Entity entityIn)
{
    if (super.addWeatherEffect(entityIn))
    {
        this.mcServer.getConfigurationManager().sendToAllNear(entityIn.posX, entityIn.posY, entityIn.posZ, 512.0D, this.provider.getDimensionId(), new S2CPacketSpawnGlobalEntity(entityIn));
        return true;
    }
    else
    {
        return false;
    }
}
项目:BaseClient    文件:WorldServer.java   
/**
 * adds a lightning bolt to the list of lightning bolts in this world.
 */
public boolean addWeatherEffect(Entity entityIn)
{
    if (super.addWeatherEffect(entityIn))
    {
        this.mcServer.getConfigurationManager().sendToAllNear(entityIn.posX, entityIn.posY, entityIn.posZ, 512.0D, this.provider.getDimensionId(), new S2CPacketSpawnGlobalEntity(entityIn));
        return true;
    }
    else
    {
        return false;
    }
}
项目:Annointment    文件:ARunEffects.java   
private void doTheLightningThing(EntityPlayerMP user, World world, double x,
        double y, double z) {
    user.playerNetServerHandler.sendPacket(new S2CPacketSpawnGlobalEntity(
            new EntityLightningBolt(world, x, y, z)));
    user.playerNetServerHandler.sendPacket(
            new S29PacketSoundEffect("ambient.weather.thunder", x, y, z,
                    10000.0F, 0.8F + this.rand.nextFloat() * 0.2F));
    user.playerNetServerHandler
            .sendPacket(new S29PacketSoundEffect("random.explode", x, y, z,
                    20.0F, 0.5F + this.rand.nextFloat() * 0.2F));
}
项目:Annointment    文件:ARunEffects.java   
private void doTheLightningThing(EntityPlayerMP user, World world, double x,
        double y, double z) {
    user.playerNetServerHandler.sendPacket(new S2CPacketSpawnGlobalEntity(
            new EntityLightningBolt(world, x, y, z)));
    user.playerNetServerHandler.sendPacket(
            new S29PacketSoundEffect("ambient.weather.thunder", x, y, z,
                    10000.0F, 0.8F + this.rand.nextFloat() * 0.2F));
    user.playerNetServerHandler
            .sendPacket(new S29PacketSoundEffect("random.explode", x, y, z,
                    20.0F, 0.5F + this.rand.nextFloat() * 0.2F));
}
项目:Jiffy    文件:WorldServer.java   
/**
 * adds a lightning bolt to the list of lightning bolts in this world.
 */
public boolean addWeatherEffect(Entity p_72942_1_) {
    if (super.addWeatherEffect(p_72942_1_)) {
        this.mcServer.getConfigurationManager().sendToAllNear(p_72942_1_.posX, p_72942_1_.posY, p_72942_1_.posZ,
                512.0D, this.provider.dimensionId, new S2CPacketSpawnGlobalEntity(p_72942_1_));
        return true;
    } else {
        return false;
    }
}
项目:Resilience-Client-Source    文件: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().func_148541_a(par1Entity.posX, par1Entity.posY, par1Entity.posZ, 512.0D, this.provider.dimensionId, new S2CPacketSpawnGlobalEntity(par1Entity));
        return true;
    }
    else
    {
        return false;
    }
}
项目:Cauldron    文件:WorldServer.java   
public boolean addWeatherEffect(Entity p_72942_1_)
{
    if (super.addWeatherEffect(p_72942_1_))
    {
        this.mcServer.getConfigurationManager().sendToAllNear(p_72942_1_.posX, p_72942_1_.posY, p_72942_1_.posZ, 512.0D, this.provider.dimensionId, new S2CPacketSpawnGlobalEntity(p_72942_1_));
        return true;
    }
    else
    {
        return false;
    }
}
项目:NeptuneMod    文件:NeptunePacketFactory.java   
@Override
public Packet spawnGlobalEntity(Entity entity) {
    return (Packet) new S2CPacketSpawnGlobalEntity((net.minecraft.entity.Entity) entity);
}
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
/**
 * Handles globally visible entities. Used in vanilla for lightning bolts
 */
void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity packetIn);
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
/**
 * Handles globally visible entities. Used in vanilla for lightning bolts
 */
void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
/**
 * Handles globally visible entities. Used in vanilla for lightning bolts
 */
void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
/**
 * Handles globally visible entities. Used in vanilla for lightning bolts
 */
void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity packetIn);
项目:Resilience-Client-Source    文件:INetHandlerPlayClient.java   
/**
 * Handles globally visible entities. Used in vanilla for lightning bolts
 */
void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity var1);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity p_147292_1_);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity p_147292_1_);