Examples of EnergyTileLoadEvent


Examples of ic2.api.energy.event.EnergyTileLoadEvent

    if (!initialized)
    {
      if (worldObj == null) return;

      MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
      initialized = true;
    }

    int energySent = 0;
    if (!receivingRedstoneSignal())
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileLoadEvent

    case 21:
      //TODO How can we make IC2 check the new emit/accept values without doing a reload?
      if (initialized) MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
      initialized = false;
      sideSettings[id - 16] ^= 1;
      MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
      initialized = true;
      //worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
      break;
    }
    energyCap = Math.max(packetSize, outputRate);
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileLoadEvent

        FMLLog.info(Info.TITLE_LOG + "Resetting Emitter block meta value from " + meta + " to 7");
        worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 7, 3);
        worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
        return;
      }
      EnergyTileLoadEvent loadEvent = new EnergyTileLoadEvent(this);
      MinecraftForge.EVENT_BUS.post(loadEvent);
      //      EnergyNet.getForWorld(worldObj).addTileEntity(this);
      initialized = true;
    }
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileLoadEvent

   
    if(_addToNetOnNextTick)
    {
      if(!worldObj.isRemote)
      {
        MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
      }
      _addToNetOnNextTick = false;
      _isAddedToIC2EnergyNet = true;
    }
   
View Full Code Here

Examples of ic2.api.energy.event.EnergyTileLoadEvent

  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

Examples of ic2.api.energy.event.EnergyTileLoadEvent

        {
          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

Examples of ic2.api.energy.event.EnergyTileLoadEvent

      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

Examples of ic2.api.energy.event.EnergyTileLoadEvent

      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

Examples of ic2.api.energy.event.EnergyTileLoadEvent

   * @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

Examples of ic2.api.energy.event.EnergyTileLoadEvent

    }

    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
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.