Codota Logo
TabAugment
Code IndexAdd Codota to your IDE (free)

How to use
TabAugment
in
cofh.core.gui.element.tab

Best Java code snippets using cofh.core.gui.element.tab.TabAugment (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: CoFH/CoFHCore

if (!isFullyOpened()) {
  return;
  gui.drawTexturedModalRect(sideOffset() + slotsBorderX1, slotsBorderY1, 16, 20, slotsBorderX2 - slotsBorderX1, slotsBorderY2 - slotsBorderY1);
  GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  RenderHelper.bindTexture(GRID_TEXTURE);
      drawSlots(0, 0, 2);
      drawSlots(0, 1, 2);
      break;
    case 5:
      drawSlots(0, 0, 3);
      drawSlots(1, 1, 2);
      break;
    case 6:
      drawSlots(0, 0, 3);
      drawSlots(0, 1, 3);
      break;
    case 7:
      drawSlots(1, 0, 2);
      drawSlots(0, 1, 3);
      drawSlots(1, 2, 2);
      break;
    case 8:
      drawSlots(0, 0, 3);
      drawSlots(0, 1, 3);
      drawSlots(1, 2, 2);
      break;
    case 9:
origin: CoFH/CoFHCore

@Override
protected void drawForeground() {
  drawTabIcon(CoreTextures.ICON_AUGMENT);
  if (!isFullyOpened()) {
    return;
  }
  getFontRenderer().drawStringWithShadow(StringHelper.localize("info.cofh.augmentation"), sideOffset() + 18, 6, headerColor);
  GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
origin: CoFH/CoFHCore

@Override
public boolean onMousePressed(int mouseX, int mouseY, int mouseButton) {
  if (numAugments == 0) {
    return true;
  }
  if (!isFullyOpened()) {
    return false;
  }
  if (side == LEFT) {
    mouseX += currentWidth;
  }
  mouseX -= currentShiftX;
  mouseY -= currentShiftY;
  return mouseX >= slotsBorderX1 + sideOffset() && mouseX < slotsBorderX2 + sideOffset() && mouseY >= slotsBorderY1 && mouseY < slotsBorderY2;
}
origin: CoFH/ThermalExpansion

@Override
public void initGui() {
  super.initGui();
  // Right Side
  augmentTab = addTab(new TabAugment(this, (IAugmentableContainer) inventorySlots));
  redstoneTab = addTab(new TabRedstoneControl(this, baseTile));
  redstoneTab.setVisible(baseTile.hasRedstoneControl());
  configTab = addTab(new TabConfigurationTransfer(this, baseTile));
  // Left Side
  securityTab = addTab(new TabSecurity(this, baseTile, playerName));
  securityTab.setVisible(baseTile.enableSecurity() && baseTile.isSecured());
  if (baseTile.getMaxEnergyStored(null) > 0) {
    addTab(new TabEnergy(this, baseTile, false).displayStored(!baseTile.smallStorage()));
  }
  if (!myInfo.isEmpty()) {
    addTab(new TabInfo(this, myInfo));
  }
}
origin: CoFH/CoFHCore

private void drawSlots(int xOffset, int yOffset, int slots) {
  gui.drawSizedTexturedModalRect(sideOffset() + slotsBorderX1 + 3 + 9 * xOffset, slotsBorderY1 + 3 + 18 * yOffset, 0, 0, 18 * slots, 18, 96, 32);
}
origin: CoFH/CoFHCore

@Override
public void addTooltip(List<String> list) {
  if (!isFullyOpened()) {
    list.add(StringHelper.localize("info.cofh.augmentation"));
    if (numAugments == 0) {
      list.add(StringHelper.YELLOW + StringHelper.localize("info.cofh.upgradeRequired"));
    }
  }
}
origin: CoFH/CoFHCore

case 4:
  for (int i = 0; i < numAugments; i++) {
    myContainer.getAugmentSlots()[i].xPos = posXOffset() + slotsBorderX1 + 4 + 18 * (i % 2);
    myContainer.getAugmentSlots()[i].yPos = posY + slotsBorderY1 + 4 + 18 * (i / 2);
case 5:
  for (int i = 0; i < numAugments; i++) {
    myContainer.getAugmentSlots()[i].xPos = posXOffset() + slotsBorderX1 + 4 + 18 * (i % 3) + 9 * (i / 3);
    myContainer.getAugmentSlots()[i].yPos = posY + slotsBorderY1 + 4 + 18 * (i / 3);
case 7:
  for (int i = 0; i < 2; i++) {
    myContainer.getAugmentSlots()[i].xPos = posXOffset() + slotsBorderX1 + 4 + 9 + 18 * (i % 2);
    myContainer.getAugmentSlots()[i].yPos = posY + slotsBorderY1 + 4;
    myContainer.getAugmentSlots()[i].xPos = posXOffset() + slotsBorderX1 + 4 + 18 * (i - 2);
    myContainer.getAugmentSlots()[i].yPos = posY + slotsBorderY1 + 4 + 18;
    myContainer.getAugmentSlots()[i].xPos = posXOffset() + slotsBorderX1 + 4 + 9 + 18 * (i % 2);
    myContainer.getAugmentSlots()[i].yPos = posY + slotsBorderY1 + 4 + 18 * 2;
case 8:
  for (int i = 0; i < 6; i++) {
    myContainer.getAugmentSlots()[i].xPos = posXOffset() + slotsBorderX1 + 4 + 18 * (i % 3);
    myContainer.getAugmentSlots()[i].yPos = posY + slotsBorderY1 + 4 + 18 * (i / 3);
    myContainer.getAugmentSlots()[i].xPos = posXOffset() + slotsBorderX1 + 4 + 9 + 18 * (i % 2);
    myContainer.getAugmentSlots()[i].yPos = posY + slotsBorderY1 + 4 + 18 * 2;
origin: CoFH/ThermalExpansion

@Override
public void initGui() {
  super.initGui();
  addElement(new ElementEnergyStored(this, 80, 18, baseTile.getEnergyStorage()));
  // Right Side
  steamTab = (TabSteam) addTab(new TabSteam(this, baseTile, baseTile.isSteamProducer()));
  steamTab.setVisible(baseTile.showSteamTab());
  augmentTab = addTab(new TabAugment(this, (IAugmentableContainer) inventorySlots));
  redstoneTab = addTab(new TabRedstoneControl(this, baseTile));
  redstoneTab.setVisible(baseTile.hasRedstoneControl());
  // Left Side
  securityTab = addTab(new TabSecurity(this, baseTile, playerName));
  securityTab.setVisible(baseTile.enableSecurity() && baseTile.isSecured());
  energyTab = addTab(new TabEnergy(this, baseTile, true).displayStored(!baseTile.smallStorage()));
  energyTab.setVisible(baseTile.showEnergyTab());
  if (!myInfo.isEmpty()) {
    addTab(new TabInfo(this, myInfo + "\n\n" + StringHelper.localize("tab.thermalexpansion.dynamo.0")));
  }
  MinecraftForge.EVENT_BUS.register(this);
}
cofh.core.gui.element.tabTabAugment

Most used methods

  • <init>
  • drawSlots
  • drawTabIcon
  • getFontRenderer
  • isFullyOpened
  • posXOffset
  • sideOffset

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • getSystemService (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now