Package ic2.api.crops

Examples of ic2.api.crops.ICropTile


  public static void loadIC(IEnergyTile tile)
  {
    if (CompatibilityType.INDUSTRIALCRAFT.isModuleEnabled && !loadedIC2Tiles.contains(tile) && !((TileEntity) tile).worldObj.isRemote)
    {
      NetworkTickHandler.queueEvent(new EnergyTileLoadEvent(tile));
      loadedIC2Tiles.add(tile);
    }
  }
View Full Code Here


        {
          MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent((IEnergyTile)registered));
        }
        else if(registered == null)
        {
          MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
          ic2Registered = true;
        }
      }
    }
  }
View Full Code Here

      worldObj = parent.getWorldObj();
      xCoord = parent.xCoord;
      yCoord = parent.yCoord;
      zCoord = parent.zCoord;

      MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

      addedToEnet = true;
    }
  }
View Full Code Here

      worldObj = parent.getWorldObj();
      xCoord = parent.xCoord;
      yCoord = parent.yCoord;
      zCoord = parent.zCoord;

      MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));

      addedToEnet = true;
    }
  }
View Full Code Here

   * @param has to be an instance of IEnergyTile
  */
  @Override
  public void registerToEneryNet(TileEntity tile) {
    if(MainProxy.isServer(tile.getWorldObj())) {
      MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent((IEnergyTile) tile));
    }
  }
View Full Code Here

    }

    public static void addTileToNet(TileEntity tile) {
        try {
            if (tile instanceof IEnergyTile)
                MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent((IEnergyTile) tile));
        } catch (Throwable error) {
            Game.logErrorAPI("IC2", error, EnergyTileLoadEvent.class);
        }
    }
View Full Code Here

    }

    @Override
    protected void onFirstServerUpdate(){
        MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
    }
View Full Code Here

    }

    @Override
    protected void onFirstServerUpdate(){
        MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
    }
View Full Code Here

  private int emitEnergy()
  {
    //if (ChargingBench.isDebugging) System.out.println("preEmit-currentEnergy: " + currentEnergy);
    if (currentEnergy >= packetSize)
    {
      EnergyTileSourceEvent sourceEvent = new EnergyTileSourceEvent(this, packetSize);
      MinecraftForge.EVENT_BUS.post(sourceEvent);
      final int surplus = sourceEvent.amount;

      if (surplus < packetSize)
      {
View Full Code Here

        EnergyNet net = EnergyNet.getForWorld(worldObj);
        boolean packetSent;
        do
        {
          packetSent = false;
          EnergyTileSourceEvent sourceEvent = new EnergyTileSourceEvent(this, packetSize);
          MinecraftForge.EVENT_BUS.post(sourceEvent);
          final int surplus = sourceEvent.amount;

          if (surplus < packetSize) // If any of it was consumed...
          {
View Full Code Here

TOP

Related Classes of ic2.api.crops.ICropTile

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.