Package mekanism.common.network.PacketTileEntity

Examples of mekanism.common.network.PacketTileEntity.TileEntityMessage


        sorter.filters.add(message.tFilter);

        for(EntityPlayer iterPlayer : sorter.playersUsing)
        {
          Mekanism.packetHandler.sendTo(new TileEntityMessage(Coord4D.get(sorter), sorter.getFilterPacket(new ArrayList())), (EntityPlayerMP)iterPlayer);
        }
      }
      else if(message.type == 1 && message.coord4D.getTileEntity(worldServer) instanceof TileEntityDigitalMiner)
      {
        TileEntityDigitalMiner miner = (TileEntityDigitalMiner)message.coord4D.getTileEntity(worldServer);

        miner.filters.add(message.mFilter);

        for(EntityPlayer iterPlayer : miner.playersUsing)
        {
          Mekanism.packetHandler.sendTo(new TileEntityMessage(Coord4D.get(miner), miner.getFilterPacket(new ArrayList())), (EntityPlayerMP)iterPlayer);
        }
      }
    }
   
    return null;
View Full Code Here


      {
        updateDelay--;

        if(updateDelay == 0 && clientActive != isActive)
        {
          Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
        }
      }
    }
  }
View Full Code Here

  {
    isActive = active;

    if(clientActive != active && updateDelay == 0)
    {
      Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));

      updateDelay = 10;
      clientActive = active;
    }
  }
View Full Code Here

        else if(message.clickType == 2)
        {
          ((IInvConfiguration)tile).getConfiguration()[message.configIndex] = 0;
        }

        Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(message.coord4D, ((ITileNetwork)tile).getNetworkedData(new ArrayList())), new Range4D(message.coord4D));
      }
      else if(message.packetType == ConfigurationPacket.EJECT_COLOR)
      {
        if(message.clickType == 0)
        {
          config.getEjector().setOutputColor(TransporterUtils.increment(config.getEjector().getOutputColor()));
        }
        else if(message.clickType == 1)
        {
          config.getEjector().setOutputColor(TransporterUtils.decrement(config.getEjector().getOutputColor()));
        }
        else if(message.clickType == 2)
        {
          config.getEjector().setOutputColor(null);
        }
      }
      else if(message.packetType == ConfigurationPacket.INPUT_COLOR)
      {
        ForgeDirection side = ForgeDirection.getOrientation(message.inputSide);

        if(message.clickType == 0)
        {
          config.getEjector().setInputColor(side, TransporterUtils.increment(config.getEjector().getInputColor(side)));
        }
        else if(message.clickType == 1)
        {
          config.getEjector().setInputColor(side, TransporterUtils.decrement(config.getEjector().getInputColor(side)));
        }
        else if(message.clickType == 2)
        {
          config.getEjector().setInputColor(side, null);
        }
      }
      else if(message.packetType == ConfigurationPacket.STRICT_INPUT)
      {
        config.getEjector().setStrictInput(!config.getEjector().hasStrictInput());
      }

      for(EntityPlayer p : ((TileEntityBasicBlock)config).playersUsing)
      {
        Mekanism.packetHandler.sendTo(new TileEntityMessage(message.coord4D, ((ITileNetwork)tile).getNetworkedData(new ArrayList())), (EntityPlayerMP)p);
      }
    }
   
    return null;
  }
View Full Code Here

TOP

Related Classes of mekanism.common.network.PacketTileEntity.TileEntityMessage

Copyright © 2018 www.massapicom. 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.