Package net.minecraft.entity.player

Examples of net.minecraft.entity.player.EntityPlayer.rayTrace()


        int metadata = tileEntity.worldObj.getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
        String status = StatCollector.translateToLocal(te.stepUp ? "function.transformer.stepUp" : "function.transformer.stepDown");
        String name = StatCollector.translateToLocal(ElectricExpansionItems.blockTransformer.getUnlocalizedName() + "." + (int) Math.pow(2, metadata +1) + "x.name");
       
        EntityPlayer player = Minecraft.getMinecraft().thePlayer;
        MovingObjectPosition movingPosition = player.rayTrace(5, 1f);
       
       
       
        if (movingPosition != null)
        {
View Full Code Here


    TileEntity tileEntity = (TileEntity)configurable;
    EntityPlayer player = mc.thePlayer;
    World world = mc.thePlayer.worldObj;
    ItemStack itemStack = player.getCurrentEquippedItem();
    MovingObjectPosition pos = player.rayTrace(8.0D, 1.0F);

    if(pos != null && itemStack != null && itemStack.getItem() instanceof ItemConfigurator && ((ItemConfigurator)itemStack.getItem()).getState(itemStack) == 0)
    {
      int xPos = MathHelper.floor_double(pos.blockX);
      int yPos = MathHelper.floor_double(pos.blockY);
View Full Code Here

    if(transporter instanceof PartDiversionTransporter)
    {
      EntityPlayer player = mc.thePlayer;
      World world = mc.thePlayer.worldObj;
      ItemStack itemStack = player.getCurrentEquippedItem();
      MovingObjectPosition pos = player.rayTrace(8.0D, 1.0F);

      if(pos != null && itemStack != null && itemStack.getItem() instanceof ItemConfigurator)
      {
        int xPos = MathHelper.floor_double(pos.blockX);
        int yPos = MathHelper.floor_double(pos.blockY);
View Full Code Here

        EntityPlayer player = mc.thePlayer;
        World world = mc.thePlayer.worldObj;
 
        FontRenderer font = mc.fontRenderer;
 
        MovingObjectPosition pos = player.rayTrace(40.0D, 1.0F);
 
        if(pos != null)
        {
          int x = MathHelper.floor_double(pos.blockX);
          int y = MathHelper.floor_double(pos.blockY);
View Full Code Here

          AttachmentType grip = type.getGrip(currentHeldItem);
          if(grip != null && grip.flashlight)
          {
            for(int i = 0; i < 2; i++)
            {
              MovingObjectPosition ray = player.rayTrace(grip.flashlightRange / 2F * (i + 1), 1F);
              if(ray != null)
              {
                int x = ray.blockX;
                int y = ray.blockY;
                int z = ray.blockZ;
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.