Examples of rotateBlock()


Examples of net.minecraft.block.Block.rotateBlock()

  }

  @Override
  public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
    Block block = world.getBlock(x, y, z);
    if(block != null && !player.isSneaking() && block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side))) {
      player.swingItem();
      return !world.isRemote;
    }
    return false;
  }
View Full Code Here

Examples of net.minecraft.block.Block.rotateBlock()

  public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
  {
    Block block = Block.blocksList[world.getBlockId(x, y, z)];
    if (block != null)
    {
      if (block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side)))
      {
        player.swingItem();
        return !world.isRemote;
      }
    }
View Full Code Here

Examples of net.minecraft.block.Block.rotateBlock()

        }

        return true;
      } else setBoundTile(par1ItemStack, 0, -1, 0);
    } else if(par2EntityPlayer.isSneaking()) {
      block.rotateBlock(par3World, par4, par5, par6, ForgeDirection.getOrientation(par7));
      if(par3World.isRemote)
        par2EntityPlayer.swingItem();
    }

    if(block == Blocks.lapis_block && ConfigHandler.enchanterEnabled) {
View Full Code Here

Examples of net.minecraft.block.Block.rotateBlock()

        ForgeDirection axis = ForgeDirection.getOrientation(side);
        List<ForgeDirection> l = Arrays.asList(block.getValidRotations(world, x, y, z));

        if(!player.isSneaking() && l.contains(axis))
        {
          block.rotateBlock(world, x, y, z, axis);
        }
        else if(player.isSneaking() && l.contains(axis.getOpposite())) {
          block.rotateBlock(world, x, y, z, axis.getOpposite());
        }
View Full Code Here

Examples of net.minecraft.block.Block.rotateBlock()

        if(!player.isSneaking() && l.contains(axis))
        {
          block.rotateBlock(world, x, y, z, axis);
        }
        else if(player.isSneaking() && l.contains(axis.getOpposite())) {
          block.rotateBlock(world, x, y, z, axis.getOpposite());
        }

        return true;
      }
      else if(getState(stack) == 3) //Wrench
View Full Code Here

Examples of net.minecraft.block.Block.rotateBlock()

  }

  @Override
  public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
    Block block = world.getBlock(x, y, z);
    if (block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side))) {
      player.swingItem();
      return !world.isRemote;
    }
    return false;
  }
View Full Code Here

Examples of net.minecraft.block.Block.rotateBlock()

    {
      if ( Platform.isClient() )
        return !world.isRemote;

      ForgeDirection mySide = ForgeDirection.getOrientation( side );
      if ( b.rotateBlock( world, x, y, z, mySide ) )
      {
        b.onNeighborBlockChange( world, x, y, z, Platform.air );
        player.swingItem();
        return !world.isRemote;
      }
View Full Code Here

Examples of net.minecraft.block.Block.rotateBlock()

            return false;

        if (isBannedRotation(block.getClass()))
            return false;

        if (block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side))) {
            player.swingItem();
            return !world.isRemote;
        }
        return false;
    }
View Full Code Here

Examples of net.minecraft.block.Block.rotateBlock()

      if ( b != null && !p.isSneaking() )
      {
        TileEntity te = w.getTileEntity( x, y, z );
        if ( !(te instanceof IGridHost) )
        {
          if ( b.rotateBlock( w, x, y, z, ForgeDirection.getOrientation( side ) ) )
          {
            b.onNeighborBlockChange( w, x, y, z, Platform.air );
            p.swingItem();
            return !w.isRemote;
          }
View Full Code Here

Examples of net.minecraft.block.Block.rotateBlock()

    if (player.isSneaking() != isShiftRotation(block.getClass())) {
      return false;
    }

    if (block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side))) {
      player.swingItem();
      return !world.isRemote;
    }
    return false;
  }
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.