Examples of EnergyCoordinates


Examples of electricexpansion.api.tile.EnergyCoordinates

    }
   
    @Override
    public Packet getDescriptionPacket()
    {
        EnergyCoordinates freq = this.getFrequency();
        float x = freq.x, y = freq.y, z = freq.z;
       
        String name = ElectricExpansion.useHashCodes ? Integer.valueOf(this.owningPlayer.hashCode()).toString() : this.owningPlayer;
       
        return PacketManager.getPacket(ElectricExpansion.CHANNEL, this, x, y, z, this.getEnergyStored(), name);
View Full Code Here

Examples of electricexpansion.api.tile.EnergyCoordinates

        if (this.worldObj.isRemote)
        {
            try
            {
                float x = dataStream.readFloat(), y = dataStream.readFloat(), z = dataStream.readFloat();
                this.coords = new EnergyCoordinates(x, y, z);
                this.joulesForDisplay = dataStream.readFloat();
                this.owningPlayer = dataStream.readUTF();
            }
            catch (Exception e)
            {
                e.printStackTrace();
            }
        }
        else
        {
            try
            {
                float x = dataStream.readFloat(), y = dataStream.readFloat(), z = dataStream.readFloat();
                this.setFrequency(new EnergyCoordinates(x, y, z));
            }
            catch (Exception e)
            {
                e.printStackTrace();
            }
View Full Code Here

Examples of electricexpansion.api.tile.EnergyCoordinates

        {
            float x = par1NBTTagCompound.getFloat("frequency_x");
            float y = par1NBTTagCompound.getFloat("frequency_y");
            float z = par1NBTTagCompound.getFloat("frequency_z");
           
            this.coords = new EnergyCoordinates(x, y, z);
        }
        catch (Exception e)
        {
            this.coords = null;
        }
View Full Code Here

Examples of electricexpansion.api.tile.EnergyCoordinates

   
    @Override
    public EnergyCoordinates getFrequency()
    {
        if (this.coords == null)
            this.coords = new EnergyCoordinates(0, 0, 0);
       
        return this.coords;
    }
View Full Code Here

Examples of electricexpansion.api.tile.EnergyCoordinates

    }
   
    private Object[] setFrequency(Object[] args)
    {
        if (args.length == 3 && args[0] instanceof Double && args[1] instanceof Double && args[2] instanceof Double)
            this.setFrequency(new EnergyCoordinates((float) args[0], (float) args[1], (float) args[2]));
        return new Object[] {this.getFrequency().x, this.getFrequency().y, this.getFrequency().z};
    }
View Full Code Here

Examples of electricexpansion.api.tile.EnergyCoordinates

        super.keyTyped(par1, par2);
        if (par2 == Keyboard.KEY_RETURN || par2 == Keyboard.KEY_NUMPADENTER)
        {
            try
            {
                this.tileEntity.setFrequency(new EnergyCoordinates(Float.parseFloat(this.textFieldX.getText()), Float.parseFloat(this.textFieldY.getText()), Float.parseFloat(this.textFieldZ.getText())));
            }
            catch (Exception e) { }
        }
       
        if (this.textFieldX.isFocused())
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.