Examples of TargetPoint


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

        if (!this.worldObj.isRemote)
        {
            if (this.deathTicks >= 180 && this.deathTicks % 5 == 0)
            {
                GalacticraftCore.packetPipeline.sendToAllAround(new PacketSimple(EnumSimplePacket.C_PLAY_SOUND_EXPLODE, new Object[] { }), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, 40.0D));
                //        PacketDispatcher.sendPacketToAllAround(this.posX, this.posY, this.posZ, 40.0, this.worldObj.provider.dimensionId, PacketUtil.createPacket(GalacticraftCore.CHANNEL, EnumPacketClient.PLAY_SOUND_EXPLODE, new Object[] { 0 }));
            }

            if (this.deathTicks > 150 && this.deathTicks % 5 == 0)
            {
                i = 30;

                while (i > 0)
                {
                    j = EntityXPOrb.getXPSplit(i);
                    i -= j;
                    this.worldObj.spawnEntityInWorld(new EntityXPOrb(this.worldObj, this.posX, this.posY, this.posZ, j));
                }
            }

            if (this.deathTicks == 1)
            {
                GalacticraftCore.packetPipeline.sendToAllAround(new PacketSimple(EnumSimplePacket.C_PLAY_SOUND_BOSS_DEATH, new Object[] {}), new TargetPoint(this.worldObj.provider.dimensionId, this.posX, this.posY, this.posZ, 40.0D));
                //        PacketDispatcher.sendPacketToAllAround(this.posX, this.posY, this.posZ, 40.0, this.worldObj.provider.dimensionId, PacketUtil.createPacket(GalacticraftCore.CHANNEL, EnumPacketClient.PLAY_SOUND_BOSS_DEATH, new Object[] { 0 }));
            }
        }

        this.moveEntity(0.0D, 0.10000000149011612D, 0.0D);
View Full Code Here

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

      }
      else
      {
        name = "";
      }
      GalacticraftCore.packetPipeline.sendToAllAround(new PacketSimple(EnumSimplePacket.C_UPDATE_TELEMETRY, new Object[] { this.xCoord, this.yCoord, this.zCoord, name, data0, data1, data2, data3, data4, strUUID } ), new TargetPoint(this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, 320D));
    }
  }
View Full Code Here

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

    public static void sendGearUpdatePacket(EntityPlayerMP player, EnumModelPacket gearType)
    {
      MinecraftServer theServer = FMLCommonHandler.instance().getMinecraftServerInstance();
      if (theServer != null && PlayerUtil.getPlayerForUsernameVanilla(theServer, player.getGameProfile().getName()) != null)
        {
            GalacticraftCore.packetPipeline.sendToAllAround(new PacketSimple(EnumSimplePacket.C_UPDATE_GEAR_SLOT, new Object[] { player.getGameProfile().getName(), gearType.ordinal(), -1 }), new TargetPoint(player.worldObj.provider.dimensionId, player.posX, player.posY, player.posZ, 50.0D));
        }
    }
View Full Code Here

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

    public static void sendGearUpdatePacket(EntityPlayerMP player, EnumModelPacket gearType, int subtype)
    {
      MinecraftServer theServer = FMLCommonHandler.instance().getMinecraftServerInstance();
      if (theServer != null && PlayerUtil.getPlayerForUsernameVanilla(theServer, player.getGameProfile().getName()) != null)
        {
            GalacticraftCore.packetPipeline.sendToAllAround(new PacketSimple(EnumSimplePacket.C_UPDATE_GEAR_SLOT, new Object[] { player.getGameProfile().getName(), gearType.ordinal(), subtype }), new TargetPoint(player.worldObj.provider.dimensionId, player.posX, player.posY, player.posZ, 50.0D));
        }
    }
View Full Code Here

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

        super.onNeighborBlockChange(world, x, y, z, block);

        TileEntity tile = world.getTileEntity(x, y, z);

        this.setBlockBoundsBasedOnState(world, x, y, z);
        GalacticraftCore.packetPipeline.sendToAllAround(new PacketSimple(EnumSimplePacket.C_UPDATE_WIRE_BOUNDS, new Object[] { x, y, z }), new TargetPoint(world.provider.dimensionId, x, y, z, 10.0D));

        if (tile instanceof INetworkConnection)
        {
            ((INetworkConnection) tile).refresh();
        }
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));
        }
    }
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

    instance.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
    instance.channels
        .get(Side.SERVER)
        .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
        .set(new TargetPoint(theTile.getWorldObj().provider.dimensionId, theTile.xCoord, theTile.yCoord, theTile.zCoord, CoFHProps.NETWORK_UPDATE_RANGE));
    instance.channels.get(Side.SERVER).writeAndFlush(message);
  }
View Full Code Here

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

  public static void sendToAllAround(PacketBase message, World world, int x, int y, int z) {

    instance.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
    instance.channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS)
        .set(new TargetPoint(world.provider.dimensionId, x, y, z, CoFHProps.NETWORK_UPDATE_RANGE));
    instance.channels.get(Side.SERVER).writeAndFlush(message);
  }
View Full Code Here

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

        ejectHeldItems();

        try
        {
          TargetPoint where = new TargetPoint( worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 32 );
          IAEItemStack item = AEItemStack.create( output );
          NetworkHandler.instance.sendToAllAround( new PacketAssemblerAnimation( xCoord, yCoord, zCoord, (byte) speed, item ), where );
        }
        catch (IOException e)
        {
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.