public static void sendToAllAround(AbstractPacket packet, NetworkRegistry.TargetPoint point) { instance.network.sendToAllAround(packet, point); }
/** * Send a packet to all players around a specific point.<br> * Must be called Server side. */ public static void sendToAllAround(IMessage msg, TargetPoint point) { HANDLER.sendToAllAround(msg, point); }
/** * Send this message to everyone within a certain range of a point. * See {@link SimpleNetworkWrapper#sendToAllAround(IMessage, NetworkRegistry.TargetPoint)} */ private static void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) { PacketDispatcher.dispatcher.sendToAllAround(message, point); }
/** * Send this message to everyone within a certain range of a point. * See {@link SimpleNetworkWrapper#sendToAllAround(IMessage, NetworkRegistry.TargetPoint)} */ public final void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) { dispatcher.sendToAllAround(message, point); }
/** * Sends the message to everyone near a point. * * @param message The message to send. * @param point The point to send the message to. */ public void sendToAllAround (IMessage message, TargetPoint point) { this.network.sendToAllAround(message, point); }
/** * Send this message to everyone within a certain range of a point. * See {@link SimpleNetworkWrapper#sendToAllAround(IMessage, NetworkRegistry.TargetPoint)} */ public static final void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) { PacketDispatcher.dispatcher.sendToAllAround(message, point); }
public final void sendRenderPacket(@Nonnull SpellData spell, @Nonnull SpellRing spellRing) { Vec3d target = spell.getTargetWithFallback(); if (target != null) PacketHandler.NETWORK.sendToAllAround(new PacketRenderSpell(spell, spellRing), new NetworkRegistry.TargetPoint(spell.world.provider.getDimension(), target.x, target.y, target.z, 60)); }
public static void doLightningRender(long seed, World world, Vec3d from, Vec3d to, double offshootRange) { PacketHandler.NETWORK.sendToAllAround(new PacketRenderLightningBolt(seed, from, to, offshootRange), new NetworkRegistry.TargetPoint(world.provider.getDimension(), from.x, from.y, from.z, 256)); } }
public void pop() { if (!this.worldObj.isRemote) { NetworkRegistry.TargetPoint target = new NetworkRegistry.TargetPoint(dimension, posX, posY, posZ, 80); NetworkHandler.channel.sendToAllAround(new MessageFX(posX, posY, posZ, MessageFX.FX.BUBBLE_POP), target); this.setDead(); } }
private void sendMessage() { final MessageParticleEffect message = new MessageParticleEffect(world, EnumParticleTypes.REDSTONE, x, y, z); final NetworkRegistry.TargetPoint target = new NetworkRegistry.TargetPoint(world.provider.getDimension(), x, y, z, RANGE_LOW); Network.INSTANCE.getWrapper().sendToAllAround(message, target); if (areAnyPlayersNear(target)) { particlesSent++; } }
@Override protected void renderRay(Vec3d start, Vec3d end) { OMLibNetworkingHandler.INSTANCE.sendToAllAround( new MessageRenderRay(start, end, color, 5, true), new NetworkRegistry.TargetPoint(this.getWorld().provider.getDimension(), start.x, start.y, start.z, 120)); }
@Override protected void renderRay(Vec3d start, Vec3d end) { OMLibNetworkingHandler.INSTANCE.sendToAllAround( new MessageRenderRay(start, end, color, 3, true), new NetworkRegistry.TargetPoint(this.getWorld().provider.getDimension(), start.x, start.y, start.z, 120)); }
@Override public void onDeath(@Nonnull DamageSource cause) { super.onDeath(cause); if (getHealth() <= 0) PacketHandler.NETWORK.sendToAllAround(new PacketExplode(getPositionVector().add(0, 0.25, 0), color, color, 0.5, 0.5, RandUtil.nextInt(100, 200), 75, 25, true), new NetworkRegistry.TargetPoint(world.provider.getDimension(), posX, posY, posZ, 256)); }
public static void playSoundFromServer(SoundEvent soundEvent, SoundCategory cat, BlockPos nextPos, int dim, int range) { //https://github.com/PrinceOfAmber/Cyclic/issues/506 if (soundEvent != null && soundEvent.getRegistryName() != null) // dont crash trying to play invalid sound ModCyclic.network.sendToAllAround(new PacketSound(nextPos, soundEvent, cat), new NetworkRegistry.TargetPoint(dim, nextPos.getX(), nextPos.getY(), nextPos.getZ(), range)); } }
@Override public void sendToAround(QuestingPacket payload, TargetPoint point) { payload.getPayload().setString("ID", payload.getHandler().toString()); for(NBTTagCompound p : PacketAssembly.INSTANCE.splitPacket(payload.getPayload())) { BetterQuesting.instance.network.sendToAllAround(new PacketQuesting(p), point); } }
@Override protected void onContentsChanged(int slot) { markDirty(); if (!world.isRemote) { PacketHandler.NETWORK.sendToAllAround(new PacketUpdateCraftingPlateRenderer(pos, slot), new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 256)); } }
public void sendMax(long max) { markDirty(); this.lastMax = this.latestMax; this.latestMax = max; if (!this.world.isRemote) Calculator.network.sendToAllAround(new PacketCalculatorScreen(pos, 0, max), new TargetPoint(this.world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 64)); }
public void sendEnergy(long energy) { markDirty(); this.lastEnergy = this.latestEnergy; this.latestEnergy = energy; if (!this.world.isRemote) Calculator.network.sendToAllAround(new PacketCalculatorScreen(pos, 1, energy), new TargetPoint(this.world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 64)); }
/** * Reset the controller, pause for a moment and catch fire. */ public void haltAndCatchFire() { if (!getWorld().isRemote) { state = ControllerState.READY; casings.forEach(TileEntityCasing::onDisabled); final MessageHaltAndCatchFire message = new MessageHaltAndCatchFire(getWorld(), getPos()); final NetworkRegistry.TargetPoint target = Network.getTargetPoint(getWorld(), getPos().getX(), getPos().getY(), getPos().getZ(), Network.RANGE_MEDIUM); Network.INSTANCE.getWrapper().sendToAllAround(message, target); } hcfCooldown = COOLDOWN_HCF; }
public void tick(World world, BlockPos pos) { currentDuration++; if (currentDuration % 10 == 0) { PacketHandler.NETWORK.sendToAllAround(new PacketDevilDustFizzle(new Vec3d(pos).add(0.5, 0.5, 0.5), currentDuration), new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 20)); world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), ModSounds.FRYING_SIZZLE, SoundCategory.BLOCKS, 0.7F, (float) RandUtil.nextDouble(0.8, 1.3)); } }