Package mekanism.api

Examples of mekanism.api.Pos3D


   * @param sound - bundled path to the sound
   * @param tileentity - the tile this sound is playing from.
   */
  public TileSound(String id, String sound, TileEntity tileentity)
  {
    super(id, sound, tileentity, new Pos3D(tileentity));

    tileEntity = tileentity;
  }
View Full Code Here


  }

  @Override
  public Pos3D getLocation()
  {
    return new Pos3D(tileEntity);
  }
View Full Code Here

  @Override
  public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
  {
    if(!world.isRemote)
    {
      Pos3D pos = new Pos3D();
      pos.zPos += 0.3;
      pos.xPos -= 0.4;
      pos.rotateYaw(entityplayer.renderYawOffset);
      pos.translate(new Pos3D(entityplayer));

      world.spawnEntityInWorld(new EntityBalloon(world, pos.xPos-0.5, pos.yPos-0.25, pos.zPos-0.5, getColor(itemstack)));
    }

    itemstack.stackSize--;
View Full Code Here

        }
      }
     
      if(!latched)
      {
        Pos3D pos = new Pos3D(coord);
       
        switch(side)
        {
          case DOWN:
            pos.translate(0, -2.5, 0);
            break;
          case UP:
            pos.translate(0, 0, 0);
            break;
          case NORTH:
            pos.translate(0, -1, -0.5);
            break;
          case SOUTH:
            pos.translate(0, -1, 0.5);
            break;
          case WEST:
            pos.translate(-0.5, -1, 0);
            break;
          case EAST:
            pos.translate(0.5, -1, 0);
            break;
        }
       
        if(!source.getWorld().isRemote)
        {
View Full Code Here

  }

  @SideOnly(Side.CLIENT)
  private void doParticle()
  {
    Pos3D pos = new Pos3D(posX + (rand.nextFloat()*.6 - 0.3), posY - 0.8 + (rand.nextFloat()*.6 - 0.3), posZ + (rand.nextFloat()*.6 - 0.3));

    EntityFX fx = new EntityReddustFX(worldObj, pos.xPos, pos.yPos, pos.zPos, 1, 0, 0, 0);
    fx.setRBGColorF(color.getColor(0), color.getColor(1), color.getColor(2));

    Minecraft.getMinecraft().effectRenderer.addEffect(fx);
View Full Code Here

  /** The TileEntity this sound is associated with. */
  public EntityPlayer player;

  public PlayerSound(String id, String sound, EntityPlayer entity)
  {
    super(id, sound, entity, new Pos3D(entity));

    player = entity;
  }
View Full Code Here

  }

  @Override
  public Pos3D getLocation()
  {
    return new Pos3D(player);
  }
View Full Code Here

          if(p == null)
          {
            continue;
          }
 
          Pos3D playerPos = new Pos3D(p);
 
          if(p != mc.thePlayer)
          {
            playerPos.translate(0, 1.7, 0);
          }
 
          float random = (rand.nextFloat()-0.5F)*0.1F;
 
          Pos3D vLeft = new Pos3D();
          vLeft.xPos -= 0.43;
          vLeft.yPos -= 0.55;
          vLeft.zPos -= 0.54;
          vLeft.rotateYaw(p.renderYawOffset);
 
          Pos3D vRight = new Pos3D();
          vRight.xPos += 0.43;
          vRight.yPos -= 0.55;
          vRight.zPos -= 0.54;
          vRight.rotateYaw(p.renderYawOffset);
 
          Pos3D vCenter = new Pos3D();
          vCenter.xPos = (rand.nextFloat()-0.5F)*0.4F;
          vCenter.yPos -= 0.86;
          vCenter.zPos -= 0.30;
          vCenter.rotateYaw(p.renderYawOffset);
 
          Pos3D rLeft = vLeft.clone().scale(random);
          Pos3D rRight = vRight.clone().scale(random);
 
          Pos3D mLeft = vLeft.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
          Pos3D mRight = vRight.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
          Pos3D mCenter = vCenter.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
 
          mLeft.translate(rLeft);
          mRight.translate(rRight);
 
          Pos3D v = playerPos.clone().translate(vLeft);
          spawnAndSetParticle("flame", world, v.xPos, v.yPos, v.zPos, mLeft.xPos, mLeft.yPos, mLeft.zPos);
          spawnAndSetParticle("smoke", world, v.xPos, v.yPos, v.zPos, mLeft.xPos, mLeft.yPos, mLeft.zPos);
 
          v = playerPos.clone().translate(vRight);
          spawnAndSetParticle("flame", world, v.xPos, v.yPos, v.zPos, mRight.xPos, mRight.yPos, mRight.zPos);
View Full Code Here

TOP

Related Classes of mekanism.api.Pos3D

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.