Package forestry.core.utils

Examples of forestry.core.utils.EnumAccess


  @Override
  public void draw(int x, int y) {

    // Update state
    boolean playerIsOwner = tile.isOwner(manager.minecraft.thePlayer);
    EnumAccess access = tile.getAccess();

    if (playerIsOwner)
      maxHeight = 60;
    else
      maxHeight = 36;

    // Draw background
    drawBackground(x, y);

    // Draw icon
    IIcon accessIcon = TextureManager.getInstance().getDefault("misc/access." + access.toString().toLowerCase(Locale.ENGLISH));
    drawIcon(accessIcon, x + 3, y + 4);

    // Draw description
    if (!isFullyOpened())
      return;

    manager.minecraft.fontRenderer.drawStringWithShadow(StringUtil.localize("gui.owner"), x + 22, y + 8, manager.gui.fontColor.get("ledger.owner.header"));

    String ownerName = StringUtil.localize("gui.derelict");
   
    if (tile.getOwnerProfile() != null)
      ownerName = tile.getOwnerProfile().getName();
   
    manager.minecraft.fontRenderer.drawString(ownerName, x + 22, y + 20, manager.gui.fontColor.get("ledger.owner.text"));

    if (!playerIsOwner)
      return;

    manager.minecraft.fontRenderer.drawStringWithShadow(StringUtil.localize("gui.access") + ":", x + 22, y + 32,
        manager.gui.fontColor.get("ledger.owner.subheader"));
    // Access rules
    drawIcon(accessIcon, x + 20, y + 40);
    manager.minecraft.fontRenderer.drawString(StringUtil.localize(access.getName()), x + 38, y + 44, manager.gui.fontColor.get("ledger.owner.text"));

  }
View Full Code Here

TOP

Related Classes of forestry.core.utils.EnumAccess

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.