Package universalelectricity.api.vector

Examples of universalelectricity.api.vector.Vector3


  @Override
  public void onReceivePacket(ByteArrayDataInput data, EntityPlayer player, Object... obj)
  {
    try
    {
      this.setProjector(new Vector3(data.readInt(), data.readInt(), data.readInt()));
      this.worldObj.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord);

      this.camoStack = null;
      int itemID = data.readInt();
      int itemMetadata = data.readInt();
View Full Code Here


  {
    if (this.projector != null)
    {
      if (this.projector.getTileEntity(this.worldObj) instanceof TileForceFieldProjector)
      {
        if (worldObj.isRemote || ((IProjector) projector.getTileEntity(this.worldObj)).getCalculatedField().contains(new Vector3(this)))
        {
          return (TileForceFieldProjector) this.projector.getTileEntity(this.worldObj);
        }
      }
    }
View Full Code Here

   */
  public void refreshCamoBlock()
  {
    if (this.getProjectorSafe() != null)
    {
      this.camoStack = MFFSHelper.getCamoBlock(this.getProjector(), new Vector3(this));
    }
  }
View Full Code Here

  @Override
  public void readFromNBT(NBTTagCompound nbt)
  {
    super.readFromNBT(nbt);
    this.projector = new Vector3(nbt.getCompoundTag("projector"));

  }
View Full Code Here

      powerProviderMap.put(handler, powerHandler);
    }

    if (handler instanceof TileEntity)
    {
      TileEntity incomingTile = new Vector3((TileEntity) handler).translate(side).getTileEntity(((TileEntity) handler).worldObj);

      if (handler.canConnect(side, incomingTile))
        return powerProviderMap.get(handler).getPowerReceiver();
    }
    else
View Full Code Here

    public long produce(IConductor conductor, ForgeDirection from, long amount, boolean doReceive)
    {
        TileEntity tile = null;
        if (conductor instanceof TileEntity)
        {
            tile = new Vector3((TileEntity) conductor).translate(from).getTileEntity(((TileEntity) conductor).worldObj);
        }
        //Don't accept power from under powered generators
        if (tile instanceof IVoltageOutput && !(tile instanceof IConductor))
        {
            if (((IVoltageOutput) tile).getVoltageOutput(from) < voltage)
View Full Code Here

TOP

Related Classes of universalelectricity.api.vector.Vector3

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.