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; } }
/** * 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; } }
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)); }
/** * 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; } }
/** * 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; } }
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; } }
@Override public Packet spawnGlobalEntity(Entity entity) { return (Packet) new S2CPacketSpawnGlobalEntity((net.minecraft.entity.Entity) entity); }
/** * Handles globally visible entities. Used in vanilla for lightning bolts */ void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity packetIn);
/** * Handles globally visible entities. Used in vanilla for lightning bolts */ void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity var1);
void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity p_147292_1_);