Examples of ForgeDirection


Examples of net.minecraftforge.common.ForgeDirection

    {
        super.updateEntity();
       
        if (!this.worldObj.isRemote)
        {
            ForgeDirection inputDirection = ForgeDirection.getOrientation(this.getBlockMetadata() + 2);
            TileEntity inputTile = VectorHelper.getTileEntityFromSide(this.worldObj, new Vector3(this), inputDirection);
           
            if (inputTile instanceof INetworkProvider)
                this.network = ((INetworkProvider) inputTile).getNetwork();
            else
View Full Code Here

Examples of net.minecraftforge.common.ForgeDirection

        }
        else
        {
            try
            {
                ForgeDirection newInputDir = ForgeDirection.getOrientation(dataStream.readByte());
                ForgeDirection newOutputDir = ForgeDirection.getOrientation(dataStream.readByte());
                EnumAdvBattBoxMode newInputMode = EnumAdvBattBoxMode.fromValue(dataStream.readByte());
                EnumAdvBattBoxMode newOutputMode = EnumAdvBattBoxMode.fromValue(dataStream.readByte());
               
                if (this.inputDir != newInputDir)
                    this.setInputDir(newInputDir);
View Full Code Here

Examples of net.minecraftforge.common.ForgeDirection

{
    @Override
    public void renderTileEntityAt(TileEntity var1, double x, double y, double z, float var8)
    {
        TileEntityMultimeter te = (TileEntityMultimeter) var1;
        ForgeDirection direction = te.getDirection();
       
        /**
         * Render from side 2 to 6. This means render all sides excluding top
         * and bottom.
         */
        for (int side = 0; side < 6; side++)
        {
           
            if (direction.ordinal() != side)
            {
                GL11.glPushMatrix();
                GL11.glPolygonOffset(-10, -10);
                GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL);
               
View Full Code Here

Examples of net.minecraftforge.common.ForgeDirection

    {
        super.updateEntity();
       
        if (!this.worldObj.isRemote)
        {
            ForgeDirection inputDirection = ForgeDirection.getOrientation(this.getBlockMetadata() + 2);
            TileEntity inputTile = VectorHelper.getTileEntityFromSide(this.worldObj, new Vector3(this), inputDirection);
           
            if (inputTile instanceof INetworkProvider)
                this.network = ((INetworkProvider) inputTile).getNetwork();
            else
View Full Code Here

Examples of net.minecraftforge.common.ForgeDirection

    @Override
    public void updateEntity()
    {
        super.updateEntity();
       
        ForgeDirection outputDirection = ForgeDirection.getOrientation(this.getBlockMetadata() + 2);
       
        if (!this.produceUE(outputDirection))
        {
            // TODO Produce other electrical
        }
View Full Code Here

Examples of net.minecraftforge.common.ForgeDirection

            {
                boolean[] previousConnections = this.visuallyConnected.clone();
               
                for (byte i = 0; i < 6; i++)
                {
                    ForgeDirection dir = ForgeDirection.getOrientation(i);
                    this.updateConnection(this.worldObj.getBlockTileEntity(this.xCoord + dir.offsetX, this.yCoord + dir.offsetY, this.zCoord + dir.offsetZ), dir);
                }
               
                /**
                 * Only send packet updates if visuallyConnected changed.
View Full Code Here

Examples of net.minecraftforge.common.ForgeDirection

      int[] coords = entry.getValue();
      targetX = coords[0] / 2 + this.guiTopLeftX;
      targetY = coords[1] / 2 + this.guiTopLeftY;
      if (x >= targetX && x <= (targetX + 7) && y >= targetY && y <= (targetY + 7))
      {
        ForgeDirection dir = entry.getKey();
        if (this.tileEntity.getInputDir() != dir && this.tileEntity.getOutputDir() != dir)
        {
          if (buttonID == 1 || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
          {
            this.tileEntity.setOutputDir(dir);
View Full Code Here

Examples of net.minecraftforge.common.ForgeDirection

        {
            this.lastReading = this.electricityReading;
           
            if (!this.worldObj.isRemote)
            {
                ForgeDirection inputDirection = ForgeDirection.getOrientation(ROTATION_MATRIX[this.getBlockMetadata()]);
                TileEntity inputTile = VectorHelper.getTileEntityFromSide(this.worldObj, new Vector3(this), inputDirection);
               
                if (inputTile != null && inputTile instanceof INetworkProvider)
                {
                    if (inputTile instanceof IConductor)
View Full Code Here

Examples of net.minecraftforge.common.ForgeDirection

    }
   
    @Override
    public void initiate()
    {
        ForgeDirection facing = ForgeDirection.getOrientation(this.getBlockMetadata());
        TileEntity inputTile = VectorHelper.getTileEntityFromSide(this.worldObj, new Vector3(this), facing);
       
        if (inputTile instanceof INetworkProvider)
        {
            this.network = ((INetworkProvider) inputTile).getNetwork();
View Full Code Here

Examples of net.minecraftforge.common.ForgeDirection

      }

      // Search nearby inventories to extract blocks.
      for (int dir = 0; dir < 6; dir++)
      {
        ForgeDirection direction = ForgeDirection.getOrientation(dir);
        TileEntity tileEntity = VectorHelper.getTileEntityFromSide(((TileEntity) projector).worldObj, new Vector3((TileEntity) projector), direction);

        if (tileEntity instanceof IInventory)
        {
          IInventory inventory = ((IInventory) tileEntity);
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.