Examples of Vector3


Examples of universalelectricity.core.vector.Vector3

    {
        if (this.input != dir)
        {
            this.output = dir;
            if (!this.worldObj.isRemote)
                PacketManager.sendPacketToClients(this.getDescriptionPacket(), this.worldObj, new Vector3(this), 12);
            this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
            this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, ElectricExpansionItems.blockTransformer.blockID);
        }
    }
View Full Code Here

Examples of universalelectricity.core.vector.Vector3

    @Override
    public void initiate()
    {
        super.initiate();
        this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, ElectricExpansionItems.blockInsulatedWire.blockID);
        PacketManager.sendPacketToClients(this.getDescriptionPacket(), this.worldObj, new Vector3(this), 12);
    }
View Full Code Here

Examples of universalelectricity.core.vector.Vector3

       
        if (!this.worldObj.isRemote)
        {
            if (this.ticks % 3L == 0L && this.playersUsing.size() > 0)
            {
                PacketManager.sendPacketToClients(this.getDescriptionPacket(), this.worldObj, new Vector3(this), 12.0D);
            }
        }
       
        if (this.inventory[2] != null && this.inventory[2].getItem() instanceof ItemLinkCard)
        {
View Full Code Here

Examples of universalelectricity.core.vector.Vector3

        }
    }
   
    public void refreshConnections()
    {
        this.outputTile = VectorHelper.getTileEntityFromSide(this.worldObj, new Vector3(this), outputDir);
        this.outputNetwork = ElectricityHelper.getNetworkFromTileEntity(outputTile, outputDir);
       
        this.inputTile = VectorHelper.getTileEntityFromSide(this.worldObj, new Vector3(this), inputDir);
        this.inputNetwork = ElectricityHelper.getNetworkFromTileEntity(inputTile, inputDir);
    }
View Full Code Here

Examples of universalelectricity.core.vector.Vector3

       
       
       
        if (movingPosition != null)
        {
            if (new Vector3(tileEntity).equals(new Vector3(movingPosition)))
            {
                RenderFloatingText.renderFloatingText(status, (float) ((float) x + .5), (float) y - 1, (float) ((float) z + .5));
                RenderFloatingText.renderFloatingText(name, (float) ((float) x + .5), (float) y - .70F, (float) ((float) z + .5));
            }
        }
View Full Code Here

Examples of universalelectricity.core.vector.Vector3

        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
                this.network = null;
        }
       
        if (this.inventory[0] != null && this.energyStored < this.getMaxEnergyStored())
        {
            if (this.inventory[0].getItem() instanceof IItemElectric)
            {
                this.setEnergyStored(this.getEnergyStored() + (PowerUtils.UE.discharge(this.inventory[0], PowerConversionUtils.INSTANCE.new UEElectricPack((this.getMaxEnergyStored() - this.getEnergyStored()) / this.getVoltage(), this.getVoltage()), 2).toUEWatts()));
            }
            else if (this.inventory[0].getItem() instanceof IElectricItem)
            {
                this.setEnergyStored(this.getEnergyStored() + (PowerUtils.IC2.discharge(this.inventory[0], PowerConversionUtils.INSTANCE.new UEElectricPack((this.getMaxEnergyStored() - this.getEnergyStored()) / this.getVoltage(), this.getVoltage()), 2).toUEWatts()));
            }
           
        }
       
        if (this.energyStored >= WATTS_PER_TICK - .0500F)
        {
            if (this.inventory[1] != null && this.canProcess() && (this.processTicks == 0 || this.baseID != this.inventory[1].itemID || this.baseMeta != this.inventory[1].getItemDamage()))
            {
                this.baseID = this.inventory[1].itemID;
                this.baseMeta = this.inventory[1].getItemDamage();
                this.processTicks = this.getProcessingTime();
                this.recipeTicks = this.getProcessingTime();
            }
           
            if (this.canProcess() && this.processTicks > 0)
            {
                this.processTicks--;
               
                if (this.processTicks < 1)
                {
                    this.processItem();
                    this.processTicks = 0;
                }
                this.getClass();
                this.energyStored -= WATTS_PER_TICK;
            }
            else
            {
                this.processTicks = 0;
            }
        }
       
        if (!this.worldObj.isRemote)
        {
            if (this.ticks % 3L == 0L && this.playersUsing > 0)
            {
                PacketManager.sendPacketToClients(this.getDescriptionPacket(), this.worldObj, new Vector3(this), 12.0D);
            }
        }
       
        this.energyStored = Math.min(this.energyStored, this.getMaxEnergyStored());
        this.energyStored = Math.max(this.energyStored, 0.0F);
View Full Code Here

Examples of universalelectricity.core.vector.Vector3

    @Override
    public void openChest()
    {
        if (!this.worldObj.isRemote)
        {
            PacketManager.sendPacketToClients(this.getDescriptionPacket(), this.worldObj, new Vector3(this), 15.0D);
        }
        this.playersUsing++;
    }
View Full Code Here

Examples of universalelectricity.core.vector.Vector3

       
        if (!this.worldObj.isRemote)
        {
            if (this.ticks % 3L == 0L && this.playersUsing > 0)
            {
                PacketManager.sendPacketToClients(this.getDescriptionPacket(), this.worldObj, new Vector3(this), 12.0D);
            }
        }
    }
View Full Code Here

Examples of universalelectricity.core.vector.Vector3

                }
            }
            */
            if (!this.worldObj.isRemote)
            {
                PacketManager.sendPacketToClients(this.getDescriptionPacket(), this.worldObj, new Vector3(this), 12.0D);
            }
        }
    }
View Full Code Here

Examples of universalelectricity.core.vector.Vector3

            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)
                    {
                        this.network = ((IConductor) inputTile).getNetwork();
                       
                        ElectricityPack temp = ElectricExpansionEventHandler.INSTANCE.getNetworkStat(this.network);
                        ElectricExpansionEventHandler.INSTANCE.cleanNetworkStat(this.network);
                       
                        if (temp != null)
                        {
                            this.electricityReading = temp.clone();
                            this.electricityReading.amperes *= 20.0F;
                        }
                        else
                        {
                            this.electricityReading = EMPTY_PACK.clone();
                        }
                    }
                    else
                    {
                        this.network = ((INetworkProvider) inputTile).getNetwork();
                       
                        this.electricityReading = EMPTY_PACK.clone();
                    }
                }
                else
                {
                    this.electricityReading = EMPTY_PACK.clone();
                }
               
                if (this.electricityReading.amperes != this.lastReading.amperes)
                {
                    PacketManager.sendPacketToClients(this.getDescriptionPacket(), this.worldObj, new Vector3(this), 20.0D);
                }
            }
        }
    }
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.