Examples of TargetPoint


Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

      worldserver.spawnEntityInWorld(entity);
    }
  }

  public static void spawnTeleportEffects(World world, Entity entity) {
    PacketHandler.INSTANCE.sendToAllAround(new PacketTeleportEffects(entity), new TargetPoint(world.provider.dimensionId, entity.posX, entity.posY,
        entity.posZ, 64));
    if(Config.machineSoundsEnabled) {
      world.playSoundEffect(entity.posX, entity.posY, entity.posZ, "mob.endermen.portal", 0.5F, 0.25F);
    }
  } 
View Full Code Here

Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

  public static void sendXPUpdate(EntityPlayer player, World world, int x, int y, int z, boolean swing) {
    Vector3d look = Util.getLookVecEio(player);
    double xP = player.posX + look.x;
    double yP = player.posY + 1.5;
    double zP = player.posZ + look.z;             
    TargetPoint tp = new TargetPoint(player.dimension, x, y, z, 32);
    EnderIO.packetPipeline.INSTANCE.sendTo(new PacketXpTransferEffects(swing, xP, yP, zP), (EntityPlayerMP)player);
    world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "random.orb", 0.1F, 0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.8F));
  }
View Full Code Here

Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

    {
        return ID++;
    }

    public static void sendToAllAround(IMessage message, TileEntity te, int range) {
        INSTANCE.sendToAllAround(message, new TargetPoint(te.getWorldObj().provider.dimensionId, te.xCoord, te.yCoord, te.zCoord, range));
    }
View Full Code Here

Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

    if(!isOpen(bc)) {
      IHarvestResult harvest = FarmersCommune.instance.harvestBlock(this, bc, block, meta);
      if(harvest != null) {
        if(harvest.getDrops() != null) {
          PacketFarmAction pkt = new PacketFarmAction(harvest.getHarvestedBlocks());
          PacketHandler.INSTANCE.sendToAllAround(pkt, new TargetPoint(worldObj.provider.dimensionId, bc.x, bc.y, bc.z, 64));
          for (EntityItem ei : harvest.getDrops()) {
            if(ei != null) {
              insertHarvestDrop(ei);
              if(!ei.isDead) {
                worldObj.spawnEntityInWorld(ei);
View Full Code Here

Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

    } else if((lastSyncRatio != tank.getFilledRatio() && world.getTotalWorldTime() % 2 == 0)) {

      //need to send a custom packet as we don't want want to trigger a full chunk update, just
      //need to get the required  values to the entity renderer
      BlockCoord loc = getLocation();
      PacketHandler.INSTANCE.sendToAllAround(new PacketFluidLevel(this), new TargetPoint(world.provider.dimensionId, loc.x, loc.y, loc.z, 64));
      lastSyncRatio = tank.getFilledRatio();
    }
  }
View Full Code Here

Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

   * @param range - the range the packet can be sent in of this Coord4D
   * @return TargetPoint relative to this Coord4D
   */
  public TargetPoint getTargetPoint(double range)
  {
    return new TargetPoint(dimensionId, xCoord, yCoord, zCoord, range);
  }
View Full Code Here

Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

                GalacticraftCore.packetPipeline.sendToServer(new PacketEntityUpdate(this));
            }

            if (!this.worldObj.isRemote && this.ticks % 5 == 0)
            {
                GalacticraftCore.packetPipeline.sendToAllAround(new PacketEntityUpdate(this), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, 50.0D));
            }
        }

        if (!this.worldObj.isRemote && this.ticks % 5 == 0)
        {
            GalacticraftCore.packetPipeline.sendToAllAround(new PacketDynamic(this), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, 50.0D));
        }

        if (this.worldObj.isRemote && this.ticks % 5 == 0)
        {
            GalacticraftCore.packetPipeline.sendToServer(new PacketDynamic(this));
View Full Code Here

Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

                    {
                        e.printStackTrace();
                    }
                }

                GalacticraftCore.packetPipeline.sendToAllAround(new PacketDynamic(this), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, this.getPacketRange()));
            }

            if (this.worldObj.isRemote && this.ticks % this.getPacketCooldown(Side.SERVER) == 0)
            {
                if (this.fieldCacheServer == null)
View Full Code Here

Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

            {
                GalacticraftCore.packetPipeline.sendToServer(new PacketDynamic(this));
            }
            else if (!this.worldObj.isRemote && this.fieldCacheClient.size() > 0)
            {
                GalacticraftCore.packetPipeline.sendToAllAround(new PacketDynamic(this), new TargetPoint(this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, this.getPacketRange()));
            }
        }
    }
View Full Code Here

Examples of cpw.mods.fml.common.network.NetworkRegistry.TargetPoint

    {
        super.onUpdate();

        if (!this.worldObj.isRemote)
        {
            GalacticraftCore.packetPipeline.sendToAllAround(new PacketDynamic(this), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, this.getPacketRange()));
            // PacketDispatcher.sendPacketToAllAround(this.posX, this.posY,
            // this.posZ, this.getPacketRange(),
            // this.worldObj.provider.dimensionId,
            // GCCorePacketManager.getPacket(GalacticraftCore.CHANNELENTITIES,
            // this, this.getNetworkedData(new ArrayList<Object>())));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.