Package cofh.api.tileentity

Examples of cofh.api.tileentity.IReconfigurableFacing


    // Tracks the actual index of the current side, after rotation
    int front = -1;

    if(te instanceof IReconfigurableFacing) {
      IReconfigurableFacing teFacing = (IReconfigurableFacing)te;
      front = teFacing.getFacing();
    }
   
    if(side == front) {
      if(te instanceof TileEntityBeefBase) {
        TileEntityBeefBase beefTe = (TileEntityBeefBase)te;
View Full Code Here


      if (RedstoneControlHelper.hasRSControl(stack)) {
        ((IRedstoneControl) tile).setControl(RedstoneControlHelper.getControl(stack));
      }
    }
    if (tile instanceof IReconfigurableFacing) {
      IReconfigurableFacing reconfig = (IReconfigurableFacing) tile;
      int quadrant = MathHelper.floor(living.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;

      if (reconfig.allowYAxisFacing()) {
        quadrant = living.rotationPitch > 60 ? 4 : living.rotationPitch < -60 ? 5 : quadrant;
      }
      switch (quadrant) {
      case 0:
        reconfig.setFacing(2);
        return;
      case 1:
        reconfig.setFacing(5);
        return;
      case 2:
        reconfig.setFacing(3);
        return;
      case 3:
        reconfig.setFacing(4);
        return;
      case 4:
        reconfig.setFacing(1);
        return;
      case 5:
        reconfig.setFacing(0);
        return;
      }
    }
    if (tile instanceof TileCoFHBase) {
      ((TileCoFHBase) tile).onNeighborBlockChange();
View Full Code Here

TOP

Related Classes of cofh.api.tileentity.IReconfigurableFacing

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.