Package powercrystals.minefactoryreloaded.tile.rednet

Examples of powercrystals.minefactoryreloaded.tile.rednet.TileEntityRedNetLogic


  }
 
  @Override
  public TileEntity createNewTileEntity(World world)
  {
    return new TileEntityRedNetLogic();
  }
View Full Code Here


  }
 
  @Override
  public RedNetConnectionType getConnectionType(World world, int x, int y, int z, ForgeDirection side)
  {
    TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z);
    if(logic != null && side.ordinal() > 1 && side.ordinal() < 6)
    {
      if(world.getBlockMetadata(x, y, z) == _sideRemap[side.ordinal() - 2])
      {
        return RedNetConnectionType.None;
View Full Code Here

  }
 
  @Override
  public int getOutputValue(World world, int x, int y, int z, ForgeDirection side, int subnet)
  {
    TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z);
    if(logic != null)
    {
      return logic.getOutputValue(side, subnet);
    }
    else
    {
      return 0;
    }
View Full Code Here

  }
 
  @Override
  public int[] getOutputValues(World world, int x, int y, int z, ForgeDirection side)
  {
    TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z);
    if(logic != null)
    {
      return logic.getOutputValues(side);
    }
    else
    {
      return new int[16];
    }
View Full Code Here

  }
 
  @Override
  public void onInputsChanged(World world, int x, int y, int z, ForgeDirection side, int[] inputValues)
  {
    TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z);
    if(logic != null)
    {
      logic.onInputsChanged(side, inputValues);
    }
  }
View Full Code Here

      }
    }
   
    if(MFRUtil.isHolding(player, ItemLogicUpgradeCard.class))
    {
      TileEntityRedNetLogic logic = (TileEntityRedNetLogic)world.getBlockTileEntity(x, y, z);
      if(logic != null)
      {
        if(logic.insertUpgrade(player.inventory.getCurrentItem().getItemDamage() + 1));
        {
          if(!player.capabilities.isCreativeMode)
          {
            player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
          }
View Full Code Here

  }
 
  @Override
  public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f)
  {
    TileEntityRedNetLogic logic = (TileEntityRedNetLogic) tileentity;
    int rotation = tileentity.worldObj.getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord);
    bindTextureByName(MineFactoryReloadedCore.tileEntityFolder + "redcomp.png");
    GL11.glPushMatrix();
    GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5f, (float) z + 0.5F);
   
    // Techne sucks so do some crazy rotations to turn techne coords into
    // real coords
    GL11.glRotatef(180, 0, 0, 1);
    GL11.glRotatef(180 + (90 * rotation), 0, 1, 0);
   
    // Render the base, with no cards or slots
    _logicModel.render(0.0625f);
   
    // Manually translate and then render each slot with the cards texture
    // up
    bindTextureByName(MineFactoryReloadedCore.tileEntityFolder + "cards.png");
    GL11.glTranslatef(-0.4375f, -0.375f, -0.390625f);
    renderCard(logic.getLevelForSlot(0));
   
    GL11.glTranslatef(0, 0, 0.234375f);
    renderCard(logic.getLevelForSlot(1));
   
    GL11.glTranslatef(0, 0, 0.234375f);
    renderCard(logic.getLevelForSlot(2));
   
    GL11.glTranslatef(0, 0.375f, -0.46875f);
    renderCard(logic.getLevelForSlot(3));
   
    GL11.glTranslatef(0, 0, 0.234375f);
    renderCard(logic.getLevelForSlot(4));
   
    GL11.glTranslatef(0, 0, 0.234375f);
    renderCard(logic.getLevelForSlot(5));
   
    GL11.glPopMatrix();
  }
View Full Code Here

TOP

Related Classes of powercrystals.minefactoryreloaded.tile.rednet.TileEntityRedNetLogic

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.